Commit 47795de
committed
feature #46009 [FrameworkBundle] Add support for first-class callable route controller in MicroKernelTrait (fancyweb)
This PR was merged into the 6.1 branch.
Discussion
----------
[FrameworkBundle] Add support for first-class callable route controller in MicroKernelTrait
| Q | A
| ------------- | ---
| Branch? | 6.1
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I have some routes defined in `Kernel.php` with the following syntax:
```php
$routes->add('app_foo', '/foo')
->methods(['GET'])
->controller([$this, 'fooRoute']);
```
I'd like to switch them to:
```php
$routes->add('app_foo', '/foo')
->methods(['GET'])
->controller($this->fooRoute(...));
```
Because I'd like to use first-class callable syntax everywhere in the project.
Commits
-------
9c5be576fb [FrameworkBundle] Add support for first-class callable route controller in MicroKernelTraitFile tree
4 files changed
+9
-0
lines changed- Kernel
- Tests/Kernel
- flex-style/src
4 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
0 commit comments