mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +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:
@@ -26,10 +26,10 @@ use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
*/
|
||||
abstract class Extension implements ExtensionInterface, ConfigurationExtensionInterface
|
||||
{
|
||||
private $processedConfigs = [];
|
||||
private array $processedConfigs = [];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return string|false
|
||||
*/
|
||||
public function getXsdValidationBasePath()
|
||||
{
|
||||
@@ -37,7 +37,7 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return string
|
||||
*/
|
||||
public function getNamespace()
|
||||
{
|
||||
@@ -60,11 +60,9 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
|
||||
*
|
||||
* This can be overridden in a sub-class to specify the alias manually.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws BadMethodCallException When the extension name does not follow conventions
|
||||
*/
|
||||
public function getAlias()
|
||||
public function getAlias(): string
|
||||
{
|
||||
$className = static::class;
|
||||
if (!str_ends_with($className, 'Extension')) {
|
||||
@@ -76,7 +74,7 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return ConfigurationInterface|null
|
||||
*/
|
||||
public function getConfiguration(array $config, ContainerBuilder $container)
|
||||
{
|
||||
@@ -124,11 +122,9 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @throws InvalidArgumentException When the config is not enableable
|
||||
*/
|
||||
protected function isConfigEnabled(ContainerBuilder $container, array $config)
|
||||
protected function isConfigEnabled(ContainerBuilder $container, array $config): bool
|
||||
{
|
||||
if (!\array_key_exists('enabled', $config)) {
|
||||
throw new InvalidArgumentException("The config array has no 'enabled' key.");
|
||||
|
||||
Reference in New Issue
Block a user