Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix ParameterBagTest message with PHP 8.2 #48902

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
wants to merge 0 commits into from

Conversation

upyx
Copy link
Contributor

@upyx upyx commented Jan 7, 2023

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets nope
License MIT
Doc PR nope

Checking every time that tests failed just because of that minor thing makes me angry.

@carsonbot carsonbot added this to the 6.3 milestone Jan 7, 2023
@upyx upyx force-pushed the fix-test-message-php82 branch from c00a765 to b003136 Compare January 7, 2023 04:53
@@ -242,7 +242,11 @@ public function testGetEnumThrowsExceptionWithNotBackingValue()
$bag = new ParameterBag(['invalid-value' => 2]);

$this->expectException(\UnexpectedValueException::class);
$this->expectExceptionMessage('Parameter "invalid-value" cannot be converted to enum: 2 is not a valid backing value for enum "Symfony\Component\HttpFoundation\Tests\Foo".');
if (\PHP_VERSION_ID >= 80200) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file change must target a lower branch, 6.0 imho

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @MatTheCat mentioned, the bug was added by #48820 in 6.3

And yes, he has found another issue with enums.

@fabpot
Copy link
Member

fabpot commented Jan 7, 2023

Thank you @upyx.

fabpot added a commit that referenced this pull request Jan 7, 2023
This PR was squashed before being merged into the 6.3 branch.

Discussion
----------

Fix ParameterBagTest message with PHP 8.2

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | nope
| License       | MIT
| Doc PR        | nope

Checking every time that tests failed just because of that minor thing makes me angry.

Commits
-------

809f02c Fix ParameterBagTest message with PHP 8.2
@fabpot fabpot closed this Jan 7, 2023
@fabpot fabpot force-pushed the fix-test-message-php82 branch from 0802dff to 809f02c Compare January 7, 2023 07:46
@upyx upyx deleted the fix-test-message-php82 branch January 7, 2023 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants