Skip to content

Use PHPUnit 12 where possible #7974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2025

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented May 23, 2025

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #7880
Related issues/PRs #
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Use PHPUnit 12 where possible. See also: #7880

Why?

Use latest version and get rid of outdated dependencies. Open the version constraint that PHP 8.3 and 8.4 run on PHPUnit 12.

@alexander-schranz alexander-schranz added the Technical Debt Impacts code quality, no or just small impact on end developers and users label May 23, 2025
@alexander-schranz
Copy link
Member Author

PHPStan issues unrelated: #7975

@alexander-schranz alexander-schranz force-pushed the enhancement/phpunit-12 branch from b074e2d to 5b6efcb Compare May 23, 2025 10:16
@alexander-schranz alexander-schranz force-pushed the enhancement/phpunit-12 branch from 5b6efcb to 220adc7 Compare May 23, 2025 10:18
#[\PHPUnit\Framework\Attributes\DataProvider('provideMultipleTags')]
public function testExtractAll($html, array $counts): void
public function testExtractAll(string $html, array $counts, int $count): void
Copy link
Member Author

@alexander-schranz alexander-schranz May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Methods require to match dataProviders return in 12.* version. Same data provider used for different methods.

*/
#[\PHPUnit\Framework\Attributes\DataProvider('provideLifecycle')]
public function testOnFlushOtherUser($changeset): void
public function testOnFlushOtherUser($changeset, $expectedFields, bool $insert = true): void
Copy link
Member Author

@alexander-schranz alexander-schranz May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Methods require to match dataProviders return in 12.* version. Same data provider used for different methods.

@alexander-schranz alexander-schranz merged commit bbec26d into sulu:2.6 May 26, 2025
9 checks passed
@alexander-schranz alexander-schranz deleted the enhancement/phpunit-12 branch May 26, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Technical Debt Impacts code quality, no or just small impact on end developers and users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to PHPUnit 12
1 participant