mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58: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:
@@ -23,10 +23,10 @@ class CollectionConfigurator
|
||||
use Traits\HostTrait;
|
||||
use Traits\RouteTrait;
|
||||
|
||||
private $parent;
|
||||
private $parentConfigurator;
|
||||
private $parentPrefixes;
|
||||
private $host;
|
||||
private RouteCollection $parent;
|
||||
private ?CollectionConfigurator $parentConfigurator;
|
||||
private ?array $parentPrefixes;
|
||||
private string|array|null $host = null;
|
||||
|
||||
public function __construct(RouteCollection $parent, string $name, self $parentConfigurator = null, array $parentPrefixes = null)
|
||||
{
|
||||
@@ -38,14 +38,14 @@ class CollectionConfigurator
|
||||
$this->parentPrefixes = $parentPrefixes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function __sleep()
|
||||
public function __sleep(): array
|
||||
{
|
||||
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function __wakeup()
|
||||
{
|
||||
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
|
||||
@@ -78,7 +78,7 @@ class CollectionConfigurator
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function prefix($prefix): self
|
||||
final public function prefix(string|array $prefix): static
|
||||
{
|
||||
if (\is_array($prefix)) {
|
||||
if (null === $this->parentPrefixes) {
|
||||
@@ -111,13 +111,16 @@ class CollectionConfigurator
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
final public function host($host): self
|
||||
final public function host(string|array $host): static
|
||||
{
|
||||
$this->host = $host;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method overrides the one from LocalizedRouteTrait.
|
||||
*/
|
||||
private function createRoute(string $path): Route
|
||||
{
|
||||
return (clone $this->route)->setPath($path);
|
||||
|
||||
Reference in New Issue
Block a user