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:
bdalsass
2023-12-05 13:56:56 +01:00
committed by GitHub
parent 863ab4560c
commit 27ce51ab07
1392 changed files with 44869 additions and 27799 deletions

View File

@@ -20,10 +20,6 @@ use Symfony\Component\HttpKernel\Bundle\BundleInterface;
*
* It manages an environment made of application kernel and bundles.
*
* @method string getBuildDir() Returns the build directory - not implementing it is deprecated since Symfony 5.2.
* This directory should be used to store build artifacts, and can be read-only at runtime.
* Caches written at runtime should be stored in the "cache directory" ({@see KernelInterface::getCacheDir()}).
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface KernelInterface extends HttpKernelInterface
@@ -33,15 +29,19 @@ interface KernelInterface extends HttpKernelInterface
*
* @return iterable<mixed, BundleInterface>
*/
public function registerBundles();
public function registerBundles(): iterable;
/**
* Loads the container configuration.
*
* @return void
*/
public function registerContainerConfiguration(LoaderInterface $loader);
/**
* Boots the current kernel.
*
* @return void
*/
public function boot();
@@ -49,6 +49,8 @@ interface KernelInterface extends HttpKernelInterface
* Shutdowns the kernel.
*
* This method is mainly useful when doing functional testing.
*
* @return void
*/
public function shutdown();
@@ -57,16 +59,14 @@ interface KernelInterface extends HttpKernelInterface
*
* @return array<string, BundleInterface>
*/
public function getBundles();
public function getBundles(): array;
/**
* Returns a bundle.
*
* @return BundleInterface
*
* @throws \InvalidArgumentException when the bundle is not enabled
*/
public function getBundle(string $name);
public function getBundle(string $name): BundleInterface;
/**
* Returns the file path for a given bundle resource.
@@ -80,47 +80,35 @@ interface KernelInterface extends HttpKernelInterface
* where BundleName is the name of the bundle
* and the remaining part is the relative path in the bundle.
*
* @return string
*
* @throws \InvalidArgumentException if the file cannot be found or the name is not valid
* @throws \RuntimeException if the name contains invalid/unsafe characters
*/
public function locateResource(string $name);
public function locateResource(string $name): string;
/**
* Gets the environment.
*
* @return string
*/
public function getEnvironment();
public function getEnvironment(): string;
/**
* Checks if debug mode is enabled.
*
* @return bool
*/
public function isDebug();
public function isDebug(): bool;
/**
* Gets the project dir (path of the project's composer file).
*
* @return string
*/
public function getProjectDir();
public function getProjectDir(): string;
/**
* Gets the current container.
*
* @return ContainerInterface
*/
public function getContainer();
public function getContainer(): ContainerInterface;
/**
* Gets the request start time (not available if debug is disabled).
*
* @return float
*/
public function getStartTime();
public function getStartTime(): float;
/**
* Gets the cache directory.
@@ -128,22 +116,24 @@ interface KernelInterface extends HttpKernelInterface
* Since Symfony 5.2, the cache directory should be used for caches that are written at runtime.
* For caches and artifacts that can be warmed at compile-time and deployed as read-only,
* use the new "build directory" returned by the {@see getBuildDir()} method.
*
* @return string
*/
public function getCacheDir();
public function getCacheDir(): string;
/**
* Returns the build directory.
*
* This directory should be used to store build artifacts, and can be read-only at runtime.
* Caches written at runtime should be stored in the "cache directory" ({@see KernelInterface::getCacheDir()}).
*/
public function getBuildDir(): string;
/**
* Gets the log directory.
*
* @return string
*/
public function getLogDir();
public function getLogDir(): string;
/**
* Gets the charset of the application.
*
* @return string
*/
public function getCharset();
public function getCharset(): string;
}