Implement PSR-11
Delegate lookup is optional and thus, not implemented.
This commit is contained in:
parent
46daa359ea
commit
bde0efd01c
@ -20,6 +20,7 @@
|
|||||||
"doctrine/common": "~2.4",
|
"doctrine/common": "~2.4",
|
||||||
"twig/twig": "~1.28|~2.0",
|
"twig/twig": "~1.28|~2.0",
|
||||||
"psr/cache": "~1.0",
|
"psr/cache": "~1.0",
|
||||||
|
"psr/container": "^1.0",
|
||||||
"psr/log": "~1.0",
|
"psr/log": "~1.0",
|
||||||
"psr/simple-cache": "^1.0",
|
"psr/simple-cache": "^1.0",
|
||||||
"symfony/polyfill-intl-icu": "~1.0",
|
"symfony/polyfill-intl-icu": "~1.0",
|
||||||
@ -102,6 +103,7 @@
|
|||||||
},
|
},
|
||||||
"provide": {
|
"provide": {
|
||||||
"psr/cache-implementation": "1.0",
|
"psr/cache-implementation": "1.0",
|
||||||
|
"psr/container-implementation": "1.0",
|
||||||
"psr/simple-cache-implementation": "1.0"
|
"psr/simple-cache-implementation": "1.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
<argument type="collection" />
|
<argument type="collection" />
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
<service id="Psr\Container\ContainerInterface" alias="service_container" public="false" />
|
||||||
<service id="Symfony\Component\DependencyInjection\ContainerInterface" alias="service_container" public="false" />
|
<service id="Symfony\Component\DependencyInjection\ContainerInterface" alias="service_container" public="false" />
|
||||||
<service id="Symfony\Component\DependencyInjection\Container" alias="service_container" public="false" />
|
<service id="Symfony\Component\DependencyInjection\Container" alias="service_container" public="false" />
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\DependencyInjection;
|
namespace Symfony\Component\DependencyInjection;
|
||||||
|
|
||||||
|
use Psr\Container\ContainerInterface as PsrContainerInterface;
|
||||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||||
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
|
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
|
||||||
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||||
@ -21,7 +22,7 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
|||||||
* @author Fabien Potencier <fabien@symfony.com>
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||||
*/
|
*/
|
||||||
interface ContainerInterface
|
interface ContainerInterface extends PsrContainerInterface
|
||||||
{
|
{
|
||||||
const EXCEPTION_ON_INVALID_REFERENCE = 1;
|
const EXCEPTION_ON_INVALID_REFERENCE = 1;
|
||||||
const NULL_ON_INVALID_REFERENCE = 2;
|
const NULL_ON_INVALID_REFERENCE = 2;
|
||||||
|
@ -11,12 +11,14 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\DependencyInjection\Exception;
|
namespace Symfony\Component\DependencyInjection\Exception;
|
||||||
|
|
||||||
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base ExceptionInterface for Dependency Injection component.
|
* Base ExceptionInterface for Dependency Injection component.
|
||||||
*
|
*
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
* @author Bulat Shakirzyanov <bulat@theopenskyproject.com>
|
* @author Bulat Shakirzyanov <bulat@theopenskyproject.com>
|
||||||
*/
|
*/
|
||||||
interface ExceptionInterface
|
interface ExceptionInterface extends ContainerExceptionInterface
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,14 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\DependencyInjection\Exception;
|
namespace Symfony\Component\DependencyInjection\Exception;
|
||||||
|
|
||||||
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This exception is thrown when a non-existent service is requested.
|
* This exception is thrown when a non-existent service is requested.
|
||||||
*
|
*
|
||||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||||
*/
|
*/
|
||||||
class ServiceNotFoundException extends InvalidArgumentException
|
class ServiceNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface
|
||||||
{
|
{
|
||||||
private $id;
|
private $id;
|
||||||
private $sourceId;
|
private $sourceId;
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5.9"
|
"php": ">=5.5.9",
|
||||||
|
"psr/container": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/yaml": "~3.2",
|
"symfony/yaml": "~3.2",
|
||||||
@ -32,6 +33,9 @@
|
|||||||
"conflict": {
|
"conflict": {
|
||||||
"symfony/yaml": "<3.2"
|
"symfony/yaml": "<3.2"
|
||||||
},
|
},
|
||||||
|
"provide": {
|
||||||
|
"psr/container-implementation": "1.0"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": { "Symfony\\Component\\DependencyInjection\\": "" },
|
"psr-4": { "Symfony\\Component\\DependencyInjection\\": "" },
|
||||||
"exclude-from-classmap": [
|
"exclude-from-classmap": [
|
||||||
|
Reference in New Issue
Block a user