-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Backward compatibility with old PHPUnit versions #3543
Comments
This is not a discussion or support forum, sorry. Everything I have to say on this subject I have written down here. |
@sebastianbergmann So the only possible solution is to not use PHPUnit 8? Or is there some "polyfill" for this? |
@filips123 a little polyfills we created at PHP CS Fixer to have more wide range of PHPUnit versions available for us, yet having the code written in "new" way already (so polyfills of most crucial upcoming changes, nothing about backward compatibility) is available here: |
When it will be ready for PHPUnit 8? Unfortunately I currently don't have time to add support for it. Also, I recommend that you add some exampley, documentation and README file to it. So it will be easier to use it. |
Did you just invite us to your party? 🎈 🍰 |
whenever someone would find time for it. it's not on my prio list, yet's it's open and public - if your needs for it are bigger than mine, just give it a try ;)
sure. as I said on beginning, we have it done for our PHP CS Fixer mostly, that's why it's not greatly documented etc. yet, at same time, it allows us to use @epdenouden , depends on the need. I do understand that this package is aimed only for projects that are using legacy (or at least not newest) version of the tool, but well, syntax linter has to support more than newest PHP engine ;) |
@keradus I opened issues about PHPUnit 8 and documentation at PHPUnitGoodPractices/polyfill#6 and PHPUnitGoodPractices/polyfill#7. |
For anyone's solving this problem of testing under PHP 5.5 - PHP 8.0 with PHPUnit, here's how it can be done: php-coveralls/php-coveralls#295 |
My project's dependencies require PHP 5.5 or later, so I want to test my project on PHP 5.5 - 7.3 with PHPUnit.
Until PHPUnit 8, I was able to test it with just requiring PHPUnit 4.8+ which had forward compatibility for namespaced test case syntax as described in my StackOverflow question.
But PHPUnit 8 now has return type declaration which is not compatible with older PHP and PHPUnit versions.
Is there any backward compatibility or another possibility to use the same test case for all PHPUnit (PHP) version?
The text was updated successfully, but these errors were encountered: