Parse error: syntax error, unexpected ')', expecting '|' or variable (T_VARIABLE) in /usr/share/php/Symfony/Component/Console/Application.php on line 238
I am using multiple versions of php and now I want to composer install in my project but I am getting this error. how to solve this?
which version of composer and PHP are you using when getting this error ?
Btw, the location of the error /usr/share/php/Symfony/Component/Console/Application.php does not appear to be part of a composer phar.
I ran command composer -V but it did not show the composer version and got the same error.
how did you install composer ?
oh, and how is this related to the Monolog project ?
did you to solve the problem? i have the same error when switching from php 8.3.6 to 7 when typing composer install
@Batraz2004 if you downgrade the php version you need to downgrade monolog as well to a version that supports your PHP version..