Skip to content

Commit

Permalink
Updated PHPStan to v1 + PHPUnit to v9. (ekino#52)
Browse files Browse the repository at this point in the history
* Updated PHPStan to v1 + PHPUnit to v9.

* Updated PHPUnit XML to new schema structure.

* Updated changelog.

* Drop support for PHP7.2.

Co-authored-by: Richard Ainger <[email protected]>
  • Loading branch information
raing3 and raing3 authored Nov 2, 2021
1 parent b45ad74 commit 6897fd1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.2', '7.3', '7.4', '8.0' ]
php: [ '7.3', '7.4', '8.0' ]
steps:
- uses: actions/checkout@v2
- name: Setup PHP with tools
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/build/
/vendor/
/.php_cs.cache
/.php-cs-fixer.cache
/composer.lock
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ master
------

* Improve PHPStan configuration file
* Updated to PHPStan 1.0
* Updated to PHPUnit 9.5
* Drop support for PHP 7.2

v0.5.0
------
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
}
],
"require": {
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^0.12"
"php": "^7.3 || ^8.0",
"phpstan/phpstan": "^1.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.6",
"friendsofphp/php-cs-fixer": "^3.0",
"nikic/php-parser": "^4.3",
"phpstan/phpstan-phpunit": "^0.12",
"phpunit/phpunit": "^8.5",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5",
"symfony/var-dumper": "^5.0"
},
"extra": {
Expand Down
18 changes: 10 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.2/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
Expand All @@ -11,15 +11,17 @@
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</include>
<report>
<clover outputFile="build/phpunit/clover.xml"/>
<html outputDirectory="build/phpunit/html"/>
</report>
</coverage>

<logging>
<log type="coverage-clover" target="build/phpunit/clover.xml"/>
<log type="junit" target="build/phpunit/junit.xml"/>
<log type="coverage-html" target="build/phpunit/html"/>
<junit outputFile="build/phpunit/junit.xml"/>
</logging>
</phpunit>

0 comments on commit 6897fd1

Please sign in to comment.