Skip to content
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

Move ReflectionType::__toString() cases to getName() #3765

Merged

Conversation

stronk7
Copy link
Contributor

@stronk7 stronk7 commented Jul 26, 2019

While this has become obvious in php74, because now a warning is
emitted, that function has been deprecated since php71 (without
warning), so it's perfectly ok/safe to apply for it in phpunit7 (that
officially supports php71-php73).

Plus, of course, this enables some projects, that cannot follow
phpunit support schema 100% all the time, to continue working
with phpunit7 and php74.

Our case, Moodle 3.8, to be released in November 2019, days before
the end of php71 support, will need to support php71 and also php74.
Having an unique phpunit helps a lot, and it seems achievable.

Then, in Moodle 3.9, to be released in May 2020, we'll upgrade
to phpunit8 because that will match 100% out php72 - php74.

So basically, in our May releases, we always match 100% phpunit's
php supported versions, but in our November releases, we usually
require an older phpunit to work with a newer php (that is not bad).

Back to results... this change in the 7.5 branch allows everything to continue working (unit tests pass) for php71 to php73... and improves a lot the php74 experience, going from

Tests: 2077, Assertions: 3620, Errors: 1, Failures: 39, Skipped: 10.

to

Tests: 2077, Assertions: 3620, Errors: 1, Skipped: 10.

(the remaining error, pre-existing, doesn't seem to affect us)

For your consideration, ciao :-)

While this has become obvious in php74, because now a warning is
emitted, that function has been deprecated since php71 (without
warning), so it's perfectly ok/safe to apply for it in phpunit7 (that
officially supports php71-php73).

Plus, of course, this enables some projects, that cannot follow
phpunit support schema 100% all the time, to continue working
with phpunit7 and php74.

Our case, Moodle 3.8, to be released in November 2019, days before
the end of php71 support, will need to support php71 and also php74.
Having an unique phpunit helps a lot, and it seems achievable.

Then, in Moodle 3.9, to be released in May 2020, we'll upgrade
to phpunit8 because that will match 100% out php72 - php74.

So basically, in our May releases, we always match 100% phpunit's
php supported versions, but in our November releases, we usually
require an older phpunit to work with a newer php (that is not bad).
@sebastianbergmann sebastianbergmann merged commit e11397f into sebastianbergmann:7.5 Jul 27, 2019
@stronk7 stronk7 deleted the reflectiontype_string75 branch July 27, 2019 08:21
@stronk7
Copy link
Contributor Author

stronk7 commented Jul 27, 2019

Thanks!

@driesvints
Copy link

@sebastianbergmann do you know in which exact release this fix is included? I can't find it in the changelogs.

@driesvints
Copy link

@sebastianbergmann ah okay. I was looking at which 8.x release had this because it seem to fail on 8.1.3: #3728

@sebastianbergmann
Copy link
Owner

8.2.5...8.3.0 :-)

@driesvints
Copy link

Thanks! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants