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

Doesn't work with legacy versions of PHPUnit #171

Open
nicole-ashley opened this issue Nov 17, 2020 · 5 comments
Open

Doesn't work with legacy versions of PHPUnit #171

nicole-ashley opened this issue Nov 17, 2020 · 5 comments
Labels
info needed More information needed

Comments

@nicole-ashley
Copy link

The unguarded references to PHPUnit\Runner\Version in src/Printer.php mean that this doesn't work with any version of PHPUnit before the namespace refactor. Understandably this is a pretty old version and most people shouldn't be running it, but this as module appears to support it elsewhere this should be fixed by wrapping them in a class_exists check.

@mikeerickson
Copy link
Owner

mikeerickson commented Nov 17, 2020

Hey @nikrolls

What version of PHPUnit are you using?
What version of PHP are you using?

We have gone to great lengths to maintain support as far back as possible, but at some point we need to make a decision just how far back we can realistically support

I would be happy to take a look at this, but no promises.

@mikeerickson mikeerickson changed the title Doesn't work with versions of PHPUnit that don't contain PHPUnit\Runner\Version Doesn't work with legacy versions of PHPUnit Nov 17, 2020
@mikeerickson mikeerickson added the info needed More information needed label Nov 17, 2020
@nicole-ashley
Copy link
Author

@mikeerickson In this case I'm using PHPUnit 5.7 (sorry about that - the framework I'm using will update soon but hasn't yet) on PHP 7.4.

There are other issues with PHPUnit 5.7 - even when I make the changes I've suggested it still doesn't work - but in this issue I'm focusing solely on the logistical issues in src/Printer.php. PHPUnit\Runner\Version was introduced in PHPUnit 6.0; before that it was called PHPUnit_Runner_Version. There was no forward compatibility class for it either. So to support PHPUnit 5, you would need to wrap all of the usages of PHPUnit\Runner\Version in a class_exists check, or somehow use the legacy PHPUnit_Runner_Version class when PHPUnit\Runner\Version doesn't exist.

@mikeerickson
Copy link
Owner

@nikrolls ya, I am aware of what needs to new done, just hard to support so many versions of PHPUnit as they have a tendency to make these radical changes between releases. This will likely be a one of change to address your specific problem.

I will make time this coming week as I have slowed down a bit for thanksgiving and taking a bit of time off from my day job to refuel. But, I will get it addressed for you.

@nicole-ashley
Copy link
Author

No worries, no rush! If I get a chance I will raise some PRs, but I can't promise anything 😁 Just wanted to make sure it was recorded.

@mikeerickson
Copy link
Owner

If you have the time, feel free. Otherwise I will get it knocked within the next week.

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

No branches or pull requests

2 participants