Skip to content

Commit

Permalink
Added PHP 8 support.
Browse files Browse the repository at this point in the history
Dropped PHP 7.1 support.
  • Loading branch information
Bilge committed Dec 15, 2020
1 parent 8317537 commit db12909
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 19 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ notifications:
language: php

php:
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0

env:
matrix:
Expand All @@ -22,12 +21,12 @@ cache:
- vendor

install:
- composer self-update --1
- composer validate
- composer --no-interaction update $DEPENDENCIES

script:
- composer test -- --coverage-clover=build/logs/clover.xml --coverage-xml=build/coverage/coverage-xml
--log-junit=build/coverage/phpunit.junit.xml
- XDEBUG_MODE=coverage composer test -- --coverage-clover=build/logs/clover.xml
--coverage-xml=build/coverage/coverage-xml --log-junit=build/coverage/junit.xml
- travis_retry bash <(curl -s https://codecov.io/bash) || true
- composer mutation -- --min-msi=100 --threads=$(nproc) --show-mutations --coverage=build/coverage
- ln -sfv ../build test
- composer mutation -- --min-msi=98 --threads=$(nproc) --show-mutations --coverage=build/coverage
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"license": "LGPL-3.0",
"require": {
"php": "^7.1",
"php": "^7.3|^8",
"amphp/amp": "^2",
"async/throttle": "^3",
"psr/cache": "^1",
Expand All @@ -20,9 +20,12 @@
},
"require-dev": {
"amphp/phpunit-util": "^1.1",
"infection/infection": "^0.13",
"mockery/mockery": "^1.3",
"phpunit/phpunit": "^7.1.3"
"infection/infection": ">=0.18,<1",
"justinrainbow/json-schema": "^5.2.10",
"mockery/mockery": "^1.4.2",
"phpunit/php-code-coverage": "^9.2.5",
"phpunit/phpunit": "^9.5",
"thecodingmachine/safe": "^1.3.3"
},
"suggest" : {
"connectors/http": "Provides an HTTP connector for Porter providers.",
Expand Down
2 changes: 1 addition & 1 deletion test/Integration/Connector/ImportConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class ImportConnectorTest extends TestCase
/** @var AsyncDataSource|MockInterface */
private $asyncSource;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion test/Integration/PorterAsyncTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function testImportIncompatibleProviderAsync(): \Generator
$this->registerProvider(\Mockery::mock(Provider::class), $providerName = 'foo');

$this->expectException(IncompatibleProviderException::class);
$this->expectExceptionMessageRegExp('[\bAsyncProvider\b]');
$this->expectExceptionMessageMatches('[\bAsyncProvider\b]');
yield $this->porter->importAsync($this->specification->setProviderName($providerName));
}

Expand Down
2 changes: 1 addition & 1 deletion test/Integration/PorterSyncTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function testImportIncompatibleProvider(): void
$this->registerProvider(\Mockery::mock(AsyncProvider::class), $providerName = 'foo');

$this->expectException(IncompatibleProviderException::class);
$this->expectExceptionMessageRegExp('[\bProvider\b]');
$this->expectExceptionMessageMatches('[\bProvider\b]');
$this->porter->import($this->specification->setProviderName($providerName));
}

Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Collection/RecordCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function testNonArrayYield(): void
)->makePartial();

$this->expectException(\TypeError::class);
$this->expectExceptionMessage('must be of the type array');
$this->expectExceptionMessageMatches('[must be of( the)? type array]');
$collection->current();
}
}
2 changes: 1 addition & 1 deletion test/Unit/Connector/ImportConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class ImportConnectorTest extends TestCase
/** @var DataSource|MockInterface */
private $source;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
8 changes: 4 additions & 4 deletions test/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<testsuite name="all">
<directory>.</directory>
</testsuite>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<coverage processUncoveredFiles="true">
<include>
<directory>../src</directory>
</whitelist>
</filter>
</include>
</coverage>
</phpunit>

0 comments on commit db12909

Please sign in to comment.