* @method Question[] findAll()
* @method Question[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class QuestionRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Question::class);
}
// /**
include_once \dirname(__DIR__, 4).'/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php';
include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/Repository/ServiceEntityRepositoryInterface.php';
include_once \dirname(__DIR__, 4).'/vendor/doctrine/doctrine-bundle/Repository/ServiceEntityRepository.php';
include_once \dirname(__DIR__, 4).'/src/Repository/QuestionRepository.php';
return $container->privates['App\\Repository\\QuestionRepository'] = new \App\Repository\QuestionRepository(($container->services['doctrine'] ?? $container->getDoctrineService()));
}
}
$file .= '.php';
}
$service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file;
return class_exists($class, false) ? $class::do($this, $lazyLoad) : $service;
}
protected function createProxy($class, \Closure $factory)
{
class_exists($class, false) || require __DIR__.'/'.$class.'.php';
}
if (null === $method) {
return false !== $registry ? $this->{$registry}[$id] ?? null : null;
}
if (false !== $registry) {
return $this->{$registry}[$id] ?? $this->{$registry}[$id] = $load ? $this->load($method) : $this->{$method}();
}
if (!$load) {
return $this->{$method}();
}
*
* @return mixed
*/
public function get(string $id)
{
return isset($this->serviceMap[$id]) ? ($this->factory)(...$this->serviceMap[$id]) : parent::get($id);
}
/**
* {@inheritdoc}
*/
$i = strrpos($controller, ':');
$controller = substr($controller, 0, $i).strtolower(substr($controller, $i));
}
try {
yield $this->container->get($controller)->get($argument->getName());
} catch (RuntimeException $e) {
$what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller);
$message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $e->getMessage());
if ($e->getMessage() === $message) {
public function resolve(Request $request, ArgumentMetadata $argument): iterable
{
$method = \get_class($this->inner).'::'.__FUNCTION__;
$this->stopwatch->start($method, 'controller.argument_value_resolver');
yield from $this->inner->resolve($request, $argument);
$this->stopwatch->stop($method);
}
}
}
$resolved = $resolver->resolve($request, $metadata);
$atLeastOne = false;
foreach ($resolved as $append) {
$atLeastOne = true;
$arguments[] = $append;
}
if (!$atLeastOne) {
*/
public function getArguments(Request $request, callable $controller)
{
$e = $this->stopwatch->start('controller.get_arguments');
$ret = $this->resolver->getArguments($request, $controller);
$e->stop();
return $ret;
}
$event = new ControllerEvent($this, $controller, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER);
$controller = $event->getController();
// controller arguments
$arguments = $this->argumentResolver->getArguments($request, $controller);
$event = new ControllerArgumentsEvent($this, $controller, $arguments, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
TypeError
|
---|
TypeError: App\Repository\QuestionRepository::__construct(): Argument #1 ($registry) must be of type Doctrine\Common\Persistence\ManagerRegistry, Doctrine\Bundle\DoctrineBundle\Registry given, called in /var/www/app/current/var/cache/prod/ContainerGoxaxUx/getQuestionRepositoryService.php on line 27 at src/Repository/QuestionRepository.php:17 at App\Repository\QuestionRepository->__construct() (var/cache/prod/ContainerGoxaxUx/getQuestionRepositoryService.php:27) at ContainerGoxaxUx\getQuestionRepositoryService::do() (var/cache/prod/ContainerGoxaxUx/App_KernelProdDebugContainer.php:315) at ContainerGoxaxUx\App_KernelProdDebugContainer->load() (vendor/symfony/dependency-injection/Container.php:422) at Symfony\Component\DependencyInjection\Container->getService() (vendor/symfony/dependency-injection/Argument/ServiceLocator.php:42) at Symfony\Component\DependencyInjection\Argument\ServiceLocator->get() (vendor/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php:77) at Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver->resolve() (vendor/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php:58) at Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver->resolve() (vendor/symfony/http-kernel/Controller/ArgumentResolver.php:58) at Symfony\Component\HttpKernel\Controller\ArgumentResolver->getArguments() (vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php:38) at Symfony\Component\HttpKernel\Controller\TraceableArgumentResolver->getArguments() (vendor/symfony/http-kernel/HttpKernel.php:144) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:74) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:25) |