Skip to content

Commit acc121c

Browse files
authored
Merge pull request #29 from adriansuter/patch-updates
Update dependencies and drop support for php 7.2
2 parents 1f41daa + 68394e8 commit acc121c

File tree

5 files changed

+28
-33
lines changed

5 files changed

+28
-33
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
php: [ 7.2, 7.3, 7.4, 8.0 ]
13+
php: [ 7.3, 7.4, 8.0, 8.1 ]
1414
experimental: [ false ]
1515
include:
16-
- php: 8.0
16+
- php: 8.1
1717
analysis: true
1818

1919
steps:

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@
3434
]
3535
},
3636
"require": {
37-
"php": "^7.2 || ^8.0",
37+
"php": "^7.3 || ^8.0",
3838
"nikic/php-parser": "^4.4"
3939
},
4040
"require-dev": {
41-
"phpstan/phpstan": "^0.12 || ^1.0",
42-
"phpunit/phpunit": "^8.5 || ^9.3",
43-
"squizlabs/php_codesniffer": "^3.5"
41+
"phpstan/phpstan": "^1.4",
42+
"phpunit/phpunit": "^9.5",
43+
"phpspec/prophecy-phpunit": "^2.0",
44+
"squizlabs/php_codesniffer": "^3.6"
4445
},
4546
"scripts": {
4647
"test": [

phpunit.xml.dist

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
4-
backupGlobals="true"
5-
beStrictAboutOutputDuringTests="true"
6-
colors="true"
7-
bootstrap="tests/bootstrap.php">
8-
9-
<testsuites>
10-
<testsuite name="PHP Autoload Override Test Suite">
11-
<directory>./tests/</directory>
12-
</testsuite>
13-
</testsuites>
14-
15-
<filter>
16-
<whitelist processUncoveredFilesFromWhitelist="true">
17-
<directory suffix=".php">src/</directory>
18-
</whitelist>
19-
</filter>
20-
21-
<logging>
22-
<log
23-
type="coverage-html"
24-
target="./coverage"
25-
lowUpperBound="20"
26-
highLowerBound="50"/>
27-
</logging>
28-
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="true" beStrictAboutOutputDuringTests="true" colors="true" bootstrap="tests/bootstrap.php">
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory suffix=".php">src/</directory>
6+
</include>
7+
<report>
8+
<html outputDirectory="./coverage" lowUpperBound="20" highLowerBound="50"/>
9+
</report>
10+
</coverage>
11+
<testsuites>
12+
<testsuite name="PHP Autoload Override Test Suite">
13+
<directory>./tests/</directory>
14+
</testsuite>
15+
</testsuites>
16+
<logging/>
2917
</phpunit>

tests/CodeConverterTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414
use PhpParser\Parser;
1515
use PHPUnit\Framework\TestCase;
1616
use Prophecy\Argument;
17+
use Prophecy\PhpUnit\ProphecyTrait;
1718
use Prophecy\Prophecy\MethodProphecy;
1819
use RuntimeException;
1920

2021
class CodeConverterTest extends TestCase
2122
{
23+
use ProphecyTrait;
24+
2225
public function testConvert(): void
2326
{
2427
$converter = new CodeConverter();

tests/OverrideTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Composer\Autoload\ClassLoader;
1717
use PHPUnit\Framework\TestCase;
1818
use Prophecy\Argument;
19+
use Prophecy\PhpUnit\ProphecyTrait;
1920
use Prophecy\Prophecy\MethodProphecy;
2021
use ReflectionMethod;
2122
use ReflectionProperty;
@@ -26,6 +27,8 @@
2627
*/
2728
class OverrideTest extends TestCase
2829
{
30+
use ProphecyTrait;
31+
2932
public function testSetCodeConverter()
3033
{
3134
$converter = $this->createMock(CodeConverter::class);

0 commit comments

Comments
 (0)