8000 [FrameworkBundle][Routing] Remove remaining deprecations by alexandre-daubois · Pull Request #52137 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle][Routing] Remove remaining deprecations #52137

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

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

alexandre-daubois
Copy link
Member
Q A
Branch? 7.0
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT

Follows #51483, I took Annotation*Loader from 7.0 to update Attribute*Loader here with latest changes.

@carsonbot carsonbot added this to the 7.0 milestone Oct 18, 2023
@alexandre-daubois alexandre-daubois force-pushed the router-deprec-cleanup branch 2 times, most recently from c5a289f to 4076990 Compare October 18, 2023 10:52
@alexandre-daubois alexandre-daubois changed the title [Routing] Remove remaining deprecations [FrameworkBundle][Routing] Remove remaining deprecations Oct 18, 2023
@nicolas-grekas
Copy link
Member

Thank you @alexandre-daubois.

@nicolas-grekas nicolas-grekas merged commit 950cd70 into symfony:7.0 Oct 18, 2023
@alexandre-daubois alexandre-daubois deleted the router-deprec-cleanup branch October 18, 2023 12:45
*/
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot)
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot): void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes SymfonyBundle 6.4 incompatible with SymfonyRouter 7.0

PHP Fatal error: Declaration of Symfony\Bundle\FrameworkBundle\Routing\AttributeRouteControllerLoader::configureRoute(Symfony\Component\Routing\Route $route, ReflectionClass $class, ReflectionMethod $method, object $annot) must be compatible with Symfony\Component\Routing\Loader\AttributeClassLoader::configureRoute(Symfony\Component\Routing\Route $route, ReflectionClass $class, ReflectionMethod $method, object $annot): void in /home/runner/work/aws/aws/vendor/symfony/framework-bundle/Routing/AttributeRouteControllerLoader.php on line 31

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the best way to mitigate this? Return types were added nearly everywhere but all constraints have been kept to ^6.4|^7.0.

Should this return type be removed until the next occasion we can add it?

Copy link
Member
@jderusse jderusse Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see 2 options:

  • make Bundle require ^7.0
  • adds : void in Bundle:7.0 and in Route:8.0

I think the first is better.
ping @nicolas-grekas

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to remove the added return type in 7.0. That's what we did with the previous name, but I forgot this part when renaming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0