Skip to content

Commit

Permalink
tec: Upgrade to PHPUnit 10
Browse files Browse the repository at this point in the history
The PHPUnit bridge doesn't fully support PHPUnit 10 officially. I tried
with and without the bridge. I don't get the deprecation notices without
it, while I have them, even without the PHPUnit listener (that I had to
remove).

The rest of the tests doesn't seem to be impacted (I use very few of the
features of the bridge).

Reference: symfony/symfony#49069
  • Loading branch information
marien-probesys committed Dec 1, 2023
1 parent e442bce commit 4dd097d
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 304 deletions.
24 changes: 9 additions & 15 deletions .phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
convertDeprecationsToExceptions="false"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
bootstrap="tests/bootstrap.php"
failOnDeprecation="true"
>
<php>
<ini name="display_errors" value="1" />
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="9.6" />
</php>

<testsuites>
<testsuite name="Project Test Suite">
<testsuite name="Bileto Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>

<coverage processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
</source>

<extensions>
</extensions>
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ icons: ## Build the icons asset
test: ## Run the test suite
$(PHP) ./bin/phpunit \
-c .phpunit.xml.dist \
$(COVERAGE) --whitelist ./src \
--testdox \
$(COVERAGE) \
$(PHPUNIT_FILTER) \
$(PHPUNIT_FILE)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
},
"require-dev": {
"phpstan/phpstan": "^1.8",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "*",
"symfony/browser-kit": "6.4.*",
"symfony/css-selector": "6.4.*",
Expand Down
Loading

0 comments on commit 4dd097d

Please sign in to comment.