Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Removed support for PHP templating everywhere#31800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fabpot commentedJun 3, 2019
@yceruto Some tests are broken with this PR. |
5f88db9 to07020d0Compareyceruto commentedJun 3, 2019
Tests are green now. |
| private$templating; | ||
| publicfunction__construct(Environment$twig =null,EngineInterface$templating =null) | ||
| publicfunction__construct(Environment$twig =null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I feel like twig should not be optional in this class. And when twig is not installed, the TemplateController should be removed from DI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I agree, but for DX point of view it's better as is, because you'll get a good error message:
You can not use the TemplateController if the Twig Bundle is not available.
vs
"Too few arguments to function Symfony\Bundle\FrameworkBundle\Controller\TemplateController::__construct(), 0 passed in ...
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I agree it's a little better for DX. But IMO it's not the responsiblity of the Controller do provide that.
We could just catch the instantiation error in
| return$this->configureController(parent::instantiateController($class),$class); |
src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
yceruto commentedJun 3, 2019
Requires#31821 Status: Needs Work |
nicolas-grekas commentedJun 3, 2019
Rebase unlocked. |
9686ff3 to116be1fCompare116be1f tod5be373Compareyceruto commentedJun 3, 2019
(Rebased) Status: Needs Review |
Tobion left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fine for me.https://github.com/symfony/symfony/pull/31800/files#r290086885 can be done in a separate PR.
| if (!$this->container->has('twig')) { | ||
| thrownew \LogicException('You can not use the "renderView" method if theTemplating Component or theTwig Bundle are not available. Try running "composer require symfony/twig-bundle".'); | ||
| thrownew \LogicException('You can not use the "renderView" method if the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
is not available
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Uh oh!
There was an error while loading.Please reload this page.
fabpot commentedJun 4, 2019
Thank you@yceruto. |
This PR was merged into the 5.0-dev branch.Discussion----------Removed support for PHP templating everywhere| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -Ref:#21035 and7169f4d**TODO:**Missing deprecations in 4.4 (#31800): - [x] `Symfony\Bundle\FrameworkBundle\Controller\TemplateController` 2nd argument. - [x] `Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheCacheWarmer` class and service.**Labels:** `FrameworkBundle`, `TwigBundle`, `TwigBridge`, `SecurityBundle`, `Form`, `HttpKernel`Friendly ping@fabpot and@dunglasCommits-------d5be373 Removed support for PHP templating everywhere
…ion (xabbuh)This PR was merged into the 4.3 branch.Discussion----------[FrameworkBundle] deprecate the framework.templating option| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets |#32120| License | MIT| Doc PR |The config node has already been removed in the `master` branch in#31800. For DX it would have been better to have this deprecation in 4.3 (see e.g.#32120), but it's probably too late to ship this as a bugfix.Commits-------ba241ce deprecate the framework.templating option
Uh oh!
There was an error while loading.Please reload this page.
Ref:#21035 and7169f4d
TODO:
Missing deprecations in 4.4 (#31800):
Symfony\Bundle\FrameworkBundle\Controller\TemplateController2nd argument.Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheCacheWarmerclass and service.Labels:
FrameworkBundle,TwigBundle,TwigBridge,SecurityBundle,Form,HttpKernelFriendly ping@fabpot and@dunglas