Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 58
Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 76 Symfony Profiler
vendor/symfony/framework-bundle/Controller/AbstractController.php line 170
throw new ServiceNotFoundException('parameter_bag.', null, null, [], sprintf('The "%s::getParameter()" method is missing a parameter bag to work properly. Did you forget to register your controller as a service subscriber? This can be fixed either by using autoconfiguration or by manually wiring a "parameter_bag" in the service locator passed to the controller.', static::class));
'message_bus' => '?'.MessageBusInterface::class, // to be removed in 6.0
'messenger.default_bus' => '?'.MessageBusInterface::class, // to be removed in 6.0
];
}
/**
* Returns true if the service id is defined.
*
* @deprecated since Symfony 5.4, use method or constructor injection in your controller instead
*/
protected function has(string $id): bool
{
trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, use method or constructor injection in your controller instead.', __METHOD__);
return $this->container->has($id);
}
/**
* Gets a container service by its id.
*
* @return object The service
*
* @deprecated since Symfony 5.4, use method or constructor injection in your controller instead
*/
protected function get(string $id): object
{
trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, use method or constructor injection in your controller instead.', __METHOD__);
return $this->container->get($id);
}
/**
* Generates a URL from the given parameters.
*
* @see UrlGeneratorInterface
*/
protected function generateUrl(string $route, array $parameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string
protected function renderView(string $view, array $parameters = []): string
{
if (!$this->container->has('twig')) {
throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
throw new \LogicException(sprintf('Passing a FormView to "%s::renderForm()" is not supported, pass directly the form instead for parameter "%s".', get_debug_type($this), $k));
}
if (!$v instanceof FormInterface) {
continue;
}
$parameters[$k] = $v->createView();
if (200 === $response->getStatusCode() && $v->isSubmitted() && !$v->isValid()) {
throw new \LogicException('You cannot use the "stream" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
}
$twig = $this->container->get('twig');
$callback = function () use ($twig, $view, $parameters) {
$twig->display($view, $parameters);
};
if (null === $response) {
return new StreamedResponse($callback);
}
$response->setCallback($callback);
return $response;
}
/**
* Returns a NotFoundHttpException.
*
* This will result in a 404 response code. Usage example:
*
* throw $this->createNotFoundException('Page not found!');
if (!class_exists(AccessDeniedException::class)) {
throw new \LogicException('You cannot use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".');
}
return new AccessDeniedException($message, $previous);
}
/**
* Creates and returns a Form instance from the type of the form.
* Shortcut to return the Doctrine Registry service.
*
* @throws \LogicException If DoctrineBundle is not available
*
* @deprecated since Symfony 5.4, inject an instance of ManagerRegistry in your controller instead
*/
protected function getDoctrine(): ManagerRegistry
{
trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, inject an instance of ManagerRegistry in your controller instead.', __METHOD__);
if (!$this->container->has('doctrine')) {
throw new \LogicException('The DoctrineBundle is not registered in your application. Try running "composer require symfony/orm-pack".');
}
return $this->container->get('doctrine');
}
/**
* Get a user from the Security Token Storage.
*
* @return UserInterface|null
*
* @throws \LogicException If SecurityBundle is not available
*
* @see TokenInterface::getUser()
*/
protected function getUser()
{
if (!$this->container->has('security.token_storage')) {
throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".');
}
if (null === $token = $this->container->get('security.token_storage')->getToken()) {
return null;
}
// @deprecated since 5.4, $user will always be a UserInterface instance
if (!\is_object($user = $token->getUser())) {
// e.g. anonymous authentication
return null;
}
return $user;
}
/**
* Checks the validity of a CSRF token.
*
* @param string $id The id used when generating the token
* @param string|null $token The actual token sent with the request that should be validated
*/
protected function isCsrfTokenValid(string $id, ?string $token): bool
{
if (!$this->container->has('security.csrf.token_manager')) {
throw new \LogicException('CSRF protection is not enabled in your application. Enable it with the "csrf_protection" key in "config/packages/framework.yaml".');
* @param object|Envelope $message The message or the message pre-wrapped in an envelope
*
* @deprecated since Symfony 5.4, inject an instance of MessageBusInterface in your controller instead
*/
protected function dispatchMessage(object $message, array $stamps = []): Envelope
{
trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, inject an instance of MessageBusInterface in your controller instead.', __METHOD__);
if (!$this->container->has('messenger.default_bus')) {
$message = class_exists(Envelope::class) ? 'You need to define the "messenger.default_bus" configuration option.' : 'Try running "composer require symfony/messenger".';
throw new \LogicException('The message bus is not enabled in your application. '.$message);
* Adds a Link HTTP header to the current response.
*
* @see https://tools.ietf.org/html/rfc5988
*/
protected function addLink(Request $request, LinkInterface $link): void
{
if (!class_exists(AddLinkHeaderListener::class)) {
throw new \LogicException('You cannot use the "addLink" method if the WebLink component is not available. Try running "composer require symfony/web-link".');
}
if (null === $linkProvider = $request->attributes->get('_links')) {
$request->attributes->set('_links', new GenericLinkProvider([$link]));