-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] Replace previously added preg_match with preg_replace_callback #18379
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Routing] Replace previously added preg_match with preg_replace_callback
- Loading branch information
commit 052ec95af96981e54695d2f23c0cee4d9cf6858a
There are no files selected for viewing
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
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.
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.
Looks suspicious: 2.7 can't get more deprecations. Only master can.
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.
It can't be removed in 3.1 too, only in 4.0 otherwise it will not be BC with 3.0
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.
Please be more clear in what I'm supposed to do. This is basically my first PR.
I am not an experienced Symfony developer, and have no clear idea what I'm supposed to do or where to find the appropriate documentation. Only telling me what I'm doing wrong, won't improve this PR :/
I'd gladly donate this change/PR to someone who actually knows what to do. I just want the route-generation to be faster, since it takes a fairly large part of the symfony 'overhead'* of our application.
* Its not really overhead, but due to its flexibility it is much more complex than simply concatenating the right parts of a url.
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.
@arjenm deprecations cannot be made in existing minor releases. A deprecation implies that there's a new way of doing something, also known as a feature. In order to add a feature, it has to be in the newest minor release (3.1, 3.2 etc). This PR is requested against 2.7, which doesn't accept new features anymore (same goes for any other lower than 3.1 at the moment as 3.1 is the next).
So what I think you should do, is reopen this PR against the master if you want it as a feature. This means you will have to update your message to something like "deprecated in 3.1, removed in 4.0". Currently 2.7 and 2.8 only accept bug fixes (will be explained a bit better in the docs: symfony/symfony-docs#6412).
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.
@arjenm you should just remove this trigger_error and add it later in another PR on master
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.
@nicolas-grekas while I appreciate your suggestion and it would allow early inclusion of this change. Its also not in the spirit of the intended prevention of BC-breakage. If someone would rely on the contents of the decodedChars-array, that would still break (i.e. it would be an empty array, rather than one containing several key/value pairs) and without any warning. Its already a bug waiting to happen in its current state; changing the array without changing the url matcher could result in mismatched routes...
Adding more code to test if the array was non-default, could destroy most of the performance gain.
So I'll rebase it against master, where such a change is much less unexpected. So I'll follow the suggestion of @iltar