ZUHDI
ZUHDI

Reputation: 43

Fatal error: Cannot use 'Object' as class name as it is reserved

Fatal error: Cannot use 'Object' as class name as it is reserved

I'm trying to bake my project but it shows this error. I'm using cakephp 2.5.4 and PHP 7.0.32

I tried to change the lib folder I used the lib folder for 2.8.0 and I tried to change PHP version to 5.6.38 but nothing worked. :(

Upvotes: 4

Views: 30385

Answers (3)

Nätu
Nätu

Reputation: 332

I upgraded my composer and it worked well for me.

Upvotes: 0

Sreejith vs
Sreejith vs

Reputation: 103

Use Php 7.1 version. It will solve that issue

Upvotes: 8

Rakesh P
Rakesh P

Reputation: 458

"Object" is one of the reserved keyword of PHP. You can not use it as class name. Change the class name to resolve the error.

Upvotes: 10

Related Questions