1
I was not using the API for long time and then we switched to PHP 7.2. It shows the error below. OS is Ubuntu 14.04.6 .
I am a beginner and have no idea where to start from. I'd be thankful if someone could tell me where to start from.
composer.json
looks like this:
"require": { "php": ">=5.5.9", "cakephp/cakephp": "~3.2", "mobiledetect/mobiledetectlib": "2.*", "cakephp/migrations": "~1.0", "cakephp/plugin-installer": "*", "friendsofcake/crud":"~4.0"
Fatal error: Cannot use Crud\Core\Object as Object because 'Object' is a special class name in /www/htdocs/w0555555e/api.website.com/vendor/friendsofcake/crud/src/Listener/BaseListener.php on line 4
Thanks.I followed what described in the pull request. now error is :
"Warning (2): count() [<a href='php.net/function.count'>function.count</a>]: Parameter must be an array or an object that implements Countable [CORE/src/Database/QueryCompiler.php, line 128]"
Do you mean i need to change the text on line 2 ofcomposer.json
in vendor/friendsofcake/crud from"name":"friendsofcake/crud"
>"name":"friendsofcake/crud":"~5.2.0"
I also acessed via SSH and opened the api directory and ran
composer update
and here is the responsebash: composer: command not found
– user2917597 – 2019-06-13T07:12:28.713You don't need to manually apply the changes in the pull request. Just install
composer
on the system and runcomposer update
after changing line 7 incomposet.json
. – Worthwelle – 2019-06-13T13:07:25.487