mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
migration symfony 5 4 (#300)
* symfony 5.4 (diff dev) * symfony 5.4 (working) * symfony 5.4 (update autoload) * symfony 5.4 (remove swiftmailer mailer implementation) * symfony 5.4 (php doc and split Global accessor class) ### Impacted packages: composer require php:">=7.2.5 <8.0.0" symfony/console:5.4.* symfony/dotenv:5.4.* symfony/framework-bundle:5.4.* symfony/twig-bundle:5.4.* symfony/yaml:5.4.* --update-with-dependencies composer require symfony/stopwatch:5.4.* symfony/web-profiler-bundle:5.4.* --dev --update-with-dependencies
This commit is contained in:
@@ -24,18 +24,16 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||
*/
|
||||
interface ContainerInterface extends PsrContainerInterface
|
||||
{
|
||||
const EXCEPTION_ON_INVALID_REFERENCE = 1;
|
||||
const NULL_ON_INVALID_REFERENCE = 2;
|
||||
const IGNORE_ON_INVALID_REFERENCE = 3;
|
||||
const IGNORE_ON_UNINITIALIZED_REFERENCE = 4;
|
||||
public const RUNTIME_EXCEPTION_ON_INVALID_REFERENCE = 0;
|
||||
public const EXCEPTION_ON_INVALID_REFERENCE = 1;
|
||||
public const NULL_ON_INVALID_REFERENCE = 2;
|
||||
public const IGNORE_ON_INVALID_REFERENCE = 3;
|
||||
public const IGNORE_ON_UNINITIALIZED_REFERENCE = 4;
|
||||
|
||||
/**
|
||||
* Sets a service.
|
||||
*
|
||||
* @param string $id The service identifier
|
||||
* @param object|null $service The service instance
|
||||
*/
|
||||
public function set($id, $service);
|
||||
public function set(string $id, ?object $service);
|
||||
|
||||
/**
|
||||
* Gets a service.
|
||||
@@ -43,58 +41,44 @@ interface ContainerInterface extends PsrContainerInterface
|
||||
* @param string $id The service identifier
|
||||
* @param int $invalidBehavior The behavior when the service does not exist
|
||||
*
|
||||
* @return object|null The associated service
|
||||
* @return object|null
|
||||
*
|
||||
* @throws ServiceCircularReferenceException When a circular reference is detected
|
||||
* @throws ServiceNotFoundException When the service is not defined
|
||||
*
|
||||
* @see Reference
|
||||
*/
|
||||
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
|
||||
public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
|
||||
|
||||
/**
|
||||
* Returns true if the given service is defined.
|
||||
*
|
||||
* @param string $id The service identifier
|
||||
*
|
||||
* @return bool true if the service is defined, false otherwise
|
||||
* @return bool
|
||||
*/
|
||||
public function has($id);
|
||||
public function has(string $id);
|
||||
|
||||
/**
|
||||
* Check for whether or not a service has been initialized.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
* @return bool true if the service has been initialized, false otherwise
|
||||
* @return bool
|
||||
*/
|
||||
public function initialized($id);
|
||||
public function initialized(string $id);
|
||||
|
||||
/**
|
||||
* Gets a parameter.
|
||||
*
|
||||
* @param string $name The parameter name
|
||||
*
|
||||
* @return mixed The parameter value
|
||||
* @return array|bool|string|int|float|\UnitEnum|null
|
||||
*
|
||||
* @throws InvalidArgumentException if the parameter is not defined
|
||||
*/
|
||||
public function getParameter($name);
|
||||
public function getParameter(string $name);
|
||||
|
||||
/**
|
||||
* Checks if a parameter exists.
|
||||
*
|
||||
* @param string $name The parameter name
|
||||
*
|
||||
* @return bool The presence of parameter in container
|
||||
* @return bool
|
||||
*/
|
||||
public function hasParameter($name);
|
||||
public function hasParameter(string $name);
|
||||
|
||||
/**
|
||||
* Sets a parameter.
|
||||
*
|
||||
* @param string $name The parameter name
|
||||
* @param mixed $value The parameter value
|
||||
* @param string $name The parameter name
|
||||
* @param array|bool|string|int|float|\UnitEnum|null $value The parameter value
|
||||
*/
|
||||
public function setParameter($name, $value);
|
||||
public function setParameter(string $name, $value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user