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

Make compatible with phpunit 7.x #41

Merged
merged 5 commits into from
Feb 24, 2018
Merged

Make compatible with phpunit 7.x #41

merged 5 commits into from
Feb 24, 2018

Conversation

luispabon
Copy link
Contributor

  • Drop compatibility with php 7.0 as phpunit 7 requires 7.1 minimum
  • Update listener with new interface signature
  • Reimplement not to use BaseTestListener from phpunit/framework (not there anymore)

Since this is a BC break, a release with this code will need tagging as 3.0.

@Trainmaster Trainmaster mentioned this pull request Feb 9, 2018
@keradus
Copy link
Contributor

keradus commented Feb 14, 2018

great job, eager to see it happen !

@luispabon
Copy link
Contributor Author

@johnkary ?

"php": ">=7.0",
"phpunit/phpunit": "^6.0"
"php": ">=7.1",
"phpunit/phpunit": "^7.0"

Choose a reason for hiding this comment

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

@luispabon You could also support ^6.4|^7.0 with this.

Copy link
Contributor

@keradus keradus Feb 22, 2018

Choose a reason for hiding this comment

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

no you can't.
PHPUnit 6 doesn't have typehinting, PHPUnit 7 does, if you want to support both, you need to provide 2 versions of class and load one depends on PHPUnit version

Copy link
Contributor Author

@luispabon luispabon Feb 22, 2018

Choose a reason for hiding this comment

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

as keradus said it cannot be done due to interfaces being completely incompatible due to the newer php7.1 type hints. You would need two implementations, and that's what semver+composer already give us.

Choose a reason for hiding this comment

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

Ah yeah... totally overlooked the additional typehints in 7.0.

@umpirsky
Copy link

@johnkary Any eta on this?

@johnkary
Copy link
Owner

@luispabon Thank you so much for your work to add PHPUnit 7 support. This works wonderfully and we'll move forward tagging a 3.0 based on this work.

Also thank you to other contributors for your PR feedback.

@johnkary johnkary merged commit bf42ebf into johnkary:master Feb 24, 2018
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.

5 participants