Skip to content

Commit

Permalink
Update dependency phpunit/phpunit to v10 (#955)
Browse files Browse the repository at this point in the history
* Update dependency phpunit/phpunit to v10

* Fix php10 errors

* wip

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Aitor Errasti <azarparalelo@gmail.com>
  • Loading branch information
renovate[bot] and aerrasti committed Mar 9, 2023
1 parent 41504da commit 1fbf1d3
Show file tree
Hide file tree
Showing 10 changed files with 251 additions and 402 deletions.
1 change: 1 addition & 0 deletions backend/.gitignore
Expand Up @@ -22,4 +22,5 @@ coverage/

.phpunit
.phpunit.result.cache
.phpunit.cache
/phpunit.xml
3 changes: 1 addition & 2 deletions backend/composer.json
Expand Up @@ -66,10 +66,9 @@
"phpstan/phpstan-phpunit": "1.3.10",
"phpstan/phpstan-symfony": "1.2.23",
"phpstan/phpstan-webmozart-assert": "1.2.4",
"phpunit/phpunit": "9.6.5",
"phpunit/phpunit": "10.0.14",
"psalm/plugin-phpunit": "0.18.4",
"psalm/plugin-symfony": "5.0.1",
"runroom-packages/testing": "0.16.0",
"symfony/browser-kit": "6.2.7",
"symfony/debug-bundle": "6.2.7",
"symfony/maker-bundle": "1.48.0",
Expand Down
579 changes: 225 additions & 354 deletions backend/composer.lock

Large diffs are not rendered by default.

Expand Up @@ -98,7 +98,7 @@ public function itTranslatesCorrectlyLoginErrorMessage(string $langCode, string
}

/** @return iterable<array{0: string, 1: string}> */
public function errorMessageProvider(): iterable
public static function errorMessageProvider(): iterable
{
yield ['es', 'Credenciales no válidas'];
yield ['en', 'Invalid credentials'];
Expand Down
Expand Up @@ -232,7 +232,7 @@ public function itGetsCorrectRoomsByParameter(string $room): void
}

/** @return iterable<array{string}> */
public function roomProvider(): iterable
public static function roomProvider(): iterable
{
yield ['first'];
yield ['second'];
Expand Down
Expand Up @@ -139,7 +139,7 @@ public function itGetsCorrectFishbowl(string $className, string $transition): vo
}

/** @return iterable<array{0: class-string}> */
public function mutationResolverProvider(): iterable
public static function mutationResolverProvider(): iterable
{
yield [FishbowlRunMutationResolver::class];
yield [FishbowlNoIntroRunMutationResolver::class];
Expand All @@ -148,7 +148,7 @@ public function mutationResolverProvider(): iterable
}

/** @return iterable<array{0: class-string, 1: Fishbowl::TRANSITION_*}> */
public function mutationResolverProviderWithTransition(): iterable
public static function mutationResolverProviderWithTransition(): iterable
{
yield [FishbowlRunMutationResolver::class, Fishbowl::TRANSITION_RUN];
yield [FishbowlNoIntroRunMutationResolver::class, Fishbowl::TRANSITION_NO_INTRO_RUN];
Expand Down
Expand Up @@ -77,7 +77,7 @@ public function itCantRunWorkflowMutationWithWrongUser(
}

/** @return iterable<array{string, string, string, bool}> */
public function mutationProvider(): iterable
public static function mutationProvider(): iterable
{
yield ['IntroduceFishbowl', 'introduceFishbowl', Fishbowl::STATUS_NOT_STARTED, true];
yield ['RunFishbowl', 'runFishbowl', Fishbowl::STATUS_INTRODUCTION, true];
Expand Down Expand Up @@ -115,7 +115,7 @@ public function itRunsWorkflowMutationWhenFishbowlHostsExecutesThem(
}

/** @return iterable<array{string, string, string, string, bool}> */
public function mutationProviderWithFinalStatus(): iterable
public static function mutationProviderWithFinalStatus(): iterable
{
yield ['IntroduceFishbowl', 'introduceFishbowl', Fishbowl::STATUS_NOT_STARTED, Fishbowl::STATUS_INTRODUCTION, true];
yield ['RunFishbowl', 'runFishbowl', Fishbowl::STATUS_INTRODUCTION, Fishbowl::STATUS_RUNNING, true];
Expand Down Expand Up @@ -153,7 +153,7 @@ public function itBlocksWorkflowDependingHasIntroductionValue(
}

/** @return iterable<array{string, string, string, bool}> */
public function mutationHasIntroduceProvider(): iterable
public static function mutationHasIntroduceProvider(): iterable
{
yield ['IntroduceFishbowl', 'introduceFishbowl', Fishbowl::STATUS_NOT_STARTED, false];
yield ['NoIntroRunFishbowl', 'noIntroRunFishbowl', Fishbowl::STATUS_NOT_STARTED, true];
Expand Down
Expand Up @@ -371,7 +371,7 @@ public function itGeneratesDefaultTitle(string $fishbowlTitle): void
}

/** @return iterable<array{string}> */
public function fishbowlTitleProvider(): iterable
public static function fishbowlTitleProvider(): iterable
{
yield [''];
yield [' '];
Expand Down
48 changes: 16 additions & 32 deletions backend/phpunit.xml.dist
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
This file is part of the Stooa codebase.
Expand All @@ -10,35 +9,20 @@ For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
-->

<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<php>
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>

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

<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<php>
<ini name="error_reporting" value="-1"/>
<server name="APP_ENV" value="test" force="true"/>
<server name="SHELL_VERBOSITY" value="-1"/>
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>packages/*/tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</phpunit>
6 changes: 0 additions & 6 deletions backend/symfony.lock
Expand Up @@ -355,9 +355,6 @@
"rector/rector": {
"version": "0.12.21"
},
"runroom-packages/testing": {
"version": "0.9.2"
},
"sebastian/cli-parser": {
"version": "1.0.0"
},
Expand Down Expand Up @@ -397,9 +394,6 @@
"sebastian/recursion-context": {
"version": "4.0.2"
},
"sebastian/resource-operations": {
"version": "3.0.2"
},
"sebastian/type": {
"version": "2.2.1"
},
Expand Down

0 comments on commit 1fbf1d3

Please sign in to comment.