我对Composer有一个问题,当我运行composer install命令时,会出现一个错误255。
以下是我为解决这一问题所做的工作:
中。
我正在运行Ubuntu 20.04。
错误细节:
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发布于 2021-04-20 13:54:41
这是最近更新的一个软件包的一个问题
composer require symfony/service-contracts:2.2.0
:)
https://stackoverflow.com/questions/67180108
复制相似问题