Skip to content

Conversation

@jnoordsij
Copy link
Contributor

@jnoordsij jnoordsij commented Dec 1, 2025

This PR removes the no-op wrapper extension of the Symfony get method on the Request class, given its deprecation in Symfony 7.4 (see symfony/symfony#61948) and subsequent removal in 8.0.

Given this override is a no-op, only existing to add some notes to discourage its use (see d7d5dfc), and the Symfony counterpat deprecation should now already discourage usage through their deprecation message, this should be safely removeable.

It will remain functional with Laravel 12, but might not longer be available in v13 if that will indeed allow ^8.0 for Symfony, making it potentially worth mentioning in the upgrade guide at that point, given that it may still occur in userland code (see e.g. #57962). Alternatively, one may opt even to target this change to the master branch instead of 12.x.

@jnoordsij jnoordsij changed the title [12.x] Remove 'wrapper' Symfony Request::get override wrapper [12.x] Remove 'wrapper' Symfony Request::get override Dec 1, 2025
@jnoordsij jnoordsij force-pushed the remove-get-override branch from 7864c7b to 898523b Compare December 1, 2025 07:41
@taylorotwell
Copy link
Member

I wonder if we should just maintain it for backwards compatibility purposes?

@jnoordsij
Copy link
Contributor Author

Given that using it was already actively discouraged by a docblock added 7+ years ago and Symfony found that removing it is warranted, removing it does not sound too harsh to me. Moreover, if Laravel 13 still would allow Symfony 7.4 as well (which it currently does), one could always pin Symfony to 7.4 in their dependencies and retain legacy compatibility for 1+ years from now.

@ziming
Copy link
Contributor

ziming commented Dec 1, 2025

I prefer the removal as sentry keep warn me and I dont want to disable deprecation warnings

@marius-ciclistu
Copy link

marius-ciclistu commented Dec 1, 2025

Request is macroable and many will choose to just copy paste the old function as a replacement leading to slower execution vs Laravel maintaining it. This forced change has no gains for the developers that use this function.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants