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 8.0 support #50
Comments
Hi @boesing, regarding the PHPUnit dependency upgrade: the assertions This repository seems to use these assertions quite a lot, what's the recommended upgrade path for the tests which use these assertions? |
@jensdenies that really depends on the context in which those assertions are used. Some can be addressed by comparing objects ( Perhaps PHPUnit upgrade and dropping PHP 7.3 should be done in a separate PR, so that we can more easily contain the scope of changes? |
Hi @lcobucci, several of these assertions are used to read private properties, which are indeed implementation details. Those properties do not always have an associated getter, so IMO it would be best to remove those and only test the public API of those classes. Regarding your last comment, that would certainly make thing easier because the assertions are still available in PHPUnit 8. I think it would make the upgrade path a lot easier. |
@jensdenies Imho, the current tests can be rewritten with reflection. Feel free to create some trait within the I wont recommend rewriting the whole testsuite as this would take too much time. We've done so in many other components aswell. |
@boesing I will create a PR with a trait to polyfill those traits, like you proposed. When looking at other Laminas repositories, I see that in some cases, tests which test implementation details are removed. Is that something you'd like to see in the PR as well? |
@jensdenies Depends. The tests which were removed were tests to verify if backwards compatibility to servicemanager v2 works. |
@boesing Okay, I will create a PR working on PHP 8.0 with a polyfill trait and let's see from there. |
Feature Request
Summary
To be prepared for the december release of PHP 8.0, this repository has some additional TODOs to be tested against the new major version.
In order to make this repository compatible, one has to follow these steps:
composer.json
to provide support for PHP 8.0 by adding the constraint~8.0.0
composer.json
to drop support for PHP less than 7.3composer.json
to implement phpunit 9.3 which supports PHP 7.3+.travis.yml
to ignore platform requirements when installing composer dependencies (simply add--ignore-platform-reqs
toCOMPOSER_ARGS
env variable).travis.yml
to add PHP 8.0 to the matrix (NOTE: Do not allow failures as PHP 8.0 has a feature freeze since 2020-08-04!)The text was updated successfully, but these errors were encountered: