Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f2521e

Browse files
dunglasfabpot
authored andcommitted
[FrameworkBundle] Introduce autowirable ControllerTrait
1 parent 3fa8a05 commit 1f2521e

File tree

4 files changed

+935
-0
lines changed

4 files changed

+935
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ CHANGELOG
2121
Use `Symfony\Component\Console\DependencyInjection\ConfigCachePass` instead.
2222
* Deprecated `PropertyInfoPass`, use `Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass` instead
2323
* Deprecated extending `ConstraintValidatorFactory`
24+
* Added `Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait` (requires PHP 7). Unlike the `Symfony\Bundle\FrameworkBundle\Controller\Controller`
25+
class, this trait does not have access to the dependency injection container. Its dependencies are explicitly and lazily
26+
injected using getter injection.
27+
`render()`, `renderView()` and `stream()` methods can only use Twig (using the Templating component is not supported).
28+
The `json()` method requires the Serializer component (use `Symfony\Component\HttpFoundation\JsonResponse` directly if
29+
you do not want to use the Serializer).
2430

2531
3.2.0
2632
-----

0 commit comments

Comments
 (0)