Commit 800a9a8
committed
minor symfony#9403 SF 4+ does not rely on Command inheritance anymore (bpolaszek)
This PR was merged into the 4.0 branch.
Discussion
----------
SF 4+ does not rely on Command inheritance anymore
As stated in [UPGRADE FROM 3.x to 4.0](https://github.com/symfony/symfony/blob/master/UPGRADE-4.0.md#httpkernel), relying on convention-based commands discovery is not supported anymore.
This trick will only work with bundle autoconfiguration, which is not enabled by default on many 3rd-party bundles. This means a 3rd party bundle that wants to upgrade from SF 3.4 to SF 4.0 doesn't just have to edit its `composer.json`, its commands must either be tagged with `console.command` or autoconfigured.
When [struggling with this](https://stackoverflow.com/questions/49134340/symfony-4-3rd-party-bundle-commands-are-no-longer-automatically-discovered) my eyes just hit the _Symfony registers any PHP class extending Command as a console command automatically_ sentence and I didn't figure out why it didn't work.
Commits
-------
f8fef4a SF 4+ does not rely on Command inheritance anymore1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 75 | + | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| 83 | + | |
| 84 | + | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments