Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Slightly simpler alternative for #428 to allow the tests to run on PHP 8 for now (save for two tests).
Based on this set up, we can conclude that for the code covered by the current tests, the library is compatible with PHP 8.
Closes #428
/cc @TimothyBJacobs
Commit details
Travis: simplify setting of
COMPOSER_PHPUNIT
env variableComposer: add convenience scripts for running the tests
Tests: fix PHPUnit configuration
The PHPUnit configuration did not validate against any available PHPUnit XSD file.
This stabilizes the file and annotates against which XSD it has been validated.
Notes:
backupGlobals
option has changed in PHPUnit 6 fromtrue
tofalse
.Setting this explicitly to
true
for cross-version compatibility.Composer: allow installation of a wider range of PHPUnit versions
Travis: allow installing PHPUnit 7.5 on nightly
RequestsTest_Transport_Base::testStatusCodeThrow*(): prevent marking as risky
These two tests set exception expectations in a limited set of circumstances. In all other circumstances they basically test that no exception is being thrown.
As in the "no exception" cases, no other assertions are performed, the tests would be marked as "risky".
By doing a simple
assertTrue()
, we prevent the test being marked as risky, while maintaining the existing test functionality.Tests: selectively skip two tests on PHP 8
... as they would fail due to the PHPUnit version being used not being compatible with PHP 8.
Once the test suite has been made compatible with PHPUnit 9.x, these tests should be able to run fine on PHP 8.