use Symfony\Component\Security\Core\Role\RoleHierarchyInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class DefaultController extends BaseDefaultController
{
public function __construct(SharedConfig $sharedConfig,
ObjectDefFactory $objectDefFactory,
UploadPathsService $uploadPaths,
ParamUserService $paramUser,
SearchBar $searchBar,
TranslatorInterface $translator,
{
include_once \dirname(__DIR__, 4).'/vendor/symfony/framework-bundle/Controller/AbstractController.php';
include_once \dirname(__DIR__, 4).'/vendor/binova/shared-bundle/src/Controller/Base/BaseDefaultController.php';
include_once \dirname(__DIR__, 4).'/vendor/binova/cms-bundle/src/Controller/DefaultController.php';
$container->services['binova_cms.default_controller'] = $instance = new \Binova\CmsBundle\Controller\DefaultController(($container->services['binova_shared.config'] ?? $container->load('getBinovaShared_ConfigService')), ($container->services['binova_shared.object_def'] ?? $container->load('getBinovaShared_ObjectDefService')), ($container->services['binova_shared.upload_paths'] ?? $container->load('getBinovaShared_UploadPathsService')), ($container->services['binova_shared.param_user'] ?? $container->load('getBinovaShared_ParamUserService')), ($container->services['binova_shared.searchbar'] ?? $container->load('getBinovaShared_SearchbarService')), ($container->services['translator'] ?? $container->load('getTranslatorService')), ($container->services['doctrine.orm.default_entity_manager'] ?? $container->load('getDoctrine_Orm_DefaultEntityManagerService')), ($container->services['.container.private.session'] ?? $container->load('get_Container_Private_SessionService')), ($container->services['binova_shared.security.query_constraint_adder'] ?? $container->load('getBinovaShared_Security_QueryConstraintAdderService')), ($container->services['knp_paginator'] ?? $container->load('getKnpPaginatorService')), ($container->services['event_dispatcher'] ?? $container->getEventDispatcherService()), ($container->privates['binova_shared.service.controller_service'] ?? $container->load('getBinovaShared_Service_ControllerServiceService')), ($container->privates['security.role_hierarchy'] ?? $container->load('getSecurity_RoleHierarchyService')), ($container->services['.container.private.security.authorization_checker'] ?? $container->load('get_Container_Private_Security_AuthorizationCheckerService')), ($container->services['router'] ?? $container->getRouterService()));
$instance->setContainer(($container->privates['.service_locator.mx0UMmY'] ?? $container->load('get_ServiceLocator_Mx0UMmYService'))->withContext('binova_cms.default_controller', $container));
return $instance;
}
$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';
$this->loading[$id] = true;
try {
if (isset($this->fileMap[$id])) {
return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $this->load($this->fileMap[$id]);
} elseif (isset($this->methodMap[$id])) {
return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $this->{$this->methodMap[$id]}();
}
} catch (\Exception $e) {
unset($this->services[$id]);
*/
public function get(string $id, int $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1)
{
return $this->services[$id]
?? $this->services[$id = $this->aliases[$id] ?? $id]
?? ('service_container' === $id ? $this : ($this->factories[$id] ?? [$this, 'make'])($id, $invalidBehavior));
}
/**
* Creates a service.
*
protected function instantiateController(string $class)
{
$class = ltrim($class, '\\');
if ($this->container->has($class)) {
return $this->container->get($class);
}
try {
return parent::instantiateController($class);
} catch (\Error $e) {
/**
* {@inheritdoc}
*/
protected function instantiateController(string $class): object
{
$controller = parent::instantiateController($class);
if ($controller instanceof ContainerAwareInterface) {
$controller->setContainer($this->container);
}
if ($controller instanceof AbstractController) {
}
[$class, $method] = explode('::', $controller, 2);
try {
$controller = [$this->instantiateController($class), $method];
} catch (\Error|\LogicException $e) {
try {
if ((new \ReflectionMethod($class, $method))->isStatic()) {
return $class.'::'.$method;
}
if (1 === substr_count($controller, ':')) {
$controller = str_replace(':', '::', $controller);
trigger_deprecation('symfony/http-kernel', '5.1', 'Referencing controllers with a single colon is deprecated. Use "%s" instead.', $controller);
}
return parent::createController($controller);
}
/**
* {@inheritdoc}
*/
if (\function_exists($controller)) {
return $controller;
}
try {
$callable = $this->createController($controller);
} catch (\InvalidArgumentException $e) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$e->getMessage(), 0, $e);
}
if (!\is_callable($callable)) {
public function getController(Request $request)
{
$e = $this->stopwatch->start('controller.get_callable');
try {
return $this->resolver->getController($request);
} finally {
$e->stop();
}
}
}
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
// load controller
if (false === $controller = $this->resolver->getController($request)) {
throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo()));
}
$event = new ControllerEvent($this, $controller, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
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;
}
}
Debug::enable();
}
$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: Binova\CmsBundle\Controller\DefaultController::__construct(): Argument #5 ($searchBar) must be of type Binova\SharedBundle\Service\SearchBar, Binova\SharedBundle\Service\SearchBar\SearchBar given, called in /var/www/html/binova/var/cache/prod/ContainerPrOFtNS/getBinovaCms_DefaultControllerService.php on line 24 at vendor/binova/cms-bundle/src/Controller/DefaultController.php:37 at Binova\CmsBundle\Controller\DefaultController->__construct() (var/cache/prod/ContainerPrOFtNS/getBinovaCms_DefaultControllerService.php:24) at ContainerPrOFtNS\getBinovaCms_DefaultControllerService::do() (var/cache/prod/ContainerPrOFtNS/App_KernelProdDebugContainer.php:499) at ContainerPrOFtNS\App_KernelProdDebugContainer->load() (vendor/symfony/dependency-injection/Container.php:238) at Symfony\Component\DependencyInjection\Container->make() (vendor/symfony/dependency-injection/Container.php:220) at Symfony\Component\DependencyInjection\Container->get() (vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php:53) at Symfony\Component\HttpKernel\Controller\ContainerControllerResolver->instantiateController() (vendor/symfony/framework-bundle/Controller/ControllerResolver.php:29) at Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver->instantiateController() (vendor/symfony/http-kernel/Controller/ControllerResolver.php:120) at Symfony\Component\HttpKernel\Controller\ControllerResolver->createController() (vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php:42) at Symfony\Component\HttpKernel\Controller\ContainerControllerResolver->createController() (vendor/symfony/http-kernel/Controller/ControllerResolver.php:86) at Symfony\Component\HttpKernel\Controller\ControllerResolver->getController() (vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php:39) at Symfony\Component\HttpKernel\Controller\TraceableControllerResolver->getController() (vendor/symfony/http-kernel/HttpKernel.php:146) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:20) |