Update dependencies

This commit is contained in:
Chris Hunt
2024-02-16 21:36:54 +00:00
parent 22d7a59e59
commit d52ae0d3c3
9569 changed files with 460443 additions and 282416 deletions

View File

@@ -23,12 +23,12 @@ 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)
public function __construct(RouteCollection $parent, string $name, ?self $parentConfigurator = null, ?array $parentPrefixes = null)
{
$this->parent = $parent;
$this->name = $name;
@@ -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);