Symfony Exception

ParseError

HTTP 500 Internal Server Error

syntax error, unexpected '('

Exception

ParseError

  1. where bn.homonym = 0 and bn.common_name = 0
  2. group by b.id, bn.id
  3. having max(td.date) < :date
  4. order by bn.name        
  5. SQL;
  6.     $rsm = new (ResultSetMapping())->addScalarResult("id""type");
  7.     $query $this->_em->createNativeQuery($sql$rsm)->setParameter('date'$date->modify('first day of this month'))->setFirstResult($firstResult)->setMaxResults($pageSize)->getQuery();
  8.         $paginator = new Paginator($querytrue);
  9.         return $paginator;
  10.     }
in /var/www/prod2021/vendor/composer/ClassLoader.php Composer\Autoload\includeFile (line 346)
  1.      * @return bool|null True if loaded, null otherwise
  2.      */
  3.     public function loadClass($class)
  4.     {
  5.         if ($file $this->findFile($class)) {
  6.             includeFile($file);
  7.             return true;
  8.         }
  9.     }
  1.                     return;
  2.                 } elseif (false === include $file) {
  3.                     return;
  4.                 }
  5.             } else {
  6.                 ($this->classLoader)($class);
  7.                 $file '';
  8.             }
  9.         } finally {
  10.             error_reporting($e);
  11.         }
DebugClassLoader->loadClass()
spl_autoload_call()
  1.             }
  2.             $autoloadedClass self::$autoloadedClass;
  3.             self::$autoloadedClass ltrim($this->resource'\\');
  4.             try {
  5.                 $exists[0] = class_exists($this->resource) || interface_exists($this->resourcefalse) || trait_exists($this->resourcefalse);
  6.             } catch (\Exception $e) {
  7.                 $exists[1] = $e->getMessage();
  8.                 try {
  9.                     self::throwOnRequiredClass($this->resource$e);
  1.         try {
  2.             if (isset($this->classReflectors[$class])) {
  3.                 $classReflector $this->classReflectors[$class];
  4.             } elseif (class_exists(ClassExistenceResource::class)) {
  5.                 $resource = new ClassExistenceResource($classfalse);
  6.                 $classReflector $resource->isFresh(0) ? false : new \ReflectionClass($class);
  7.             } else {
  8.                 $classReflector class_exists($class) ? new \ReflectionClass($class) : false;
  9.             }
  10.         } catch (\ReflectionException $e) {
  11.             if ($throw) {
  1.             if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)*+$/'$class)) {
  2.                 continue;
  3.             }
  4.             try {
  5.                 $r $this->container->getReflectionClass($class);
  6.             } catch (\ReflectionException $e) {
  7.                 $classes[$class] = $e->getMessage();
  8.                 continue;
  9.             }
  10.             // check to make sure the expected class exists
  1.         }
  2.         if (!preg_match('/^(?:[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+\\\\)++$/'$namespace)) {
  3.             throw new InvalidArgumentException(sprintf('Namespace is not a valid PSR-4 prefix: "%s".'$namespace));
  4.         }
  5.         $classes $this->findClasses($namespace$resource, (array) $exclude);
  6.         // prepare for deep cloning
  7.         $serializedPrototype serialize($prototype);
  8.         foreach ($classes as $class => $errorMessage) {
  9.             if (interface_exists($classfalse)) {
  1.             if (!\is_string($service['resource'])) {
  2.                 throw new InvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in "%s". Check your YAML syntax.'$id$file));
  3.             }
  4.             $exclude $service['exclude'] ?? null;
  5.             $namespace $service['namespace'] ?? $id;
  6.             $this->registerClasses($definition$namespace$service['resource'], $exclude);
  7.         } else {
  8.             $this->setDefinition($id$definition);
  9.         }
  10.     }
  1.         }
  2.         $this->isLoadingInstanceof false;
  3.         $defaults $this->parseDefaults($content$file);
  4.         foreach ($content['services'] as $id => $service) {
  5.             $this->parseDefinition($id$service$file$defaults);
  6.         }
  7.     }
  8.     /**
  9.      * @throws InvalidArgumentException
  1.         // services
  2.         $this->anonymousServicesCount 0;
  3.         $this->anonymousServicesSuffix '~'.ContainerBuilder::hash($path);
  4.         $this->setCurrentDir(\dirname($path));
  5.         try {
  6.             $this->parseDefinitions($content$path);
  7.         } finally {
  8.             $this->instanceof = [];
  9.             $this->registerAliasesForSinglyImplementedInterfaces();
  10.         }
  11.     }
  1.                 }
  2.             }
  3.             self::$loading[$resource] = true;
  4.             try {
  5.                 $ret $loader->load($resource$type);
  6.             } finally {
  7.                 unset(self::$loading[$resource]);
  8.             }
  9.             return $ret;
  1.             if ($isSubpath) {
  2.                 return isset($ret[1]) ? $ret : ($ret[0] ?? null);
  3.             }
  4.         }
  5.         return $this->doImport($resource$type$ignoreErrors$sourceResource);
  6.     }
  7.     /**
  8.      * @internal
  9.      */
  1.         } elseif (!\is_bool($ignoreErrors)) {
  2.             throw new \TypeError(sprintf('Invalid argument $ignoreErrors provided to "%s::import()": boolean or "not_found" expected, "%s" given.', static::class, get_debug_type($ignoreErrors)));
  3.         }
  4.         try {
  5.             parent::import(...$args);
  6.         } catch (LoaderLoadException $e) {
  7.             if (!$ignoreNotFound || !($prev $e->getPrevious()) instanceof FileLocatorFileNotFoundException) {
  8.                 throw $e;
  9.             }
  1.     }
  2.     final public function import(string $resourcestring $type null$ignoreErrors false)
  3.     {
  4.         $this->loader->setCurrentDir(\dirname($this->path));
  5.         $this->loader->import($resource$type$ignoreErrors$this->file);
  6.     }
  7.     final public function parameters(): ParametersConfigurator
  8.     {
  9.         return new ParametersConfigurator($this->container);
ContainerConfigurator->import() in /var/www/prod2021/src/Kernel.php (line 20)
  1.     {
  2.         $container->import('../config/{packages}/*.yaml');
  3.         $container->import('../config/{packages}/'.$this->environment.'/*.yaml');
  4.         if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
  5.             $container->import('../config/services.yaml');
  6.             $container->import('../config/{services}_'.$this->environment.'.yaml');
  7.         } elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
  8.             (require $path)($container->withPath($path), $this);
  9.         }
  10.     }
  1.             AbstractConfigurator::$valuePreProcessor = function ($value) {
  2.                 return $this === $value ? new Reference('kernel') : $value;
  3.             };
  4.             try {
  5.                 $this->configureContainer(new ContainerConfigurator($container$kernelLoader$instanceof$file$file), $loader);
  6.             } finally {
  7.                 $instanceof = [];
  8.                 $kernelLoader->registerAliasesForSinglyImplementedInterfaces();
  9.                 AbstractConfigurator::$valuePreProcessor $valuePreProcessor;
  10.             }
in /var/www/prod2021/vendor/symfony/dependency-injection/Loader/ClosureLoader.php -> Symfony\Bundle\FrameworkBundle\Kernel\{closure} (line 38)
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function load($resourcestring $type null)
  5.     {
  6.         $resource($this->container);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.     {
  2.         if (false === $loader $this->resolver->resolve($resource$type)) {
  3.             throw new LoaderLoadException($resourcenull0null$type);
  4.         }
  5.         return $loader->load($resource$type);
  6.     }
  7.     /**
  8.      * {@inheritdoc}
  9.      */
  1.                 $kernelLoader->registerAliasesForSinglyImplementedInterfaces();
  2.                 AbstractConfigurator::$valuePreProcessor $valuePreProcessor;
  3.             }
  4.             $container->setAlias($kernelClass'kernel')->setPublic(true);
  5.         });
  6.     }
  7.     /**
  8.      * @internal
  9.      *
in /var/www/prod2021/vendor/symfony/http-kernel/Kernel.php -> registerContainerConfiguration (line 644)
  1.         $container $this->getContainerBuilder();
  2.         $container->addObjectResource($this);
  3.         $this->prepareContainer($container);
  4.         if (null !== $cont $this->registerContainerConfiguration($this->getContainerLoader($container))) {
  5.             $container->merge($cont);
  6.         }
  7.         $container->addCompilerPass(new AddAnnotatedClassesToCachePass($this));
  1.             });
  2.         }
  3.         try {
  4.             $container null;
  5.             $container $this->buildContainer();
  6.             $container->compile();
  7.         } finally {
  8.             if ($collectDeprecations) {
  9.                 restore_error_handler();
  1.             $_ENV['SHELL_VERBOSITY'] = 3;
  2.             $_SERVER['SHELL_VERBOSITY'] = 3;
  3.         }
  4.         $this->initializeBundles();
  5.         $this->initializeContainer();
  6.         $container $this->container;
  7.         if ($container->hasParameter('kernel.trusted_hosts') && $trustedHosts $container->getParameter('kernel.trusted_hosts')) {
  8.             Request::setTrustedHosts($trustedHosts);
  1.      * {@inheritdoc}
  2.      */
  3.     public function handle(Request $requestint $type HttpKernelInterface::MASTER_REQUESTbool $catch true)
  4.     {
  5.         if (!$this->booted) {
  6.             $container $this->container ?? $this->preBoot();
  7.             if ($container->has('http_cache')) {
  8.                 return $container->get('http_cache')->handle($request$type$catch);
  9.             }
  10.         }
Kernel->handle() in /var/www/prod2021/public/index.php (line 20)
  1.     Debug::enable();
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Stack Trace

ParseError

ParseError:
syntax error, unexpected '('

  at /var/www/prod2021/src/Repository/BrandNameRepository.php:185
  at Composer\Autoload\includeFile()
     (/var/www/prod2021/vendor/composer/ClassLoader.php:346)
  at Composer\Autoload\ClassLoader->loadClass()
     (/var/www/prod2021/vendor/symfony/error-handler/DebugClassLoader.php:353)
  at Symfony\Component\ErrorHandler\DebugClassLoader->loadClass()
  at spl_autoload_call()
  at class_exists()
     (/var/www/prod2021/vendor/symfony/config/Resource/ClassExistenceResource.php:84)
  at Symfony\Component\Config\Resource\ClassExistenceResource->isFresh()
     (/var/www/prod2021/vendor/symfony/dependency-injection/ContainerBuilder.php:348)
  at Symfony\Component\DependencyInjection\ContainerBuilder->getReflectionClass()
     (/var/www/prod2021/vendor/symfony/dependency-injection/Loader/FileLoader.php:199)
  at Symfony\Component\DependencyInjection\Loader\FileLoader->findClasses()
     (/var/www/prod2021/vendor/symfony/dependency-injection/Loader/FileLoader.php:99)
  at Symfony\Component\DependencyInjection\Loader\FileLoader->registerClasses()
     (/var/www/prod2021/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:672)
  at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinition()
     (/var/www/prod2021/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:235)
  at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinitions()
     (/var/www/prod2021/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:155)
  at Symfony\Component\DependencyInjection\Loader\YamlFileLoader->load()
     (/var/www/prod2021/vendor/symfony/config/Loader/FileLoader.php:158)
  at Symfony\Component\Config\Loader\FileLoader->doImport()
     (/var/www/prod2021/vendor/symfony/config/Loader/FileLoader.php:97)
  at Symfony\Component\Config\Loader\FileLoader->import()
     (/var/www/prod2021/vendor/symfony/dependency-injection/Loader/FileLoader.php:64)
  at Symfony\Component\DependencyInjection\Loader\FileLoader->import()
     (/var/www/prod2021/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php:61)
  at Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator->import()
     (/var/www/prod2021/src/Kernel.php:20)
  at App\Kernel->configureContainer()
     (/var/www/prod2021/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:155)
  at App\Kernel->Symfony\Bundle\FrameworkBundle\Kernel\{closure}()
     (/var/www/prod2021/vendor/symfony/dependency-injection/Loader/ClosureLoader.php:38)
  at Symfony\Component\DependencyInjection\Loader\ClosureLoader->load()
     (/var/www/prod2021/vendor/symfony/config/Loader/DelegatingLoader.php:40)
  at Symfony\Component\Config\Loader\DelegatingLoader->load()
     (/var/www/prod2021/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:163)
  at App\Kernel->registerContainerConfiguration()
     (/var/www/prod2021/vendor/symfony/http-kernel/Kernel.php:644)
  at Symfony\Component\HttpKernel\Kernel->buildContainer()
     (/var/www/prod2021/vendor/symfony/http-kernel/Kernel.php:540)
  at Symfony\Component\HttpKernel\Kernel->initializeContainer()
     (/var/www/prod2021/vendor/symfony/http-kernel/Kernel.php:780)
  at Symfony\Component\HttpKernel\Kernel->preBoot()
     (/var/www/prod2021/vendor/symfony/http-kernel/Kernel.php:183)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (/var/www/prod2021/public/index.php:20)