This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle/FrameworkBundle
Fabien Potencier 22bebd805c feature #35257 [FrameworkBundle] TemplateController should accept extra arguments to be sent to the template (Benjamin RICHARD)
This PR was squashed before being merged into the 5.1-dev branch (closes #35257).

Discussion
----------

[FrameworkBundle] TemplateController should accept extra arguments to be sent to the template

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

In the official documentation (symfony.com/doc/master/templates.html#rendering-a-template-directly-from-a-route) it says that TemplateController should accept extra arguments. In fact it's not available for instance.
So i added the context argument as an array. Because of deprecation of templating, only the twig instance will apply the context argument.

It will need to be implemented in branch 5.

The following issue has been created in documentation project : https://github.com/symfony/symfony-docs/issues/12897

Commits
-------

e27b417817 [FrameworkBundle] TemplateController should accept extra arguments to be sent to the template
2020-01-10 13:08:49 +01:00
..
CacheWarmer [FrameworkBundle] cache ClassMetadataFactory in debug 2019-12-27 01:45:06 +01:00
Command feature #35285 [FrameworkBundle] Adding better output to secrets:decrypt-to-local command (weaverryan) 2020-01-10 10:20:24 +01:00
Console Merge branch '3.4' into 4.3 2019-11-26 04:44:44 +01:00
Controller [FrameworkBundle] TemplateController should accept extra arguments to be sent to the template 2020-01-10 13:08:42 +01:00
DataCollector Remove \Throwable support deprecation layer 2019-11-08 10:00:49 +01:00
DependencyInjection [FrameworkBundle] Configure RequestContext through router config 2020-01-10 08:44:52 +01:00
EventListener Merge branch '4.4' 2019-09-06 16:33:58 +02:00
HttpCache [FrameworkBundle] Add parameter types from HttpKernel. 2019-08-14 10:52:36 +02:00
Kernel [FrameworkBundle] Allow using the kernel as a registry of controllers and service factories 2019-12-13 14:13:08 +01:00
Resources Make sure the UriSigner can be autowired 2020-01-10 11:59:51 +01:00
Routing Merge branch '4.4' 2019-10-30 14:25:47 +01:00
Secrets [FrameworkBundle][SodiumVault] Create secrets directory only when needed 2019-12-04 18:30:15 +01:00
Test Merge branch '4.4' 2019-11-05 18:15:52 +01:00
Tests feature #35257 [FrameworkBundle] TemplateController should accept extra arguments to be sent to the template (Benjamin RICHARD) 2020-01-10 13:08:49 +01:00
Translation Merge branch '4.4' 2019-11-17 11:12:24 +01:00
.gitattributes Add .gitignore to .gitattributes 2019-10-12 01:35:04 +01:00
.gitignore
CHANGELOG.md feature #35257 [FrameworkBundle] TemplateController should accept extra arguments to be sent to the template (Benjamin RICHARD) 2020-01-10 13:08:49 +01:00
composer.json [FrameworkBundle] Allow using the kernel as a registry of controllers and service factories 2019-12-13 14:13:08 +01:00
FrameworkBundle.php Merge branch '4.4' 2019-11-12 10:25:44 +01:00
KernelBrowser.php Merge branch '4.4' 2019-09-10 19:00:13 +02:00
LICENSE Update year in license files 2020-01-01 12:03:25 +01:00
phpunit.xml.dist Merge branch '2.8' into 3.4 2018-11-11 20:48:54 +01:00
README.md add readme files where missing 2016-03-07 11:36:15 +01:00