[HttpFoundation] Extract request matchers for better reusability#47595
Merged
fabpot merged 1 commit intosymfony:6.2from Sep 18, 2022
Merged
[HttpFoundation] Extract request matchers for better reusability#47595fabpot merged 1 commit intosymfony:6.2from
fabpot merged 1 commit intosymfony:6.2from
Conversation
Member
Author
|
I would love to simplify the |
b582774 to
1f853b2
Compare
HeahDude
reviewed
Sep 16, 2022
Contributor
HeahDude
left a comment
There was a problem hiding this comment.
Should the class be renamed ChainRequestMatcher as of Sf 7.0 and/or add a @final?
1f853b2 to
8918499
Compare
ghost
reviewed
Sep 16, 2022
stloyd
reviewed
Sep 16, 2022
stof
reviewed
Sep 16, 2022
src/Symfony/Component/HttpFoundation/RequestMatcher/AttributesRequestMatcher.php
Outdated
Show resolved
Hide resolved
bcb1557 to
33f97a3
Compare
cc7b315 to
e23feac
Compare
HeahDude
reviewed
Sep 17, 2022
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Outdated
Show resolved
Hide resolved
|
|
||
| $container | ||
| ->register($id, RequestMatcher::class) | ||
| ->register($id, ChainRequestMatcher::class) |
Contributor
There was a problem hiding this comment.
Suggested change
| ->register($id, ChainRequestMatcher::class) | |
| $container->register($id, ChainRequestMatcher::class) |
?
Member
There was a problem hiding this comment.
I'd keep the current name: it doesn't have the same interface + needless BC break ahead when renaming.
src/Symfony/Component/HttpFoundation/RequestMatcher/PathRequestMatcher.php
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/RequestMatcher/IsJsonRequestMatcher.php
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Show resolved
Hide resolved
stof
reviewed
Sep 17, 2022
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/RequestMatcher/AttributesRequestMatcher.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/RequestMatcher/IpsRequestMatcher.php
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/RequestMatcher/SchemeRequestMatcher.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/SchemeRequestMatcherTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IpsRequestMatcherTest.php
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/RequestMatcher/IsJsonRequestMatcher.php
Outdated
Show resolved
Hide resolved
e23feac to
79d5ad5
Compare
stof
reviewed
Sep 17, 2022
0109fe9 to
961cd85
Compare
961cd85 to
c698b4b
Compare
chalasr
reviewed
Sep 17, 2022
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Outdated
Show resolved
Hide resolved
c698b4b to
b081a56
Compare
stof
requested changes
Sep 17, 2022
src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IsJsonRequestMatcherTest.php
Show resolved
Hide resolved
b081a56 to
6cfd3b7
Compare
Merged
Member
|
I had to build a factory to create an instance of |
nicolas-grekas
added a commit
that referenced
this pull request
Jun 30, 2023
… behaviors (GromNaN) This PR was squashed before being merged into the 7.0 branch. Discussion ---------- [HttpFoundation] Remove deprecated classes, method and behaviors | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | n/a Clean `symfony/http-foundation` from all its legacy. - Remove `RequestMatcher` and `ExpressionRequestMatcher`, deprecated since #47595 - Remove `Request::getContentType()`, deprecated since #45034 - Throw a `UnexpectedValueException` or `BadRequestException` when `ParameterBag::filter()` or `InputBag::filter()` reads an invalid value and the flag `FILTER_NULL_ON_FAILURE` is not set. new behavior announced since #48525 - Throw a `InvalidArgumentException` when calling `Request::create()` with a malformed URI, deprecated since #49376 Commits ------- 665a775 [HttpFoundation] Remove deprecated classes, method and behaviors
OskarStark
added a commit
to symfony/symfony-docs
that referenced
this pull request
Dec 21, 2023
This PR was squashed before being merged into the 7.0 branch. Discussion ---------- [Security] Update request matcher doc RequestMatcher class has been removed in 7.0 cf [code PR](symfony/symfony#47595) Changing link and rewording according to new behaviour Commits ------- f32a8cf [Security] Update request matcher doc
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
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.
The
RequestMatcherclass hardcodes its matchers. This PR extracts those into their own classes so that we can compose aRequestMatcherand allow better reusability.