Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[VarDumper] Fix tests for PHP 8.1#41701

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@alexandre-daubois
Copy link
Member

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsPart of#41552
LicenseMIT
Doc PRN/A

derrabus reacted with rocket emoji
@carsonbotcarsonbot added this to the4.4 milestoneJun 14, 2021
@alexandre-dauboisalexandre-dauboisforce-pushed thefix-vardumper-tests branch 2 times, most recently from9f41eb0 to5db7f8bCompareJune 14, 2021 14:18
@derrabus
Copy link
Member

Can you explain why the dumper behaves differently on PHP 8.1?

@stof
Copy link
Member

@derrabus looks like the behavior ofReflectionGenerator::getTrace() changed in PHP 8.1, returning some info when there was none before.

derrabus reacted with thumbs up emoji

@alexandre-daubois
Copy link
MemberAuthor

alexandre-daubois commentedJun 15, 2021
edited
Loading

@derrabus also, some other functions seem to have changed their behaviour. For example, whennull,ReflectionParameter::getDefaultValue() returns null on PHP 8.0, andReflectionException: Internal error: Failed to retrieve the default value on PHP 8.1. Searched why in recent PRs ofhttps://github.com/php/php-src/, but couldn't find which commit is responsible of it.

@derrabus
Copy link
Member

@derrabus For example, whennull,ReflectionParameter::getDefaultValue() returns null on PHP 8.0, andReflectionException: Internal error: Failed to retrieve the default value on PHP 8.1.

I'd like to clarify first, if that change was intentional:https://bugs.php.net/bug.php?id=81147

alexandre-daubois reacted with rocket emoji

@derrabus
Copy link
Member

The other changes look reasonable to me.

@derrabus
Copy link
Member

Okay, that was fast and we've got the answer we were looking for.

Just to confirm, this is indeed an intentional change to ensure that optional-before-required is consistently treated as a required parameter. Previously it was treated as such in nearly all situations, but there were loopholes. One, as you have discovered, is reflection. The other is named arguments, where it was possible to not specify such a parameter if later required parameters were specified.

Can you have a look at the Travis failure? It looks related.

@alexandre-daubois
Copy link
MemberAuthor

Thank you so much for your investigation, super good to know! I'll definitely take a look at Travis tomorrow to finish this PR. 👍

derrabus reacted with heart emoji

@alexandre-daubois
Copy link
MemberAuthor

alexandre-daubois commentedJun 17, 2021
edited
Loading

@derrabus done 👌This failing build for 7.4 seems unrelated to this PR.

I'm not sure I understand the difference between "Tests / Integration (x.x)" and Travis CI tests ?

@derrabus
Copy link
Member

Thank you@alexandre-daubois.

@derrabusderrabus merged commit0c1343f intosymfony:4.4Jun 22, 2021
@derrabusderrabus mentioned this pull requestJun 22, 2021
This was referencedJun 30, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@NyholmNyholmNyholm left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@derrabusderrabusderrabus approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

6 participants

@alexandre-daubois@derrabus@stof@nicolas-grekas@Nyholm@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp