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

ReflectionType::__toString() is deprecated in PHP 7.4 #278

Merged
merged 1 commit into from Dec 6, 2019
Merged

ReflectionType::__toString() is deprecated in PHP 7.4 #278

merged 1 commit into from Dec 6, 2019

Conversation

slt
Copy link
Contributor

@slt slt commented Oct 25, 2019

PHPUnit throws deprecation errors when Phake uses this method in PHP 7.4

ErrorException: Function ReflectionType::__toString() is deprecated

This patch replaces the instances of (string)$returnType with $returnType->getName(); allowing Phake to work on PHP 7.4 without deprecation warnings/errors.

Resolves issue #279

PHPUnit throws deprecation errors when Phake uses this method

ErrorException: Function ReflectionType::__toString() is deprecated
@slt
Copy link
Contributor Author

slt commented Nov 29, 2019

PHP 7.4.0 has been released

@jraubswitch
Copy link

@bfeaver, @mlively: can This be merged please?

@bfeaver
Copy link
Collaborator

bfeaver commented Dec 6, 2019

I’ll take a look at it tonight.

@bfeaver bfeaver merged commit 3b7a6db into phake:master Dec 6, 2019
@bfeaver
Copy link
Collaborator

bfeaver commented Dec 6, 2019

Released and tagged v3.1.7.

@jraubswitch
Copy link

Unsilenced deprecation notices (1324) is now gone.. Thanks!

@bfeaver
Copy link
Collaborator

bfeaver commented Dec 10, 2019

Seems I jumped the gun on releasing 3.1.7 without realizing that the new method required a higher version of PHP than we currently required (needs to be >=7.1). I'm tempted to remove the v3.1.7 release and instead tag a v3.2.0. Because 3.1.7 is broken for anyone not on 7.1 or higher, I really don't want to leave it around.

An alternative would be to rollback this change in the 3.1 releases and instead tag a 3.1.8 that would be identical to 3.1.6. The 3.2 release would then be the fix for PHP 7.4 deprecations.

See: #282

@jraubswitch
Copy link

Sounds like a good idea to me.. 3.1.x works for php >= 7.0 and 3.2.x works for php >= 7.1
So remove the 3.1.7 and add the 3.1.8 and 3.2.0 respectively.

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

6 participants