[3.0] remove the most blocking return types#3156
Conversation
9e44b92 to
e6bcf51
Compare
e6bcf51 to
ac0f512
Compare
|
Thank you @nicolas-grekas. |
…ekas) This PR was merged into the 3.x branch. Discussion ---------- [3.0] remove the most blocking return types These return types make it needlessly hard to move to Twig 3. This should make Symfony 4.4 compatible with Twig 3, and should help make the CI of Symfony 5 green. > `Declaration of Twig\Extra\CssInliner\CssInlinerExtension::getFilters() must be compatible with Twig\Extension\AbstractExtension::getFilters(): array in /home/travis/build/symfony/symfony/vendor/twig/cssinliner-extra/src/CssInlinerExtension.php` Commits ------- ac0f512 [3.0] remove the most blocking return types
|
Why are they making it hard ? Couldn't Symfony 4.4 have return types on these methods ? |
|
That'd be a BC break for Symfony. |
|
Well, then we will need a 4.0 version of Twig to get return types on extension points just because we want to support Twig 3 and SF 4.4 and our Twig extensions were not final yet ? |
|
Because the ecosystem deserves it. There are extensions into the wild and adding return types is asking everyone to work or die. We can and should do friendlier. What this PR provides. |
This PR was merged into the 4.4 branch. Discussion ---------- Allow Twig 3 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Needs twigphp/Twig#3156 And twigphp/Twig#3158 Commits ------- 09f4eb5 Allow Twig 3
This PR was merged into the 4.4 branch. Discussion ---------- Allow Twig 3 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Needs twigphp/Twig#3156 And twigphp/Twig#3158 Commits ------- 09f4eb5 Allow Twig 3
|
Sorry to digg that far... should we add those return types back now.. if we want to add them in Twig 4.0 ? |
|
I suppose so @smnandre |
|
We kept this in phpdoc, so the Symfony DebugClassLoader triggers deprecations since years if you don't add them in your child classes. |
With pleasure!
Ok so i "revert" this commit on the 4.0 branch.. or is there more to do / some tricks along the way ? :) |
It should be that simple… let’s see if that's the case in practice 🧐 |
These return types make it needlessly hard to move to Twig 3.
This should make Symfony 4.4 compatible with Twig 3, and should help make the CI of Symfony 5 green.