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

PHP 5.6 BC breaking changes in release 1.2.1 #946

Closed
MKodde opened this issue Feb 13, 2019 · 3 comments
Closed

PHP 5.6 BC breaking changes in release 1.2.1 #946

MKodde opened this issue Feb 13, 2019 · 3 comments

Comments

@MKodde
Copy link
Contributor

MKodde commented Feb 13, 2019

Hi! I'm having some difficulties in using the new mockery version in my PHP 5.6 project.

The first thing that seemed to have been introduced in 1.2.1 is the introduction of a strict_type declaration in the MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious trait. Introduced in this commit.

In my opinion, the solution would be to remove the strict type declaration, or to update the PHP version restraints, but that would result in the release of a new major version I suppose?

The second is an interesting one, and is related to the TestListenerTrait. My version of PHPUnit (5.7.27) provides some forwards compatibility features. These interfere with the condition mentioned in the TestListenerTrait. For, the second portion of the class alias condition does not resolve to be true as the forward compatibility provided by PHPUnit already made the alias for us.

My solution would be to change the second portion of the condition to test for the class existence of PHPUnit\Util\Blacklist

I will open a PR shortly with the proposed changes. Please feel free to steer me in a more desired direction.

@MKodde MKodde changed the title PHP 5.6 BC breaking changes PHP 5.6 BC breaking changes in release 1.2.1 Feb 13, 2019
@BackEndTea
Copy link

In my opinion, the solution would be to remove the strict type declaration, or to update the PHP version restraints, but that would result in the release of a new major version I suppose?

Depending on how you interpet semver, bumping the php version does not constitue a bump in major version of a package. Because composer will halt installation of that new version, because it is incompatible with your php version.

It would be bad practice to do this in a patch version, or not communicate this properly though.

@davedevelopment
Copy link
Collaborator

Fixed in #947, thank you

@MKodde
Copy link
Contributor Author

MKodde commented Feb 13, 2019

Thanks for the quick response and reviewing guys, I'm closing this issue!

@MKodde MKodde closed this as completed Feb 13, 2019
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

No branches or pull requests

3 participants