Closed
Description
Symfony version(s) affected: 4.3, 4.4 symfony/service-contracts <=1.1.3
Description
"symfony/service-contracts" package is misssing required dependency on "psr/container" and cannot be used by itself.
How to reproduce
composer require symfony/service-contracts
test.php:
<?php
require_once __DIR__.'/vendor/autoload.php';
use Symfony\Contracts\Service\ServiceProviderInterface;
class Test implements ServiceProviderInterface {}
$t = new Test();
$ php -f test.php
PHP Fatal error: Interface 'Psr\Container\ContainerInterface' not found in /home/michael/tmp/symfony-contracts-test/vendor/symfony/service-contracts/ServiceProviderInterface.php on line 22
Fatal error: Interface 'Psr\Container\ContainerInterface' not found in /home/michael/tmp/symfony-contracts-test/vendor/symfony/service-contracts/ServiceProviderInterface.php on line 22
Possible Solution
Add explicit dependency on "psr/container": "^1.0"
in symfony/service-contracts package, same as it's already done in symfony/contracts meta-package here