Skip to content

Commit

Permalink
Fixed: Renovate/phpunit phpunit 10.x (#99)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency phpunit/phpunit to v10

* Migrate phpunit config to newer schema

* Make data provider method static, as that is now enforced strictly

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
ciaranmcnulty and renovate[bot] committed Mar 21, 2023
1 parent 52020b4 commit 0134f41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion php/composer.json
Expand Up @@ -18,7 +18,7 @@
"cucumber/messages": "19.1.4 - 21"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^10.0",
"vimeo/psalm": "^5.0",
"friendsofphp/php-cs-fixer": "^3.5",
"psalm/plugin-phpunit": "^0.18.0",
Expand Down
13 changes: 4 additions & 9 deletions php/phpunit.xml
@@ -1,24 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResultFile=".phpunit.cache/test-results"
cacheDirectory=".phpunit.cache"
executionOrder="depends,defects"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
convertDeprecationsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
verbose="true">
beStrictAboutCoverageMetadata="true">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory=".phpunit.cache/code-coverage"
processUncoveredFiles="true">
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
Expand Down
2 changes: 1 addition & 1 deletion php/tests/Parser/RuleTypeTest.php
Expand Up @@ -18,7 +18,7 @@ public function testItCanCastFromTokens(TokenType $tokenType): void
/**
* @return Generator<string,array{0:TokenType}>
*/
public function tokenCaseProvider(): Generator
public static function tokenCaseProvider(): Generator
{
foreach (TokenType::cases() as $case) {
yield $case->name => [$case];
Expand Down

0 comments on commit 0134f41

Please sign in to comment.