Skip to content

Compatibility with PHP 7.3 #372

Description

@hcl

It seems that the CakePHP version (2.10.11) packaged in the released package is out of date. When I tried to deployed it under nginx/1.16.0 + PHP 7.3.6, the installation process can't be finished and generates tons of NOTICE messages(like below) both in the browser and log.

[error] 18108#0: *25 FastCGI sent in stderr: "ction.php on line 128PHP message: PHP Notice:  compact() [<a href='http://php.net/function.compact'>function.compact</a>]: Undefined variable: subject in /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Utility/ObjectCollection.php on line 128PHP message: PHP Notice:  compact() [<a href='http://php.net/function.compact'>function.compact</a>]: Undefined variable: subject in /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Utility/ObjectCollection.php on line 128 PHP message: PHP Notice:  compact() [<a href='http://php.net/function.compact'>function.compact</a>]: Undefined variable: subject in /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Utility/ObjectCollection.php on line 128

PHP 7.3 has changed the behavior of function compact(). Luckily, CakePHP have had fixed the compatibility with PHP 7.3.x in the recent update. I have tested with the latest version(2.10.18), and Sonerezh seems work and has no problems.

It can be done with (suppose you have composer.phar under the Sonerezh folder):

php composer.phar update

After the update, Sonerezh will work under PHP 7.3.

So I hope that the official providing package could update as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions