=: cannot open `=' (No such file or directory) =: cannot open `=' (No such file or directory)
// prevent embedded imports from nesting multiple exceptions if ($e instanceof LoaderLoadException) { throw $e; } throw new LoaderLoadException($resource, $sourceResource, 0, $e, $type); } } return null; } } $ret = []; $isSubpath = 0 !== $i && str_contains(substr($resource, 0, $i), '/'); foreach ($this->glob($resource, false, $_, $ignoreErrors || !$isSubpath, false, $excluded) as $path => $info) { if (null !== $res = $this->doImport($path, 'glob' === $type ? null : $type, $ignoreErrors, $sourceResource)) { $ret[] = $res; } $isSubpath = true; } throw new \TypeError(\sprintf('Invalid argument $ignoreErrors provided to "%s::import()": boolean or "not_found" expected, "%s" given.', static::class, get_debug_type($ignoreErrors))); } ++$this->importing; try { return parent::import(...$args); } catch (LoaderLoadException $e) { if (!$ignoreNotFound || !($prev = $e->getPrevious()) instanceof FileLocatorFileNotFoundException) { throw $e; } } final public function import(string $resource, ?string $type = null, bool|string $ignoreErrors = false): void { $this->loader->setCurrentDir(\dirname($this->path)); $this->loader->import($resource, $type, $ignoreErrors, $this->file); } final public function parameters(): ParametersConfigurator { return new ParametersConfigurator($this->container); $container->import($configDir.'/{packages}/*.{php,yaml}'); $container->import($configDir.'/{packages}/'.$this->environment.'/*.{php,yaml}'); if (is_file($this->getConfigDir().'/services.yaml')) { $container->import($configDir.'/services.yaml'); $container->import($configDir.'/{services}_'.$this->environment.'.yaml'); } else { $container->import($configDir.'/{services}.php'); $container->import($configDir.'/{services}_'.$this->environment.'.php'); } $valuePreProcessor = AbstractConfigurator::$valuePreProcessor; AbstractConfigurator::$valuePreProcessor = fn ($value) => $this === $value ? new Reference('kernel') : $value; try { $configureContainer->getClosure($this)(new ContainerConfigurator($container, $kernelLoader, $instanceof, $file, $file, $this->getEnvironment()), $loader, $container); } finally { $instanceof = []; $kernelLoader->registerAliasesForSinglyImplementedInterfaces(); AbstractConfigurator::$valuePreProcessor = $valuePreProcessor; } parent::__construct($env); } public function load(mixed $resource, ?string $type = null): mixed { return $resource($this->container, $this->env); } public function supports(mixed $resource, ?string $type = null): bool { return $resource instanceof \Closure; { if (false === $loader = $this->resolver->resolve($resource, $type)) { throw new LoaderLoadException($resource, null, 0, null, $type); } return $loader->load($resource, $type); } public function supports(mixed $resource, ?string $type = null): bool { return false !== $this->resolver->resolve($resource, $type); } } public function registerContainerConfiguration(LoaderInterface $loader): void { $loader->load(function (ContainerBuilder $container) use ($loader) { $container->loadFromExtension('framework', [ 'router' => [ 'resource' => 'kernel::loadRoutes', 'type' => 'service', ], } $container = $this->getContainerBuilder(); $container->addObjectResource($this); $this->prepareContainer($container); $this->registerContainerConfiguration($this->getContainerLoader($container)); return $container; } /** }); } try { $container = null; $container = $this->buildContainer(); $container->compile(); } finally { if ($collectDeprecations) { restore_error_handler(); $_ENV['SHELL_VERBOSITY'] = 3; $_SERVER['SHELL_VERBOSITY'] = 3; } $this->initializeBundles(); $this->initializeContainer(); $container = $this->container; if ($container->hasParameter('kernel.trusted_hosts') && $trustedHosts = $container->getParameter('kernel.trusted_hosts')) { Request::setTrustedHosts(\is_array($trustedHosts) ? $trustedHosts : preg_split('/\s*+,\s*+(?![^{]*})/', $trustedHosts)); } public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response { if (!$this->booted) { $container = $this->container ?? $this->preBoot(); if ($container->has('http_cache')) { $this->handlingHttpCache = true; try { ) { } public function run(): int { $response = $this->kernel->handle($this->request); if (Kernel::VERSION_ID >= 60400) { $response->send(false); if (\function_exists('fastcgi_finish_request') && !$this->debug) {$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);}; $classes[$class] = $e->getMessage(); continue; } // check to make sure the expected class exists if (!$r) { throw new InvalidArgumentException(\sprintf('Expected to find class "%s" in file "%s" while importing services from resource "%s", but it was not found! Check the namespace prefix used with the resource.', $class, $path, $pattern)); } if (!$r->isTrait()) { $classes[$class] = null; } throw new InvalidArgumentException('The exclude list must not contain an empty value.'); } $autoconfigureAttributes = new RegisterAutoconfigureAttributesPass(); $autoconfigureAttributes = $autoconfigureAttributes->accept($prototype) ? $autoconfigureAttributes : null; $classes = $this->findClasses($namespace, $resource, (array) $exclude, $source); $getPrototype = static fn () => clone $prototype; $serialized = serialize($prototype); // avoid deep cloning if no definitions are nested if (!\is_string($service['resource'])) { throw new InvalidArgumentException(\sprintf('A "resource" attribute must be of type string for service "%s" in "%s".', $id, $file)); } $exclude = $service['exclude'] ?? null; $namespace = $service['namespace'] ?? $id; $this->registerClasses($definition, $namespace, $service['resource'], $exclude, $file); } else { $this->setDefinition($id, $definition); } return null; } $this->isLoadingInstanceof = false; $defaults = $this->parseDefaults($content, $file); foreach ($content['services'] as $id => $service) { $this->parseDefinition($id, $service, $file, $defaults, false, $trackBindings); } } /** * @throws InvalidArgumentException // services $this->anonymousServicesCount = 0; $this->anonymousServicesSuffix = '~'.ContainerBuilder::hash($path); $this->setCurrentDir(\dirname($path)); try { $this->parseDefinitions($content, $path); } finally { $this->instanceof = []; $this->registerAliasesForSinglyImplementedInterfaces(); } } return null; } ++$this->importing; try { $this->loadContent($content, $path); // per-env configuration if ($this->env && isset($content[$when = 'when@'.$this->env])) { if (!\is_array($content[$when])) { throw new InvalidArgumentException(\sprintf('The "%s" key should contain an array in "%s".', $when, $path)); } } self::$loading[$resource] = true; try { $ret = $loader->load($resource, $type); } finally { unset(self::$loading[$resource]); } return $ret; } $ret = []; $isSubpath = 0 !== $i && str_contains(substr($resource, 0, $i), '/'); foreach ($this->glob($resource, false, $_, $ignoreErrors || !$isSubpath, false, $excluded) as $path => $info) { if (null !== $res = $this->doImport($path, 'glob' === $type ? null : $type, $ignoreErrors, $sourceResource)) { $ret[] = $res; } $isSubpath = true; } throw new \TypeError(\sprintf('Invalid argument $ignoreErrors provided to "%s::import()": boolean or "not_found" expected, "%s" given.', static::class, get_debug_type($ignoreErrors))); } ++$this->importing; try { return parent::import(...$args); } catch (LoaderLoadException $e) { if (!$ignoreNotFound || !($prev = $e->getPrevious()) instanceof FileLocatorFileNotFoundException) { throw $e; } } final public function import(string $resource, ?string $type = null, bool|string $ignoreErrors = false): void { $this->loader->setCurrentDir(\dirname($this->path)); $this->loader->import($resource, $type, $ignoreErrors, $this->file); } final public function parameters(): ParametersConfigurator { return new ParametersConfigurator($this->container); $container->import($configDir.'/{packages}/*.{php,yaml}'); $container->import($configDir.'/{packages}/'.$this->environment.'/*.{php,yaml}'); if (is_file($this->getConfigDir().'/services.yaml')) { $container->import($configDir.'/services.yaml'); $container->import($configDir.'/{services}_'.$this->environment.'.yaml'); } else { $container->import($configDir.'/{services}.php'); $container->import($configDir.'/{services}_'.$this->environment.'.php'); } $valuePreProcessor = AbstractConfigurator::$valuePreProcessor; AbstractConfigurator::$valuePreProcessor = fn ($value) => $this === $value ? new Reference('kernel') : $value; try { $configureContainer->getClosure($this)(new ContainerConfigurator($container, $kernelLoader, $instanceof, $file, $file, $this->getEnvironment()), $loader, $container); } finally { $instanceof = []; $kernelLoader->registerAliasesForSinglyImplementedInterfaces(); AbstractConfigurator::$valuePreProcessor = $valuePreProcessor; } parent::__construct($env); } public function load(mixed $resource, ?string $type = null): mixed { return $resource($this->container, $this->env); } public function supports(mixed $resource, ?string $type = null): bool { return $resource instanceof \Closure; { if (false === $loader = $this->resolver->resolve($resource, $type)) { throw new LoaderLoadException($resource, null, 0, null, $type); } return $loader->load($resource, $type); } public function supports(mixed $resource, ?string $type = null): bool { return false !== $this->resolver->resolve($resource, $type); } } public function registerContainerConfiguration(LoaderInterface $loader): void { $loader->load(function (ContainerBuilder $container) use ($loader) { $container->loadFromExtension('framework', [ 'router' => [ 'resource' => 'kernel::loadRoutes', 'type' => 'service', ], } $container = $this->getContainerBuilder(); $container->addObjectResource($this); $this->prepareContainer($container); $this->registerContainerConfiguration($this->getContainerLoader($container)); return $container; } /** }); } try { $container = null; $container = $this->buildContainer(); $container->compile(); } finally { if ($collectDeprecations) { restore_error_handler(); $_ENV['SHELL_VERBOSITY'] = 3; $_SERVER['SHELL_VERBOSITY'] = 3; } $this->initializeBundles(); $this->initializeContainer(); $container = $this->container; if ($container->hasParameter('kernel.trusted_hosts') && $trustedHosts = $container->getParameter('kernel.trusted_hosts')) { Request::setTrustedHosts(\is_array($trustedHosts) ? $trustedHosts : preg_split('/\s*+,\s*+(?![^{]*})/', $trustedHosts)); } public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response { if (!$this->booted) { $container = $this->container ?? $this->preBoot(); if ($container->has('http_cache')) { $this->handlingHttpCache = true; try { ) { } public function run(): int { $response = $this->kernel->handle($this->request); if (Kernel::VERSION_ID >= 60400) { $response->send(false); if (\function_exists('fastcgi_finish_request') && !$this->debug) {$app = $app(...$args);exit( $runtime ->getRunner($app) ->run());<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};|
[2/2]
LoaderLoadException
|
|---|
Symfony\Component\Config\Exception\LoaderLoadException:
Expected to find class "App\Form\LessonType" in file "/www/htdocs/w0195fef/projects/sb/src/Form/LessonType.php" while importing services from resource "../src/", but it was not found! Check the namespace prefix used with the resource in /www/htdocs/w0195fef/projects/sb/config/services.yaml (which is being imported from "/www/htdocs/w0195fef/projects/sb/src/Kernel.php").
at /www/htdocs/w0195fef/projects/sb/vendor/symfony/config/Loader/FileLoader.php:177
at Symfony\Component\Config\Loader\FileLoader->doImport('/www/htdocs/w0195fef/projects/sb/config/services.yaml', null, false, '/www/htdocs/w0195fef/projects/sb/src/Kernel.php')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/config/Loader/FileLoader.php:82)
at Symfony\Component\Config\Loader\FileLoader->import('/www/htdocs/w0195fef/projects/sb/{config}/services.yaml', null, false, '/www/htdocs/w0195fef/projects/sb/src/Kernel.php')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/FileLoader.php:78)
at Symfony\Component\DependencyInjection\Loader\FileLoader->import('/www/htdocs/w0195fef/projects/sb/{config}/services.yaml', null, false, '/www/htdocs/w0195fef/projects/sb/src/Kernel.php')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php:67)
at Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator->import('/www/htdocs/w0195fef/projects/sb/{config}/services.yaml')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:58)
at App\Kernel->configureContainer(object(ContainerConfigurator), object(DelegatingLoader), object(ContainerBuilder))
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:208)
at App\Kernel->{closure:Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait::registerContainerConfiguration():164}(object(ContainerBuilder), 'prod')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/ClosureLoader.php:35)
at Symfony\Component\DependencyInjection\Loader\ClosureLoader->load(object(Closure), null)
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/config/Loader/DelegatingLoader.php:37)
at Symfony\Component\Config\Loader\DelegatingLoader->load(object(Closure))
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:164)
at App\Kernel->registerContainerConfiguration(object(DelegatingLoader))
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/http-kernel/Kernel.php:600)
at Symfony\Component\HttpKernel\Kernel->buildContainer()
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/http-kernel/Kernel.php:487)
at Symfony\Component\HttpKernel\Kernel->initializeContainer()
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/http-kernel/Kernel.php:732)
at Symfony\Component\HttpKernel\Kernel->preBoot()
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/http-kernel/Kernel.php:170)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(/www/htdocs/w0195fef/projects/sb/vendor/autoload_runtime.php:32)
at require_once('/www/htdocs/w0195fef/projects/sb/vendor/autoload_runtime.php')
(/www/htdocs/w0195fef/projects/sb/public/index.php:5)
|
|
[1/2]
InvalidArgumentException
|
|---|
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException:
Expected to find class "App\Form\LessonType" in file "/www/htdocs/w0195fef/projects/sb/src/Form/LessonType.php" while importing services from resource "../src/", but it was not found! Check the namespace prefix used with the resource.
at /www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/FileLoader.php:369
at Symfony\Component\DependencyInjection\Loader\FileLoader->findClasses('App\\', '../src/', array('../src/DependencyInjection/', '../src/Entity/', '../src/Kernel.php', '../src/Controller/_dup_backup/', '../src/Controller/_legacy/'), '/www/htdocs/w0195fef/projects/sb/config/services.yaml')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/FileLoader.php:129)
at Symfony\Component\DependencyInjection\Loader\FileLoader->registerClasses(object(Definition), 'App\\', '../src/', array('../src/DependencyInjection/', '../src/Entity/', '../src/Kernel.php', '../src/Controller/_dup_backup/', '../src/Controller/_legacy/'), '/www/htdocs/w0195fef/projects/sb/config/services.yaml')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:714)
at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinition('App\\', array('resource' => '../src/', 'exclude' => array('../src/DependencyInjection/', '../src/Entity/', '../src/Kernel.php', '../src/Controller/_dup_backup/', '../src/Controller/_legacy/')), '/www/htdocs/w0195fef/projects/sb/config/services.yaml', array('autowire' => true, 'autoconfigure' => true), false, true)
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:257)
at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinitions(array('parameters' => null, 'services' => array('App\' => array('resource' => '../src/', 'exclude' => array('../src/DependencyInjection/', '../src/Entity/', '../src/Kernel.php', '../src/Controller/_dup_backup/', '../src/Controller/_legacy/')), 'App\Command\ValidateLessonImportCommand' => array('arguments' => array('$projectDir' => '%kernel.project_dir%')), 'App\Service\CryptoService' => array('arguments' => array('$appSecret' => '%env(APP_SECRET)%')), 'App\Service\GDPRService' => array('arguments' => array('$em' => '@doctrine.orm.entity_manager', '$security' => '@security.helper')))), '/www/htdocs/w0195fef/projects/sb/config/services.yaml')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:180)
at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->loadContent(array('parameters' => null, 'services' => array('_defaults' => array('autowire' => true, 'autoconfigure' => true), 'App\' => array('resource' => '../src/', 'exclude' => array('../src/DependencyInjection/', '../src/Entity/', '../src/Kernel.php', '../src/Controller/_dup_backup/', '../src/Controller/_legacy/')), 'App\Command\ValidateLessonImportCommand' => array('arguments' => array('$projectDir' => '%kernel.project_dir%')), 'App\Service\CryptoService' => array('arguments' => array('$appSecret' => '%env(APP_SECRET)%')), 'App\Service\GDPRService' => array('arguments' => array('$em' => '@doctrine.orm.entity_manager', '$security' => '@security.helper')))), '/www/htdocs/w0195fef/projects/sb/config/services.yaml')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:138)
at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->load('/www/htdocs/w0195fef/projects/sb/config/services.yaml', null)
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/config/Loader/FileLoader.php:162)
at Symfony\Component\Config\Loader\FileLoader->doImport('/www/htdocs/w0195fef/projects/sb/config/services.yaml', null, false, '/www/htdocs/w0195fef/projects/sb/src/Kernel.php')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/config/Loader/FileLoader.php:82)
at Symfony\Component\Config\Loader\FileLoader->import('/www/htdocs/w0195fef/projects/sb/{config}/services.yaml', null, false, '/www/htdocs/w0195fef/projects/sb/src/Kernel.php')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/FileLoader.php:78)
at Symfony\Component\DependencyInjection\Loader\FileLoader->import('/www/htdocs/w0195fef/projects/sb/{config}/services.yaml', null, false, '/www/htdocs/w0195fef/projects/sb/src/Kernel.php')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php:67)
at Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator->import('/www/htdocs/w0195fef/projects/sb/{config}/services.yaml')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:58)
at App\Kernel->configureContainer(object(ContainerConfigurator), object(DelegatingLoader), object(ContainerBuilder))
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:208)
at App\Kernel->{closure:Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait::registerContainerConfiguration():164}(object(ContainerBuilder), 'prod')
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/dependency-injection/Loader/ClosureLoader.php:35)
at Symfony\Component\DependencyInjection\Loader\ClosureLoader->load(object(Closure), null)
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/config/Loader/DelegatingLoader.php:37)
at Symfony\Component\Config\Loader\DelegatingLoader->load(object(Closure))
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:164)
at App\Kernel->registerContainerConfiguration(object(DelegatingLoader))
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/http-kernel/Kernel.php:600)
at Symfony\Component\HttpKernel\Kernel->buildContainer()
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/http-kernel/Kernel.php:487)
at Symfony\Component\HttpKernel\Kernel->initializeContainer()
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/http-kernel/Kernel.php:732)
at Symfony\Component\HttpKernel\Kernel->preBoot()
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/http-kernel/Kernel.php:170)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(/www/htdocs/w0195fef/projects/sb/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(/www/htdocs/w0195fef/projects/sb/vendor/autoload_runtime.php:32)
at require_once('/www/htdocs/w0195fef/projects/sb/vendor/autoload_runtime.php')
(/www/htdocs/w0195fef/projects/sb/public/index.php:5)
|