-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] Remove deprecated classes, method and behaviors #50826
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
Merged
nicolas-grekas
merged 1 commit into
symfony:7.0
from
GromNaN:http-foundation-7-deprecated
Jun 30, 2023
Merged
[HttpFoundation] Remove deprecated classes, method and behaviors #50826
nicolas-grekas
merged 1 commit into
symfony:7.0
from
GromNaN:http-foundation-7-deprecated
Jun 30, 2023
+54
−704
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
fa96e30
to
399fd1f
Compare
0c58c33
to
8267a14
Compare
nicolas-grekas
added a commit
that referenced
this pull request
Jun 30, 2023
…mNaN) This PR was merged into the 6.4 branch. Discussion ---------- [Security] Remove BC layer for HttpFoundation < 6.2 | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | n/a In #45034, a condition was added to support `symfony/http-foundation < 6.2` or use the new `Request::getContentTypeFormat()` method when it exists. I propose to update the minimum version of `symfony/http-foundation` required by `symfony/security-http: 6.4`. `symfony/security-http: 6.4` already requires `symfony/http-kernel: ^6.3|^7.0` [which require](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/HttpKernel/composer.json) `symfony/http-foundation: ^6.2.7` The legacy method `Request::getContentType()` will be removed in 7.0 by #50826 Commits ------- 746c3fd Remove BC layer for HttpFoundation < 6.1
GromNaN
commented
Jun 30, 2023
nicolas-grekas
approved these changes
Jun 30, 2023
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.
A few minor things and GTM, thanks.
src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
Outdated
Show resolved
Hide resolved
8267a14
to
45bd3ac
Compare
All changes done. Thanks for the review. |
45bd3ac
to
2f74755
Compare
2f74755
to
665a775
Compare
Thank you @GromNaN. |
trigger_deprecation('symfony/http-foundation', '6.3', 'Ignoring invalid values when using "%s::%s(\'%s\')" is deprecated and will throw a "%s" in 7.0; '.$hint.' flag "FILTER_NULL_ON_FAILURE" to keep ignoring them.', $this::class, $method, $key, BadRequestException::class); | ||
|
||
return false; | ||
throw new BadRequestException(sprintf('Input value "%s" is invalid and flag "FILTER_NULL_ON_FAILURE" was not set.', $key)); | ||
} |
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.
I updated the message a bit to hint about the flag.
Merged
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.
Clean
symfony/http-foundation
from all its legacy.RequestMatcher
andExpressionRequestMatcher
,deprecated since [HttpFoundation] Extract request matchers for better reusability #47595
Request::getContentType()
,deprecated since [HttpFoundation] Rename Request::getContentType to getContentTypeFormat #45034
UnexpectedValueException
orBadRequestException
whenParameterBag::filter()
orInputBag::filter()
reads an invalid value and the flagFILTER_NULL_ON_FAILURE
is not set.new behavior announced since [HttpFoundation] Add
ParameterBag::getString()
and deprecate accepting invalid values #48525InvalidArgumentException
when callingRequest::create()
with a malformed URI,deprecated since [HttpFoundation] Deprecate passing invalid URI to Request::create #49376