Spaces:
Runtime error
Runtime error
Download symfony/dependency-injection/Compiler/ResolveClassPass.php from Alcazard/vibe-coding-api: direct link, hf CLI and curl.
- Browser
- Download file 2.27 kB
-
https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/symfony/dependency-injection/Compiler/ResolveClassPass.php
- Command line
-
hf download hf://spaces/Alcazard/vibe-coding-api/symfony/dependency-injection/Compiler/ResolveClassPass.php
-
curl -L -o ResolveClassPass.php https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/symfony/dependency-injection/Compiler/ResolveClassPass.php
2.27 kB
| /* | |
| * This file is part of the Symfony package. | |
| * | |
| * (c) Fabien Potencier <fabien@symfony.com> | |
| * | |
| * For the full copyright and license information, please view the LICENSE | |
| * file that was distributed with this source code. | |
| */ | |
| namespace Symfony\Component\DependencyInjection\Compiler; | |
| use Symfony\Component\DependencyInjection\ChildDefinition; | |
| use Symfony\Component\DependencyInjection\ContainerBuilder; | |
| use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; | |
| /** | |
| * @author Nicolas Grekas <p@tchwork.com> | |
| */ | |
| class ResolveClassPass implements CompilerPassInterface | |
| { | |
| public function process(ContainerBuilder $container): void | |
| { | |
| foreach ($container->getDefinitions() as $id => $definition) { | |
| if ($definition->isSynthetic() | |
| || $definition->hasErrors() | |
| || null !== $definition->getClass() | |
| || !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $id) | |
| ) { | |
| continue; | |
| } | |
| if ($container->getReflectionClass($id, false)) { | |
| $definition->setClass($id); | |
| continue; | |
| } | |
| if ($definition instanceof ChildDefinition) { | |
| throw new InvalidArgumentException(\sprintf('Service definition "%s" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.', $id)); | |
| } | |
| trigger_deprecation('symfony/dependency-injection', '7.4', 'Service id "%s" looks like a FQCN but no corresponding class or interface exists. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class or interface.', $id); | |
| // throw new InvalidArgumentException(\sprintf('Service id "%s" looks like a FQCN but no corresponding class or interface exists. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class or interface.'), $id); | |
| $definition->setClass($id); | |
| } | |
| } | |
| } | |