Skip to content

Commit 611a9a0

Browse files
authored
Migrate the testsuite to PHPUnit 11 (#1977)
1 parent 9fe1c63 commit 611a9a0

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
- name: Download dependencies
3232
run: |
3333
composer config minimum-stability dev
34-
composer req symfony/phpunit-bridge --no-update
3534
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
3635
3736
- name: Run tests
38-
run: ./vendor/bin/simple-phpunit
37+
run: ./vendor/bin/phpunit

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ start-docker:
99
docker run -d -p 9001:9001 -e DOCKER_LAMBDA_STAY_OPEN=1 -v "$(ROOT_DIR)/tests/fixtures/lambda":/var/task:ro,delegated --name async_aws_lambda lambci/lambda:nodejs12.x index.handler
1010

1111
test: initialize
12-
./vendor/bin/simple-phpunit
12+
./vendor/bin/phpunit
1313

1414
clean: stop-docker
1515
stop-docker:

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"ext-json": "*",
1717
"async-aws/core": "^1.9"
1818
},
19+
"require-dev": {
20+
"phpunit/phpunit": "^11.5.42",
21+
"symfony/error-handler": "^7.3.2 || ^8.0",
22+
"symfony/phpunit-bridge": "^7.3.2 || ^8.0"
23+
},
1924
"autoload": {
2025
"psr-4": {
2126
"AsyncAws\\Lambda\\": "src"

phpunit.xml.dist

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
44
backupGlobals="false"
55
colors="true"
66
bootstrap="vendor/autoload.php"
77
failOnRisky="true"
88
failOnWarning="true"
9+
failOnDeprecation="true"
10+
failOnNotice="true"
911
>
10-
<coverage>
12+
<source ignoreSuppressionOfDeprecations="true">
1113
<include>
1214
<directory>./src</directory>
1315
</include>
14-
</coverage>
16+
<deprecationTrigger>
17+
<function>trigger_deprecation</function>
18+
</deprecationTrigger>
19+
</source>
1520
<php>
1621
<ini name="error_reporting" value="-1"/>
1722
</php>
@@ -20,4 +25,7 @@
2025
<directory>./tests/</directory>
2126
</testsuite>
2227
</testsuites>
28+
<extensions>
29+
<bootstrap class="Symfony\Bridge\PhpUnit\SymfonyExtension"/>
30+
</extensions>
2331
</phpunit>

0 commit comments

Comments
 (0)