Closed jdavid closed 3 years ago
Added @kavalerov as a reviewer as he may have opinions on dropped runtime support.
I haven't tested the SDK itself, but change in supported versions looks right to me, yes.
For visibility - the change in supported versions here is in line with current PHP support
To get the test suite working with PHP 8.0 we have to upgrade PHPUnit. Only versions 8 and 9 support PHP 8.0, see https://phpunit.de/supported-versions.html
Note that there are no changes to the src folder. So this version could work with PHP 5.6, 7.0 and 7.1, but the tests won't pass.
Breaking changes in PHPUnit require to update the test suite. So the tests either pass with PHP 8.0 or with the older versions, but not both.
PHP 5.6 error, see https://github.com/ably/ably-php/runs/2041202213?check_suite_focus=true
PHP Parse error: syntax error, unexpected ':', expecting ';' or '{' in ...
PHP 7.0 error, see https://github.com/ably/ably-php/runs/2041202230?check_suite_focus=true
PHP Fatal error: Uncaught TypeError: Return value of DebugTestListener::startTestSuite() must be an instance of void, none returned in ...
PHP 7.1 error, see https://github.com/ably/ably-php/runs/2041202249?check_suite_focus=true
PHP Fatal error: Declaration of DebugTestListener::endTest(PHPUnit\Framework\Test $test, $time): void must be compatible with PHPUnit\Framework\TestListener::endTest(PHPUnit\Framework\Test $test, float $time): void in ...
While the commit is large, there are only a few changes that repeat through the test suite:
phpunit.xml
to use whitelist
instead of blacklist
DebugTestListener.php
to use TestListenerDefaultImplementation
instead of PHPUnit_Framework_BaseTestListener
\PHPUnit_Framework_TestCase
by \PHPUnit\_Framework\_TestCase
: void
to TestCase
functions. This is the change that produces the syntax error in PHP 5.6assertContains
by assertStringContainsString
$this->expectException(..)
instead of @expectedException ...
fail(...)
testIdempotentLibraryGenerated
, which worked before only by accident
Add support for PHP 8.0