Skip to content
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

Update the logic of the menu item matcher #6383

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

javiereguiluz
Copy link
Collaborator

Fixes #6147 and fixes #6366

This PR changes the menu item matcher logic completely. Instead of using methods that look at each menu item individually to decide if it's selected or not ... now we have methods that take all menu items at once and find which one should be selected. This is needed to fix edge-cases.

I'll add more tests and comments/explanations in the code ... but this can be tested already in apps. I tested in my own apps and everything works as before. The new code feels as fast as before, but I also profiled it with Blackfire to double check it.

@javiereguiluz javiereguiluz added this to the 4.x milestone Jul 23, 2024
@javiereguiluz
Copy link
Collaborator Author

This PR is ready for the final review.

This PR includes a BC break because an interface has been changed completely. I know this is unfortunate but, hopefully, this is an interface that it's rarely implemented by end-users. Now that we've fixed many edge-cases in the menu matching logic, it makes even less sense to implement your own logic. 🙏

@javiereguiluz javiereguiluz merged commit 1fc89fd into EasyCorp:4.x Jul 27, 2024
5 checks passed
@javiereguiluz javiereguiluz deleted the fix_6082 branch July 27, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant