Skip to content

Adjust DataProvider test code #772

Merged
phil-davis merged 3 commits into
sabre-io:masterfrom
phil-davis:adjust-test-code
Jun 28, 2026
Merged

Adjust DataProvider test code #772
phil-davis merged 3 commits into
sabre-io:masterfrom
phil-davis:adjust-test-code

Conversation

@phil-davis

@phil-davis phil-davis commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Adjust the DataProvider test code to use Attribute rather than Annotation.

This happened in other sabre-io repos because phpstan is at a higher level, and I think that it adjusted this stuff.

phpstan is still at a low level in Vobject, so I used Rector rules:

    ->withRules([
        AddParamArrayDocblockFromDataProviderRector::class,
        DataProviderAnnotationToAttributeRector::class,
    ])

Note: when I tried to use Rector:

    ->withSets([
        // Includes sets leading up to and including PHPUnit 11
        PHPUnitSetList::PHPUNIT_100,
        PHPUnitSetList::PHPUNIT_110,
        PHPUnitSetList::PHPUNIT_CODE_QUALITY,
    ])

It did things like putting the PHPunit assert calls back from static to dynamic calls. And then phpstan complained about that and wanted to put them back to static calls. So there is some conflict between what the Rector and phpstan rule sets think is "a good thing".

@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.66%. Comparing base (55cb62c) to head (6afc39c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #772   +/-   ##
=========================================
  Coverage     98.66%   98.66%           
  Complexity     1757     1757           
=========================================
  Files            71       71           
  Lines          5163     5163           
=========================================
  Hits           5094     5094           
  Misses           69       69           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@phil-davis phil-davis marked this pull request as ready for review June 28, 2026 12:55
@phil-davis phil-davis requested a review from staabm June 28, 2026 12:55
@phil-davis phil-davis merged commit 6ffa024 into sabre-io:master Jun 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants