Updates to vendors etc

This commit is contained in:
Chris Hunt
2025-07-11 15:57:48 +01:00
parent d972cbcd0a
commit 8fb6438254
8043 changed files with 248005 additions and 189479 deletions

View File

@@ -25,17 +25,15 @@ use Symfony\Component\Routing\RouteCollection;
*/
class AttributeFileLoader extends FileLoader
{
protected $loader;
public function __construct(FileLocatorInterface $locator, AttributeClassLoader $loader)
{
public function __construct(
FileLocatorInterface $locator,
protected AttributeClassLoader $loader,
) {
if (!\function_exists('token_get_all')) {
throw new \LogicException('The Tokenizer extension is required for the routing attribute loader.');
}
parent::__construct($locator);
$this->loader = $loader;
}
/**
@@ -65,11 +63,7 @@ class AttributeFileLoader extends FileLoader
public function supports(mixed $resource, ?string $type = null): bool
{
if ('annotation' === $type) {
trigger_deprecation('symfony/routing', '6.4', 'The "annotation" route type is deprecated, use the "attribute" route type instead.');
}
return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || \in_array($type, ['annotation', 'attribute'], true));
return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'attribute' === $type);
}
/**
@@ -82,7 +76,7 @@ class AttributeFileLoader extends FileLoader
$tokens = token_get_all(file_get_contents($file));
if (1 === \count($tokens) && \T_INLINE_HTML === $tokens[0][0]) {
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain PHP code. Did you forgot to add the "<?php" start tag at the beginning of the file?', $file));
throw new \InvalidArgumentException(\sprintf('The file "%s" does not contain PHP code. Did you forget to add the "<?php" start tag at the beginning of the file?', $file));
}
$nsTokens = [\T_NS_SEPARATOR => true, \T_STRING => true];
@@ -139,7 +133,3 @@ class AttributeFileLoader extends FileLoader
return false;
}
}
if (!class_exists(AnnotationFileLoader::class, false)) {
class_alias(AttributeFileLoader::class, AnnotationFileLoader::class);
}