Skip to content

Commit

Permalink
Migrate PHPUnit to 10 and matthiasnoback/symfony-dependency-injection…
Browse files Browse the repository at this point in the history
…-test to 5
  • Loading branch information
dfridrich committed Dec 9, 2023
1 parent 7ba6a99 commit e4d712b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 36 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ jobs:
- php-versions: '8.1'
operating-system: windows-latest
coverage: xdebug

- php-versions: '8.2'
operating-system: ubuntu-latest
symfony-version: '7.0.*'
extra-label: 'SF 7.0'

- php-versions: '8.3'
operating-system: ubuntu-latest
symfony-version: '7.0.*'
extra-label: 'SF 7.0'

steps:
# see https://github.com/actions/checkout/issues/226#issue-606867805
- name: Prepare git
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
},
"require-dev": {
"consistence-community/coding-standard": "3.11.2",
"matthiasnoback/symfony-dependency-injection-test": "4.3.0",
"matthiasnoback/symfony-dependency-injection-test": "^5.0",
"phpstan/extension-installer": "1.1.0",
"phpstan/phpstan-phpunit": "1.1.1",
"phpstan/phpstan": "1.8.5",
"phpunit/phpunit": "9.5.24"
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": {
Expand Down
53 changes: 19 additions & 34 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,36 +1,21 @@
<?xml version="1.0"?>
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
>

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

<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html
outputDirectory="build/logs/coverage-report"
/>
<text
outputFile="php://stdout"
showUncoveredFiles="true"
showOnlySummary="true"
/>
</report>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" beStrictAboutChangesToGlobalState="true" beStrictAboutOutputDuringTests="true" failOnRisky="true" failOnWarning="true" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/logs/coverage-report"/>
<text outputFile="php://stdout" showUncoveredFiles="true" showOnlySummary="true"/>
</report>
</coverage>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>
</phpunit>

0 comments on commit e4d712b

Please sign in to comment.