-
Notifications
You must be signed in to change notification settings - Fork 102
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
Allow Symfony 7, dropped support for 4.4 and bumped minimal version to 5.4 #324
Conversation
Hello, first of all, thank you for your contribution |
Hi Yann, Thanks for your response! Main thing is that Symfony 4.4 isn't maintained anymore, security fixes end this month, also see the overview of all supported versions. Next to that the adjustment in So all in all I think this justifies dropping the support for 4.4. Users who still use that version could easily keep using version |
I agree |
It would not cause a BC break, and wouldn't necessarily require a new major version, as users who are on Symfony But you could still release a new version if you want. Cheers! |
I see your point Still very appreciated, and will definitely merge it whenever the CI will be green |
Sure! I dropped the usage of symfony/framework-extra-bundle as it is deprecated since Symfony This should fix the CI build hopefully. |
Could you approve the workflow Yann, so we at least see if the CI is all fixed now? |
I was sure I approved it... Sorry |
No problem! I've fixed some tests and now need your approval again :). Hopefully the suite passes for all versions now. |
02a598a
to
897fa18
Compare
EDIT: maybe the same solution as done with Alright looks like this could work, could you approve the workflow once again :) |
82ae974
to
e6b9f38
Compare
@@ -0,0 +1,26 @@ | |||
archive: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are these tests/Integration/config/*/routes/controllers.yaml
files for ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I dropped the usage of sensio/framework-extra-bundle
which is also 'end-of-life' since Syfmony 6.2 (see).
I had to refactor the use of routing annotations (which was part of that bundle), and as routing attributes are not supported on lower versions I refactored the routing annotations to yaml
routing config. So these controllers.yaml
files contain the yaml
routing definitions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it means that we are not able to test that on symfony 5.4 the bundle is still able to work with annotation
This might be an issue IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We aren't explicitly testing Route
-annotations anymore indeed, but the only change made is the way the routing is defined. Both of the syntaxes result in the same underlying Route
-object.
For example
/**
* @Route("/blog", name="blog_read", options={"sitemap"={"section"="blog"}})
*/
Is simply rewritten to the Yaml
syntax
blog_read:
path: /blog
controller: Presta\SitemapBundle\Tests\Integration\Controller\BlogController::read
options:
sitemap:
section: blog
Since the bundle (sensio/framework-extra-bundle) is abandoned, it's very unlikely that the currently used syntax wouldn't work anymore (for projects using Symfony <6.3
). And even if it would turn out to be erroneous it would be related to the same code in symfony/routing
as the Yaml
or Attribute
syntax uses and thus be still supported in our testsuite.
If we would have had an own Annotation
-route class depending on the bundle above that would be something different, the defined 'options' we use are just part of the same code as before.
So we are not compromising on our testsuite, we just use an alternative syntax to define the same arrangement to build the testsuite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi evertharmeling,
First of all thank you for your contribution, this is really great!
I'm confused here: why would you remove the @Route
annotations? I understand that the sensio/framework-extra-bundle
is abandonned, but I'm pretty sure the annotations we are talking about are Symfony's ones, right?
Looking at the diff here and here, you will notice that you didn't have to remove any import and that the imported Route
comes from Symfony's namespace.
If I'm correct, maybe we could keep the annotations as it's a valid way to declare a route in the latest Symfony versions.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Benoit,
Thanks for reaching out, first of all I never used annotations to configure my routes myself, so I had to dive into it all too, and this is what I got out of it.
You both are right. sorry for my stubbornness , I went off-track with the notification on the SensioFrameworkExtraBundle docs, and mistakenly assumed Annotations were completely dropped in higher versions, which would make still supporting it on all versions problematic.
It's no longer recommended to use this bundle in current Symfony applications. All the annotations provided by this bundle are now built-in in Symfony as PHP attributes. Check out the full list of Symfony attributes.
They don't mention Annotations are still supported, but here they do :)
I've reverted the changes and it looks like the tests still pass.
Things to note:
- if I'm correct we are now only testing the Annotations routes on Symfony
5.4
and PHP< 8.0
, hence the check in Kernel.php
Let's see if the whole workflow still passes 🤞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, it's quite confusing anyway that Symfony started to use the same @Route
annotation's name in replacement of Sensio's one.
Here is the trick:
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
+use Symfony\Component\Routing\Annotation\Route;
The first import comes from Sensio's bundle and is deprecated, the second one comes from Symfony and is perfectly valid to be used as annotation @Route
or attribute #[Route]
.
Thank you for having taken this into account 🙂
6667700
to
ac5b258
Compare
Ah sorry I seem to have messed up the contents of the |
This is typically not the case, dropping support for specific dependencies is not a breaking change because the users of the dropped dependency will not get the new package offered, no?
You don't need to release a major version just to stop supporting an old dep version. |
@dkarlovi sure, I've understand this point of view
And here is the issue : people complains for almost anything
Remains a BC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evertharmeling thank you for your help, your efforts, and everything else
hmmm ok I've missed something |
@yann-eugone done! No problem, glad I could be of help! Thanks for your help and patience! |
Hello, what is missing to merge this PR ? Any helps needed ? |
@yann-eugone, just wondering if there's any particular reason for the delay in merging this PR? |
Sorry missed the commits popped in, I removed them and it should be fixed now! @yann-eugone could you approve the workflow once again? |
Thank you for your help, very much appreciated |
No problem, glad to be of help! Thanks for the feedback and assistance! |
Thanks for the work guys! Is there a release already planned containing these changes? |
Not yet, the next major version will take some time to be tested You can help by requiring the dev version on your projects
And provide feedback by opening issues if something fails |
Thx for your works guys ! |
No description provided.