mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 20:18:52 +02:00
N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)
* Update Symfony lib to version ~6.4.0 * Update code missing return type * Add an iTop general configuration entry to store application secret (Symfony mandatory parameter) * Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
namespace Symfony\Component\DependencyInjection;
|
||||
|
||||
use Psr\Container\ContainerInterface as PsrContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
|
||||
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
|
||||
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||
|
||||
@@ -31,54 +31,42 @@ interface ContainerInterface extends PsrContainerInterface
|
||||
public const IGNORE_ON_UNINITIALIZED_REFERENCE = 4;
|
||||
|
||||
/**
|
||||
* Sets a service.
|
||||
* @return void
|
||||
*/
|
||||
public function set(string $id, ?object $service);
|
||||
|
||||
/**
|
||||
* Gets a service.
|
||||
* @template B of self::*_REFERENCE
|
||||
*
|
||||
* @param string $id The service identifier
|
||||
* @param int $invalidBehavior The behavior when the service does not exist
|
||||
* @param B $invalidBehavior
|
||||
*
|
||||
* @return object|null
|
||||
* @psalm-return (B is self::EXCEPTION_ON_INVALID_REFERENCE|self::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE ? object : object|null)
|
||||
*
|
||||
* @throws ServiceCircularReferenceException When a circular reference is detected
|
||||
* @throws ServiceNotFoundException When the service is not defined
|
||||
*
|
||||
* @see Reference
|
||||
*/
|
||||
public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
|
||||
public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE): ?object;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function has(string $id);
|
||||
public function has(string $id): bool;
|
||||
|
||||
/**
|
||||
* Check for whether or not a service has been initialized.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function initialized(string $id);
|
||||
public function initialized(string $id): bool;
|
||||
|
||||
/**
|
||||
* @return array|bool|string|int|float|\UnitEnum|null
|
||||
*
|
||||
* @throws InvalidArgumentException if the parameter is not defined
|
||||
* @throws ParameterNotFoundException if the parameter is not defined
|
||||
*/
|
||||
public function getParameter(string $name);
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasParameter(string $name);
|
||||
public function hasParameter(string $name): bool;
|
||||
|
||||
/**
|
||||
* Sets a parameter.
|
||||
*
|
||||
* @param string $name The parameter name
|
||||
* @param array|bool|string|int|float|\UnitEnum|null $value The parameter value
|
||||
* @return void
|
||||
*/
|
||||
public function setParameter(string $name, $value);
|
||||
public function setParameter(string $name, array|bool|string|int|float|\UnitEnum|null $value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user