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

Viewed 19668

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. :(

3 Answers

"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.

Use Php 7.1 version. It will solve that issue

I upgraded my composer and it worked well for me.

Related