Permalink
Browse files

minor #25682 Fix fixed messages to be explicit about the package need…

…ed to be installed (fabpot)

This PR was merged into the 3.4 branch.

Discussion
----------

Fix fixed messages to be explicit about the package needed to be installed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

e8bc099 fixed messages to be explicit about the package needed to be installed
  • Loading branch information...
nicolas-grekas committed Jan 4, 2018
2 parents b3547a0 + e8bc099 commit 47d486c01fc67f2a5b0a54c9838be31ddb9fb1d4
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php
@@ -215,7 +215,7 @@ protected function addFlash($type, $message)
protected function isGranted($attributes, $subject = null)
{
if (!$this->container->has('security.authorization_checker')) {
throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require security".');
throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".');
}
return $this->container->get('security.authorization_checker')->isGranted($attributes, $subject);
@@ -261,7 +261,7 @@ protected function renderView($view, array $parameters = array())
}
if (!$this->container->has('twig')) {
throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available. Try running "composer require twig".');
throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".');
}
return $this->container->get('twig')->render($view, $parameters);
@@ -285,7 +285,7 @@ protected function render($view, array $parameters = array(), Response $response
} elseif ($this->container->has('twig')) {
$content = $this->container->get('twig')->render($view, $parameters);
} else {
throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available. Try running "composer require twig".');
throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".');
}
if (null === $response) {
@@ -323,7 +323,7 @@ protected function stream($view, array $parameters = array(), StreamedResponse $
$twig->display($view, $parameters);
};
} else {
throw new \LogicException('You can not use the "stream" method if the Templating Component or the Twig Bundle are not available. Try running "composer require twig".');
throw new \LogicException('You can not use the "stream" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".');
}
if (null === $response) {
@@ -373,7 +373,7 @@ protected function createNotFoundException($message = 'Not Found', \Exception $p
protected function createAccessDeniedException($message = 'Access Denied.', \Exception $previous = null)
{
if (!class_exists(AccessDeniedException::class)) {
throw new \LogicException('You can not use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require security".');
throw new \LogicException('You can not use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".');
}
return new AccessDeniedException($message, $previous);
@@ -422,7 +422,7 @@ protected function createFormBuilder($data = null, array $options = array())
protected function getDoctrine()
{
if (!$this->container->has('doctrine')) {
throw new \LogicException('The DoctrineBundle is not registered in your application. Try running "composer require doctrine".');
throw new \LogicException('The DoctrineBundle is not registered in your application. Try running "composer require symfony/orm-pack".');
}
return $this->container->get('doctrine');
@@ -442,7 +442,7 @@ protected function getDoctrine()
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 security".');
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()) {

0 comments on commit 47d486c

Please sign in to comment.