Skip to content

Commit db12909

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

File tree

8 files changed

+21
-19
lines changed

8 files changed

+21
-19
lines changed

.travis.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ notifications:
44
language: php
55

66
php:
7-
- 7.1
8-
- 7.2
97
- 7.3
108
- 7.4
9+
- 8.0
1110

1211
env:
1312
matrix:
@@ -22,12 +21,12 @@ cache:
2221
- vendor
2322

2423
install:
25-
- composer self-update --1
2624
- composer validate
2725
- composer --no-interaction update $DEPENDENCIES
2826

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

composer.json

Lines changed: 7 additions & 4 deletions
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.3|^8",
1313
"amphp/amp": "^2",
1414
"async/throttle": "^3",
1515
"psr/cache": "^1",
@@ -20,9 +20,12 @@
2020
},
2121
"require-dev": {
2222
"amphp/phpunit-util": "^1.1",
23-
"infection/infection": "^0.13",
24-
"mockery/mockery": "^1.3",
25-
"phpunit/phpunit": "^7.1.3"
23+
"infection/infection": ">=0.18,<1",
24+
"justinrainbow/json-schema": "^5.2.10",
25+
"mockery/mockery": "^1.4.2",
26+
"phpunit/php-code-coverage": "^9.2.5",
27+
"phpunit/phpunit": "^9.5",
28+
"thecodingmachine/safe": "^1.3.3"
2629
},
2730
"suggest" : {
2831
"connectors/http": "Provides an HTTP connector for Porter providers.",

test/Integration/Connector/ImportConnectorTest.php

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<testsuite name="all">
55
<directory>.</directory>
66
</testsuite>
7-
<filter>
8-
<whitelist processUncoveredFilesFromWhitelist="true">
7+
<coverage processUncoveredFiles="true">
8+
<include>
99
<directory>../src</directory>
10-
</whitelist>
11-
</filter>
10+
</include>
11+
</coverage>
1212
</phpunit>

0 commit comments

Comments
 (0)