a
// prevent embedded imports from nesting multiple exceptions
if ($e instanceof LoaderLoadException) {
throw $e;
}
throw new LoaderLoadException($resource, $sourceResource, 0, $e, $type);
}
}
return null;
}
if ($isSubpath) {
return isset($ret[1]) ? $ret : ($ret[0] ?? null);
}
}
return $this->doImport($resource, $type, $ignoreErrors, $sourceResource);
}
/**
* @internal
*/
} elseif (!\is_bool($ignoreErrors)) {
throw new \TypeError(sprintf('Invalid argument $ignoreErrors provided to "%s::import()": boolean or "not_found" expected, "%s" given.', static::class, get_debug_type($ignoreErrors)));
}
try {
return parent::import(...$args);
} catch (LoaderLoadException $e) {
if (!$ignoreNotFound || !($prev = $e->getPrevious()) instanceof FileLocatorFileNotFoundException) {
throw $e;
}
* {@inheritdoc}
*/
public function load($resource, string $type = null)
{
foreach ($this->glob($resource, false, $globResource) as $path => $info) {
$this->import($path);
}
$this->container->addResource($globResource);
return null;
{
if (false === $loader = $this->resolver->resolve($resource, $type)) {
throw new LoaderLoadException($resource, null, 0, null, $type);
}
return $loader->load($resource, $type);
}
/**
* {@inheritdoc}
*/
}
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader)
{
$confDir = $this->getProjectDir().'/app/config/eccube';
$loader->load($confDir.'/services'.self::CONFIG_EXTS, 'glob');
$loader->load($confDir.'/packages/*'.self::CONFIG_EXTS, 'glob');
if (is_dir($confDir.'/packages/'.$this->environment)) {
$loader->load($confDir.'/packages/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob');
}
$loader->load($confDir.'/services_'.$this->environment.self::CONFIG_EXTS, 'glob');
$configureContainer = new \ReflectionMethod($this, 'configureContainer');
$configuratorClass = $configureContainer->getNumberOfParameters() > 0 && ($type = $configureContainer->getParameters()[0]->getType()) instanceof \ReflectionNamedType && !$type->isBuiltin() ? $type->getName() : null;
if ($configuratorClass && !is_a(ContainerConfigurator::class, $configuratorClass, true)) {
$configureContainer->getClosure($this)($container, $loader);
return;
}
$file = (new \ReflectionObject($this))->getFileName();
/**
* {@inheritdoc}
*/
public function load($resource, string $type = null)
{
return $resource($this->container, $this->env);
}
/**
* {@inheritdoc}
*/
{
if (false === $loader = $this->resolver->resolve($resource, $type)) {
throw new LoaderLoadException($resource, null, 0, null, $type);
}
return $loader->load($resource, $type);
}
/**
* {@inheritdoc}
*/
$kernelLoader->registerAliasesForSinglyImplementedInterfaces();
AbstractConfigurator::$valuePreProcessor = $valuePreProcessor;
}
$container->setAlias($kernelClass, 'kernel')->setPublic(true);
});
}
/**
* @internal
*/
$container = $this->getContainerBuilder();
$container->addObjectResource($this);
$this->prepareContainer($container);
if (null !== $cont = $this->registerContainerConfiguration($this->getContainerLoader($container))) {
trigger_deprecation('symfony/http-kernel', '5.3', 'Returning a ContainerBuilder from "%s::registerContainerConfiguration()" is deprecated.', get_debug_type($this));
$container->merge($cont);
}
$container->addCompilerPass(new AddAnnotatedClassesToCachePass($this));
});
}
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($trustedHosts);
* {@inheritdoc}
*/
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
if (!$this->booted) {
$container = $this->container ?? $this->preBoot();
if ($container->has('http_cache')) {
return $container->get('http_cache')->handle($request, $type, $catch);
}
}
}
}
}
$kernel = new Kernel($env, $debug);
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
$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->isInstantiable() || $r->isInterface()) {
$classes[$class] = null;
}
throw new InvalidArgumentException(sprintf('Namespace is not a valid PSR-4 prefix: "%s".', $namespace));
}
$autoconfigureAttributes = new RegisterAutoconfigureAttributesPass();
$autoconfigureAttributes = $autoconfigureAttributes->accept($prototype) ? $autoconfigureAttributes : null;
$classes = $this->findClasses($namespace, $resource, (array) $exclude, $autoconfigureAttributes);
// prepare for deep cloning
$serializedPrototype = serialize($prototype);
foreach ($classes as $class => $errorMessage) {
if (null === $errorMessage && $autoconfigureAttributes && $this->env) {
if (!\is_string($service['resource'])) {
throw new InvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in "%s". Check your YAML syntax.', $id, $file));
}
$exclude = $service['exclude'] ?? null;
$namespace = $service['namespace'] ?? $id;
$this->registerClasses($definition, $namespace, $service['resource'], $exclude);
} else {
$this->setDefinition($id, $definition);
}
}
}
$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();
}
}
// empty file
if (null === $content) {
return null;
}
$this->loadContent($content, $path);
// per-env configuration
if ($this->env && isset($content['when@'.$this->env])) {
if (!\is_array($content['when@'.$this->env])) {
throw new InvalidArgumentException(sprintf('The "when@%s" key should contain an array in "%s". Check your YAML syntax.', $this->env, $path));
}
}
self::$loading[$resource] = true;
try {
$ret = $loader->load($resource, $type);
} finally {
unset(self::$loading[$resource]);
}
return $ret;
if ($isSubpath) {
return isset($ret[1]) ? $ret : ($ret[0] ?? null);
}
}
return $this->doImport($resource, $type, $ignoreErrors, $sourceResource);
}
/**
* @internal
*/
} elseif (!\is_bool($ignoreErrors)) {
throw new \TypeError(sprintf('Invalid argument $ignoreErrors provided to "%s::import()": boolean or "not_found" expected, "%s" given.', static::class, get_debug_type($ignoreErrors)));
}
try {
return parent::import(...$args);
} catch (LoaderLoadException $e) {
if (!$ignoreNotFound || !($prev = $e->getPrevious()) instanceof FileLocatorFileNotFoundException) {
throw $e;
}
* {@inheritdoc}
*/
public function load($resource, string $type = null)
{
foreach ($this->glob($resource, false, $globResource) as $path => $info) {
$this->import($path);
}
$this->container->addResource($globResource);
return null;
{
if (false === $loader = $this->resolver->resolve($resource, $type)) {
throw new LoaderLoadException($resource, null, 0, null, $type);
}
return $loader->load($resource, $type);
}
/**
* {@inheritdoc}
*/
}
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader)
{
$confDir = $this->getProjectDir().'/app/config/eccube';
$loader->load($confDir.'/services'.self::CONFIG_EXTS, 'glob');
$loader->load($confDir.'/packages/*'.self::CONFIG_EXTS, 'glob');
if (is_dir($confDir.'/packages/'.$this->environment)) {
$loader->load($confDir.'/packages/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob');
}
$loader->load($confDir.'/services_'.$this->environment.self::CONFIG_EXTS, 'glob');
$configureContainer = new \ReflectionMethod($this, 'configureContainer');
$configuratorClass = $configureContainer->getNumberOfParameters() > 0 && ($type = $configureContainer->getParameters()[0]->getType()) instanceof \ReflectionNamedType && !$type->isBuiltin() ? $type->getName() : null;
if ($configuratorClass && !is_a(ContainerConfigurator::class, $configuratorClass, true)) {
$configureContainer->getClosure($this)($container, $loader);
return;
}
$file = (new \ReflectionObject($this))->getFileName();
/**
* {@inheritdoc}
*/
public function load($resource, string $type = null)
{
return $resource($this->container, $this->env);
}
/**
* {@inheritdoc}
*/
{
if (false === $loader = $this->resolver->resolve($resource, $type)) {
throw new LoaderLoadException($resource, null, 0, null, $type);
}
return $loader->load($resource, $type);
}
/**
* {@inheritdoc}
*/
$kernelLoader->registerAliasesForSinglyImplementedInterfaces();
AbstractConfigurator::$valuePreProcessor = $valuePreProcessor;
}
$container->setAlias($kernelClass, 'kernel')->setPublic(true);
});
}
/**
* @internal
*/
$container = $this->getContainerBuilder();
$container->addObjectResource($this);
$this->prepareContainer($container);
if (null !== $cont = $this->registerContainerConfiguration($this->getContainerLoader($container))) {
trigger_deprecation('symfony/http-kernel', '5.3', 'Returning a ContainerBuilder from "%s::registerContainerConfiguration()" is deprecated.', get_debug_type($this));
$container->merge($cont);
}
$container->addCompilerPass(new AddAnnotatedClassesToCachePass($this));
});
}
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($trustedHosts);
* {@inheritdoc}
*/
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
if (!$this->booted) {
$container = $this->container ?? $this->preBoot();
if ($container->has('http_cache')) {
return $container->get('http_cache')->handle($request, $type, $catch);
}
}
}
}
}
$kernel = new Kernel($env, $debug);
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
[2/2]
LoaderLoadException
|
---|
Symfony\Component\Config\Exception\LoaderLoadException: Expected to find class "Plugin\NZCustompg\Controller\Admin\FieldController" in file "/home/noie373zam/public_html/noiezam-ec/app/Plugin/NZCustompg/Controller/Admin/FieldController.php" while importing services from resource "../../../app/Plugin/*", but it was not found! Check the namespace prefix used with the resource in /home/noie373zam/public_html/noiezam-ec/app/config/eccube/services.yaml (which is loaded in resource "/home/noie373zam/public_html/noiezam-ec/app/config/eccube/services.yaml"). at /home/noie373zam/public_html/noiezam-ec/vendor/symfony/config/Loader/FileLoader.php:174 at Symfony\Component\Config\Loader\FileLoader->doImport() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/config/Loader/FileLoader.php:98) at Symfony\Component\Config\Loader\FileLoader->import() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/FileLoader.php:66) at Symfony\Component\DependencyInjection\Loader\FileLoader->import() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php:27) at Symfony\Component\DependencyInjection\Loader\GlobFileLoader->load() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/config/Loader/DelegatingLoader.php:40) at Symfony\Component\Config\Loader\DelegatingLoader->load() (/home/noie373zam/public_html/noiezam-ec/src/Eccube/Kernel.php:150) at Eccube\Kernel->configureContainer() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:171) at Eccube\Kernel->Symfony\Bundle\FrameworkBundle\Kernel\{closure}() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/ClosureLoader.php:39) at Symfony\Component\DependencyInjection\Loader\ClosureLoader->load() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/config/Loader/DelegatingLoader.php:40) at Symfony\Component\Config\Loader\DelegatingLoader->load() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:196) at Eccube\Kernel->registerContainerConfiguration() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/http-kernel/Kernel.php:649) at Symfony\Component\HttpKernel\Kernel->buildContainer() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/http-kernel/Kernel.php:545) at Symfony\Component\HttpKernel\Kernel->initializeContainer() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/http-kernel/Kernel.php:787) at Symfony\Component\HttpKernel\Kernel->preBoot() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/http-kernel/Kernel.php:190) at Symfony\Component\HttpKernel\Kernel->handle() (/home/noie373zam/public_html/noiezam-ec/index.php:83) |
[1/2]
InvalidArgumentException
|
---|
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: Expected to find class "Plugin\NZCustompg\Controller\Admin\FieldController" in file "/home/noie373zam/public_html/noiezam-ec/app/Plugin/NZCustompg/Controller/Admin/FieldController.php" while importing services from resource "../../../app/Plugin/*", but it was not found! Check the namespace prefix used with the resource. at /home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/FileLoader.php:224 at Symfony\Component\DependencyInjection\Loader\FileLoader->findClasses() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/FileLoader.php:105) at Symfony\Component\DependencyInjection\Loader\FileLoader->registerClasses() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:699) at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinition() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:256) at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinitions() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:176) at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->loadContent() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:132) at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->load() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/config/Loader/FileLoader.php:159) at Symfony\Component\Config\Loader\FileLoader->doImport() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/config/Loader/FileLoader.php:98) at Symfony\Component\Config\Loader\FileLoader->import() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/FileLoader.php:66) at Symfony\Component\DependencyInjection\Loader\FileLoader->import() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php:27) at Symfony\Component\DependencyInjection\Loader\GlobFileLoader->load() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/config/Loader/DelegatingLoader.php:40) at Symfony\Component\Config\Loader\DelegatingLoader->load() (/home/noie373zam/public_html/noiezam-ec/src/Eccube/Kernel.php:150) at Eccube\Kernel->configureContainer() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:171) at Eccube\Kernel->Symfony\Bundle\FrameworkBundle\Kernel\{closure}() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/dependency-injection/Loader/ClosureLoader.php:39) at Symfony\Component\DependencyInjection\Loader\ClosureLoader->load() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/config/Loader/DelegatingLoader.php:40) at Symfony\Component\Config\Loader\DelegatingLoader->load() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:196) at Eccube\Kernel->registerContainerConfiguration() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/http-kernel/Kernel.php:649) at Symfony\Component\HttpKernel\Kernel->buildContainer() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/http-kernel/Kernel.php:545) at Symfony\Component\HttpKernel\Kernel->initializeContainer() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/http-kernel/Kernel.php:787) at Symfony\Component\HttpKernel\Kernel->preBoot() (/home/noie373zam/public_html/noiezam-ec/vendor/symfony/http-kernel/Kernel.php:190) at Symfony\Component\HttpKernel\Kernel->handle() (/home/noie373zam/public_html/noiezam-ec/index.php:83) |