-
Notifications
You must be signed in to change notification settings - Fork 6
Symfony 8.0 removed method fix #222
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
Open
absumo
wants to merge
1
commit into
master
Choose a base branch
from
symfony-80-request
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Was removed in symfony 8.0
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdate Symfony request access to be compatible with Symfony 8.0 by replacing deprecated/removed Request::get() usage with attribute access for the current route name. Sequence diagram for DefaultMenuListener route retrieval changesequenceDiagram
actor User
participant Framework as HttpKernel
participant RequestStack
participant Request
participant DefaultMenuListener
participant ItemInterface as MenuItem
User->>Framework: HTTP request
Framework->>RequestStack: getCurrentRequest()
RequestStack-->>Framework: Request
Framework->>DefaultMenuListener: enableChildRoutes(MenuItem, prefix)
DefaultMenuListener->>RequestStack: getCurrentRequest()
RequestStack-->>DefaultMenuListener: Request
DefaultMenuListener->>Request: attributes.get(_route)
Request-->>DefaultMenuListener: routeName
DefaultMenuListener->>DefaultMenuListener: str_contains(routeName, prefix)
alt routeName contains prefix
DefaultMenuListener->>MenuItem: setExtra(routes = [{route: routeName}])
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
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.
Hey - I've left some high level feedback:
- Consider guarding against a null current request or missing
_routeattribute before callingstr_contains, sinceRequestStack::getCurrentRequest()andRequest::attributes->get()can both return null and would cause a TypeError instr_contains.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider guarding against a null current request or missing `_route` attribute before calling `str_contains`, since `RequestStack::getCurrentRequest()` and `Request::attributes->get()` can both return null and would cause a TypeError in `str_contains`.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
tijsverkoyen
approved these changes
Jan 23, 2026
jonasdekeukelaere
approved these changes
Jan 23, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix removed request->get method.
Was removed in symfony 8.0
Summary by Sourcery
Bug Fixes: