Skip to content

Commit 3d06b40

Browse files
authored
Force php ^8.1 usage (#76)
* Update dependencies * No more php80 * Upgrade phpunit to 9 * Use ProphecyTrait * Styling
1 parent 048b0a7 commit 3d06b40

4 files changed

Lines changed: 29 additions & 31 deletions

File tree

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
php-versions: ['8.0', '8.1', '8.2']
15+
php-versions: ['8.1', '8.2']
1616
name: PHP ${{ matrix.php-versions }}
1717
steps:
1818
- uses: actions/checkout@v2

composer.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,24 @@
55
"license": "MIT",
66
"minimum-stability": "stable",
77
"require": {
8-
"php": "^8.0",
8+
"php": "^8.1",
99
"composer-plugin-api": "^2.0",
1010
"ext-bcmath": "*",
1111
"ext-json": "*",
12-
"doctrine/annotations": "^1.11.1",
13-
"doctrine/collections": "^1.6",
14-
"doctrine/dbal": "^2.13.2||^3.0.0",
15-
"doctrine/inflector": "^1.4.4|^2.0",
16-
"doctrine/orm": "~2.4",
17-
"symfony/filesystem": "^4.4||^5.0",
18-
"twig/twig": "^2.14.1||^3.0"
12+
"doctrine/annotations": "^1.14.3",
13+
"doctrine/collections": "^1.8.0",
14+
"doctrine/dbal": "^3.7.2",
15+
"doctrine/inflector": "^2.0.8",
16+
"doctrine/orm": "^2.17.2",
17+
"symfony/filesystem": "^5.4",
18+
"twig/twig": "^3.4.3"
1919
},
2020
"require-dev": {
21-
"composer/composer": "^2.0.0",
22-
"hostnet/phpcs-tool": "^9.0.0",
23-
"phpspec/prophecy": "^1.17",
24-
"phpunit/phpunit": "^8.5.0"
25-
},
26-
"conflict": {
27-
"doctrine/orm": "2.9.0|2.9.1"
21+
"composer/composer": "^2.0.0",
22+
"hostnet/phpcs-tool": "^9.0.0",
23+
"phpspec/prophecy": "^1.17",
24+
"phpspec/prophecy-phpunit": "^2.1",
25+
"phpunit/phpunit": "^9.6.0"
2826
},
2927
"autoload": {
3028
"psr-4": {

phpunit.xml.dist

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/7.2/phpunit.xsd"
5-
colors="true" bootstrap="vendor/autoload.php">
6-
<testsuites>
7-
<testsuite name="tests">
8-
<directory>test</directory>
9-
</testsuite>
10-
</testsuites>
11-
<filter>
12-
<whitelist>
13-
<directory>src</directory>
14-
<directory>test/Generator/fixtures/expected/</directory>
15-
</whitelist>
16-
</filter>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" colors="true" bootstrap="vendor/autoload.php">
3+
<coverage>
4+
<include>
5+
<directory>src</directory>
6+
<directory>test/Generator/fixtures/expected/</directory>
7+
</include>
8+
</coverage>
9+
<testsuites>
10+
<testsuite name="tests">
11+
<directory>test</directory>
12+
</testsuite>
13+
</testsuites>
1714
</phpunit>

test/Generator/PracticalVehicleOwnerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@
1313
use Hostnet\Component\AccessorGenerator\Generator\fixtures\PracticalVehicleOwner;
1414
use Hostnet\Component\AccessorGenerator\Generator\fixtures\VehicleInterface;
1515
use PHPUnit\Framework\TestCase;
16+
use Prophecy\PhpUnit\ProphecyTrait;
1617

1718
/**
1819
* @covers \Hostnet\Component\AccessorGenerator\Generator\fixtures\Generated\PracticalVehicleOwnerMethodsTrait
1920
*/
2021
class PracticalVehicleOwnerTest extends TestCase
2122
{
23+
use ProphecyTrait;
24+
2225
public function testAddVehicle(): void
2326
{
2427
$boat = new Boat();

0 commit comments

Comments
 (0)