Issue
I have a problem with Composer, when I run the composer install
command, an error 255 appears.
Here are the tasks I have done to solve this:
- I updated Composer and the error is present in version 1 and 2
composer sync-recipes -v --force
- Reinstalled synfony 5
- Updated the PC
I am running Ubuntu 20.04.
Error detail:
Don't forget to run npm install --force or yarn install --force to refresh your JavaScript dependencies!
Run composer recipes at any time to see the status of your Symfony recipes.
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!! PHP Fatal error: Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id) in /home/massi/Projets/projet-RH/vendor/symfony/dependency-injection/ServiceLocator.php on line 46
!! Symfony\Component\ErrorHandler\Error\FatalError {#92
!! -error: array:4 [
!! "type" => 64
!! "message" => "Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id)"
!! "file" => "/home/massi/Projets/projet-RH/vendor/symfony/dependency-injection/ServiceLocator.php"
!! "line" => 46
!! ]
!! #message: "Compile Error: Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id)"
!! #code: 0
!! #file: "./vendor/symfony/dependency-injection/ServiceLocator.php"
!! #line: 46
!! }
!!
Script @auto-scripts was called via post-install-cmd
Solution
it's a probleme to a package recently updated
composer require symfony/service-contracts:2.2.0
:)
Answered By - Machou Answer Checked By - Clifford M. (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.