Skip to content

Commit b25d9dd

Browse files
committed
Fix phpunit 10.0 compatibility and upgrade some dependencies
1 parent 19f8181 commit b25d9dd

File tree

5 files changed

+26
-25
lines changed

5 files changed

+26
-25
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
.gitattributes export-ignore
22
.gitignore export-ignore
3+
tests/ export-ignore
4+
5+
phpunit.xml
6+
psalm.xml

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.1",
20-
"phplrt/lexer-contracts": "^4.0",
21-
"phplrt/source-contracts": "^4.0"
19+
"php": "^7.4|^8.0",
20+
"phplrt/lexer-contracts": "^3.4",
21+
"phplrt/source-contracts": "^3.4"
2222
},
2323
"autoload": {
2424
"psr-4": {
2525
"Phplrt\\Contracts\\Exception\\": "src"
2626
}
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^10.5|^11.0",
29+
"phpunit/phpunit": "^9.6|^10.0",
3030
"vimeo/psalm": "^5.21"
3131
},
3232
"autoload-dev": {
@@ -36,8 +36,8 @@
3636
},
3737
"extra": {
3838
"branch-alias": {
39-
"dev-master": "4.x-dev",
40-
"dev-main": "4.x-dev"
39+
"dev-master": "3.x-dev",
40+
"dev-main": "3.x-dev"
4141
}
4242
},
4343
"config": {

phpunit.xml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1+
12
<?xml version="1.0" encoding="UTF-8"?>
23
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4-
colors="true"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
55
backupGlobals="true"
6-
stopOnFailure="false"
7-
processIsolation="false"
6+
backupStaticAttributes="false"
87
bootstrap="vendor/autoload.php"
9-
cacheDirectory="vendor/.phpunit.cache"
10-
backupStaticProperties="false"
8+
colors="true"
9+
convertErrorsToExceptions="true"
10+
convertNoticesToExceptions="true"
11+
convertWarningsToExceptions="true"
12+
processIsolation="false"
13+
stopOnFailure="false"
1114
>
15+
<php>
16+
<ini name="error_reporting" value="-1"/>
17+
<ini name="memory_limit" value="-1"/>
18+
</php>
19+
1220
<testsuites>
1321
<testsuite name="unit">
1422
<directory>tests</directory>
1523
</testsuite>
1624
</testsuites>
1725

18-
<coverage/>
19-
20-
<source>
26+
<coverage>
2127
<include>
2228
<directory suffix=".php">src</directory>
2329
</include>
24-
</source>
25-
26-
<php>
27-
<ini name="error_reporting" value="-1"/>
28-
<ini name="memory_limit" value="-1"/>
29-
</php>
30+
</coverage>
3031
</phpunit>

tests/CompatibilityTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
use Phplrt\Contracts\Exception\RuntimeExceptionInterface;
88
use Phplrt\Contracts\Lexer\TokenInterface;
99
use Phplrt\Contracts\Source\ReadableInterface;
10-
use PHPUnit\Framework\Attributes\Group;
1110

1211
/**
1312
* Note: Changing the behavior of these tests is allowed ONLY when updating
1413
* a MAJOR version of the package.
1514
*/
16-
#[Group('phplrt/exception-contracts')]
1715
class CompatibilityTest extends TestCase
1816
{
1917
public function testRuntimeExceptionCompatibility(): void

tests/TestCase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Phplrt\Contracts\Exception\Tests;
66

7-
use PHPUnit\Framework\Attributes\Group;
87
use PHPUnit\Framework\TestCase as BaseTestCase;
98

10-
#[Group('phplrt/exception-contracts')]
119
abstract class TestCase extends BaseTestCase {}

0 commit comments

Comments
 (0)