Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PHPUnit replace covers annotations with attributes#6985

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
distantnative wants to merge1 commit intov6/developfromv5/refactor/phpunit

Conversation

distantnative
Copy link
Member

@distantnativedistantnative commentedFeb 9, 2025
edited
Loading

Description

Summary of changes

  • Replaces PHPUnit@covers/@coversDefaultClass and@dataProvider annotations with PHP attributes

Reasoning

PHPUnit will remove docblock annotation support in v12, already throwing deprecation notices in v11.

PHPUnit does offer aCoversMethod attribute. However, this can only be applied per class, not to a specific test method. As such, I don't think there is much value in it. That's why I followed a onlyCoversClass approach (which is also the preferred one by the maintainer of PHPUnit).

Additional context

Doesn't remove all PHPUnit deprecation errors but the biggest chunk.

Changelog

Housekeeping

  • PHPUnit: use attributes for coverage and data providers

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and CI checks all pass

For review team

  • Add changes & docs to release notes draft in Notion

@distantnativedistantnative self-assigned thisFeb 9, 2025
@distantnativedistantnativeforce-pushed thev5/refactor/phpunit branch 3 times, most recently from76ecbe7 to1899693CompareFebruary 9, 2025 19:44
@distantnativedistantnative added this to the6.0.0-alpha.1 milestoneFeb 10, 2025
@distantnativedistantnative changed the base branch fromv5/develop tov6/developFebruary 10, 2025 15:28
@distantnative
Copy link
MemberAuthor

Closing this - will do smaller PRs per package or so later on.

@distantnativedistantnative removed this from the6.0.0-alpha.1 milestoneMar 29, 2025
@distantnativedistantnative deleted the v5/refactor/phpunit branchMarch 29, 2025 14:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@distantnativedistantnative

Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@distantnative

[8]ページ先頭

©2009-2025 Movatter.jp