Cannot use 'Object' as class name as it is reserved in
Hi, I use laravel 5.7.* , cloudways - digitalocean , when I do composer install , I get Cannot use 'String' as class name as it is reserved in , then I upgraded php from 7.0 to 7.2 and I get this error, PHP Fatal error: Cannot use 'Object' as class name as it is reserved in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Object.php on line 18 , I do not have the problem on dev environment (I use laragon), please help , thank You
Solution; either downgrade the PHP version earlier than 7.2 or change the dependency.
Edit in fact it looks like the latest version of the Json-Schema package has changed the name of the files in a PR from about 3 years ago. Update your dependency to the most recent version