-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Symfony 3.3 #201
Conversation
@pierredup thank you very much for your PR. Thanks to you we are supporting the next version of Symfony. |
Hello @pierredup and @monteiro I am trying to use this Bundle with Symfony 5.2-Beta2 and this line referencing the old number 3 arg is not working. @pierredup I am wondering why you were merging the 3 arg with the 4 arg? can we just eliminate that line? |
The code should not be merging both arguments, but reading the right one. |
see Incenteev/translation-checker-bundle#11 for a solution |
It only merges the values to check for the |
@pierredup yeah, but this break if the other argument is not the options argument |
see #293 |
@stof how does it break? Was there another change in the signature in versions after 3.3? |
Okay I just read through all the linked issues. The issue here is not with SF >= 3.3, but rather 5.2 where the arguments are not resolved yet by the time this compiler pass runs. |
this argument:
is opposite this argument:
if the issue is the timing, then the order is correct. If the issue is the new signature order then timing doesn't matter. |
In Symfony < 5.2, the 4th argument (3rd index) was an array. In Symfony 5.2, that changed to be an instance of This compiler pass runs before the
What I meant with the new signature, is the one from Symfony 3.3, not 5.2. So if this bundle wanted to keep support for Symfony < 3.3, then either the compiler pass needs to be updated to run after the Symfony compiler pass, so that the arguments can be resolved before this pass runs, or this check can be changed to not merge the arrays. But this bundle dropped support for Symfony <= 3.3 in #271, so the pass needs to be updated to just check for the 4th index and doesn't have to cater for the 3rd index anymore. |
Since symfony/symfony#22010 there is now an extra argument to the translator constructor, which means the
$options
parameter moves one index up