Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'Object' not found #274

Closed
ravage84 opened this issue Sep 22, 2016 · 1 comment
Closed

Class 'Object' not found #274

ravage84 opened this issue Sep 22, 2016 · 1 comment

Comments

@ravage84
Copy link
Contributor

Tried to run my migrations on a PHP 7 environment.

It failed with the following message:

Cake Migration Shell
---------------------------------------------------------------
Running migrations:
PHP Fatal error:  Class 'Object' not found in /var/www/html/Plugin/Migrations/Lib/CakeMigration.php on line 17

Fatal error: Class 'Object' not found in /var/www/html/Plugin/Migrations/Lib/CakeMigration.php on line 17
Fatal Error Error: Class 'Object' not found in [/var/www/html/Plugin/Migrations/Lib/CakeMigration.php, line 17]

Object is a reserved word as of PHP 7:
http://php.net/manual/en/reserved.other-reserved-words.php

It is used in

class CakeMigration extends Object {

The CakePHP core fixed that by renamit (& aliasing it) it to CakeObject in https://github.com/cakephp/cakephp/blob/7207d8f16a1cf2ba7e5932fb2e7941a87e53e5e6/lib/Cake/Core/Object.php#L17-L18

s-nakajima added a commit to NetCommons3/NetCommons3 that referenced this issue Sep 25, 2016
CakePHP2.9.0に上がり、Migrationがエラーになってしまうため、暫定でcakephpを2.8.xにする。
CakeDC/migrations#274
@steinkel
Copy link
Member

Closed per #275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants