mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-11 09:23:50 +09:00
Updates to vendors etc
This commit is contained in:
@@ -15,6 +15,7 @@ use Symfony\Component\Config\FileLocatorInterface;
|
||||
use Symfony\Component\Config\Loader\DirectoryAwareLoaderInterface;
|
||||
use Symfony\Component\Config\Loader\Loader;
|
||||
use Symfony\Component\Config\Resource\DirectoryResource;
|
||||
use Symfony\Component\Routing\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Routing\RouteCollection;
|
||||
|
||||
/**
|
||||
@@ -43,12 +44,16 @@ final class Psr4DirectoryLoader extends Loader implements DirectoryAwareLoaderIn
|
||||
return new RouteCollection();
|
||||
}
|
||||
|
||||
if (!preg_match('/^(?:[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+\\\)++$/', trim($resource['namespace'], '\\').'\\')) {
|
||||
throw new InvalidArgumentException(\sprintf('Namespace "%s" is not a valid PSR-4 prefix.', $resource['namespace']));
|
||||
}
|
||||
|
||||
return $this->loadFromDirectory($path, trim($resource['namespace'], '\\'));
|
||||
}
|
||||
|
||||
public function supports(mixed $resource, ?string $type = null): bool
|
||||
{
|
||||
return ('attribute' === $type || 'annotation' === $type) && \is_array($resource) && isset($resource['path'], $resource['namespace']);
|
||||
return 'attribute' === $type && \is_array($resource) && isset($resource['path'], $resource['namespace']);
|
||||
}
|
||||
|
||||
public function forDirectory(string $currentDirectory): static
|
||||
|
||||
Reference in New Issue
Block a user