when I use composer to install laravel I'm getting error - php

PHP Fatal error:
Cannot use 'PhpParser\Node\Scalar\String' as class name as it is reserved in /opt/lampp/htdocs/makemykareer/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php on line 86
I'm using php 7 and ubuntu 16.04

Try upgrading your PHP-Parser library by upgrading your composer version

Related

Upgrading php to 8

Both my valet and composer is using php 8.0
But my local says
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.30. in /Users/admin/sites/sage10/web/app/themes/sage10/vendor/composer/platform_check.php on line 24
When I upgrade php with valet using 8.0 it gives
Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/admin/.composer/vendor/illuminate/container/Container.php
But at the end it says its using 8.0. and composer -vvv about also gives php 8.0
Is there more things to consider? I don't understand why its saying I'm using 7.4...
Composer works on the php version is in use on command line. It is possible you have multiple version installed.
Try to run
php -v
Then ensure composer is updated to the latest version (2.4.2)
composer -V
In case update it
composer self-update
If self-update gives you some runtime error, reinstall composer following the install procedure
Then the error you get is about Laravel 6/7/8 version with PHP 8, the solution is here
Laravel app stopped working after upgrading to php 8
I had a line of required package that was not needed and supported with sage 10// php8 (illuminate/support) inside my global composer file. After erasing that and linking my valet with php database and restarting it, everything started to work.

Error: Call to undefined method ComposerAutoloaderInit13c2409cfa32d1fa0c04493c0d85c93c::getLoader()

I transfer Laravel to VPS and get the following error:
Fatal error: Uncaught Error: Call to undefined method ComposerAutoloaderInit13c2409cfa32d1fa0c04493c0d85c93c::getLoader() in /var/www/site.ru/application/vendor/autoload.php on line 7
Error: Call to undefined method ComposerAutoloaderInit13c2409cfa32d1fa0c04493c0d85c93c::getLoader() in /var/www/site.ru/application/vendor/autoload.php on line 7
PHP 7.4
I do composer dump-autoload and still no changes
Please help!)
git clone ...
composer install
Don't work.
Remove vendor and
composer install
Don't work.
For my case, symfony server:start and php -S both get the undefined method errors. I've uopz installed for testing. Disable the extension, and the error goes.
You have to disable uopz extension and restart apache :
phpdismod uopz
systemctl reload apache2
1 - you need to update php to a newer version (php 7.4.3 or above)
2 - use the composer from the official site (it's better to download it as a file)
In my case, everything worked the first time. I have Linux Mint 20, php 7.4.3, Laravel 7
If you have Linux Mint 20, then to install php7.4.3 you need to change mirros in Software Sources. In my case, I disable the repository from ondrej/php and changed mirros. Next install php

Class 'DateTimeImmutable' not found

I've just run an update for my CakePHP version (3.1.7). And now I'm unable to run my app, with a fatal error :
Fatal error: Class 'DateTimeImmutable' not found in /opt/lampp/htdocs/my-app/vendor/cakephp/chronos/src/Chronos.php on line 50
I found this issue on Github, where I noticed that
DateTimeImmutable was not present in 5.4
So I install PHP5.6.20 on my PC, but after restarting Xampp, I still get the same error. How can I fix this ?
PHP's installation on the PC is not related to Xampp. So installing PHP doesn't solve the problem. But installing a new version of Xampp with PHP 5.6.
It's a PHP Version Problem make sure You're using PHP > 5.5v

Fatal error while installation of orocrm

I'm getting this error when trying to install orocrm :
Fatal error: Cannot use 'True' as class name as it is reserved in
C:\xampp\htdocs\crm-application\vendor\oro\platform\src\Oro\Component\ConfigExpression\Condition\True.php
on line 10
Any idea what might be the cause of this?
You are using PHP7. For now OroCrm doesn't support PHP7.
You need to downgrade PHP to 5.6 version.

Missing packages on Ubuntu 12.04 with PHP 5.4

I've upgraded PHP to version 5.4 using this guide:
http://www.barryodonovan.com/index.php/2012/05/22/ubuntu-12-04-precise-pangolin-and-php-5-4-again
Now when i hit "$php -v" it throws following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/memcached.so' - /usr/lib/php5/20100525/memcached.so: undefined symbol: memcached_touch in Unknown on line 0
How can i properly install "memcached" library? Package manager reports that i've already got latest version. I even tried to reinstall it to no avail.
You need all extensions in the correct version. We had this problem here before some time. At the moment only the memcache beta supports php5.4 on this site you get a compiled module.
Class 'Memcache' not found & PHP

Categories