Skip to content

Commit fe2764a

Browse files
committed
Added PHP 8 support.
Dropped PHP 7.1 support.
1 parent 8317537 commit fe2764a

File tree

8 files changed

+19
-13
lines changed

8 files changed

+19
-13
lines changed

.travis.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ notifications:
44
language: php
55

66
php:
7-
- 7.1
87
- 7.2
98
- 7.3
109
- 7.4
10+
- 8.0
1111

1212
env:
1313
matrix:
@@ -22,12 +22,12 @@ cache:
2222
- vendor
2323

2424
install:
25-
- composer self-update --1
2625
- composer validate
2726
- composer --no-interaction update $DEPENDENCIES
2827

2928
script:
30-
- composer test -- --coverage-clover=build/logs/clover.xml --coverage-xml=build/coverage/coverage-xml
31-
--log-junit=build/coverage/phpunit.junit.xml
29+
- XDEBUG_MODE=coverage composer test -- --coverage-clover=build/logs/clover.xml
30+
--coverage-xml=build/coverage/coverage-xml --log-junit=build/coverage/junit.xml
3231
- travis_retry bash <(curl -s https://codecov.io/bash) || true
33-
- composer mutation -- --min-msi=100 --threads=$(nproc) --show-mutations --coverage=build/coverage
32+
- ln -sfv ../build test
33+
- composer mutation -- --min-msi=99 --threads=$(nproc) --show-mutations --coverage=build/coverage

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"license": "LGPL-3.0",
1111
"require": {
12-
"php": "^7.1",
12+
"php": "^7.2|^8",
1313
"amphp/amp": "^2",
1414
"async/throttle": "^3",
1515
"psr/cache": "^1",
@@ -20,9 +20,9 @@
2020
},
2121
"require-dev": {
2222
"amphp/phpunit-util": "^1.1",
23-
"infection/infection": "^0.13",
23+
"infection/infection": ">=0.15,<1",
2424
"mockery/mockery": "^1.3",
25-
"phpunit/phpunit": "^7.1.3"
25+
"phpunit/phpunit": "^8.5|^9"
2626
},
2727
"suggest" : {
2828
"connectors/http": "Provides an HTTP connector for Porter providers.",

test/Integration/Connector/ImportConnectorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ final class ImportConnectorTest extends TestCase
3232
/** @var AsyncDataSource|MockInterface */
3333
private $asyncSource;
3434

35-
protected function setUp()
35+
protected function setUp(): void
3636
{
3737
parent::setUp();
3838

test/Integration/PorterAsyncTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function testImportIncompatibleProviderAsync(): \Generator
123123
$this->registerProvider(\Mockery::mock(Provider::class), $providerName = 'foo');
124124

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

test/Integration/PorterSyncTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function testImportIncompatibleProvider(): void
168168
$this->registerProvider(\Mockery::mock(AsyncProvider::class), $providerName = 'foo');
169169

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

test/Unit/Collection/RecordCollectionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testNonArrayYield(): void
5656
)->makePartial();
5757

5858
$this->expectException(\TypeError::class);
59-
$this->expectExceptionMessage('must be of the type array');
59+
$this->expectExceptionMessageMatches('[must be of( the)? type array]');
6060
$collection->current();
6161
}
6262
}

test/Unit/Connector/ImportConnectorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class ImportConnectorTest extends TestCase
2525
/** @var DataSource|MockInterface */
2626
private $source;
2727

28-
protected function setUp()
28+
protected function setUp(): void
2929
{
3030
parent::setUp();
3131

test/phpunit.xml

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
<testsuite name="all">
55
<directory>.</directory>
66
</testsuite>
7+
<coverage processUncoveredFiles="true">
8+
<include>
9+
<directory>../src</directory>
10+
</include>
11+
</coverage>
12+
<!-- TODO: Remove obsolete block when support for PHPUnit 8 dropped. -->
713
<filter>
814
<whitelist processUncoveredFilesFromWhitelist="true">
915
<directory>../src</directory>

0 commit comments

Comments
 (0)