Skip to content
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

Migrate NodeTestCase to static data providers #4265

Merged

Conversation

derrabus
Copy link
Contributor

@derrabus derrabus commented Sep 2, 2024

PHPUnit 11 requires data providers to be static. This PR prepares our abstract NodeTestCase by deprecating the non-static getTests() and adding a static provideTests() as a replacement. I've also added PHPUnit attributes which newer PHPUnit releases prefer over PHPDoc annotations.

src/Test/NodeTestCase.php Outdated Show resolved Hide resolved
src/Test/NodeTestCase.php Outdated Show resolved Hide resolved
src/Test/NodeTestCase.php Show resolved Hide resolved
@derrabus derrabus force-pushed the improvement/node-test-case-static-data-provider branch 2 times, most recently from bc0333f to 741002d Compare September 3, 2024 10:23
Copy link
Contributor

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

LGTM

CHANGELOG Show resolved Hide resolved
src/Test/NodeTestCase.php Outdated Show resolved Hide resolved
@derrabus derrabus force-pushed the improvement/node-test-case-static-data-provider branch from 741002d to d7cfa76 Compare September 3, 2024 11:50
@derrabus derrabus force-pushed the improvement/node-test-case-static-data-provider branch from d7cfa76 to f555a33 Compare September 3, 2024 11:51
@fabpot
Copy link
Contributor

fabpot commented Sep 3, 2024

Thank you @derrabus.

@fabpot fabpot merged commit dd9af8e into twigphp:3.x Sep 3, 2024
49 checks passed
@derrabus derrabus deleted the improvement/node-test-case-static-data-provider branch September 3, 2024 12:38
@derrabus derrabus mentioned this pull request Sep 3, 2024
10 tasks
fabpot added a commit that referenced this pull request Sep 4, 2024
This PR was squashed before being merged into the 4.x branch.

Discussion
----------

PHPUnit 11

This PR switches our CI to PHPUnit 11.

TODO:

- [x] #4262
- [x] #4263
- [x] #4264
- [x] #4265
- [x] #4268
- [x] #4266
- [x] #4270
- [x] #4271
- [x] #4272
- [x] #4274

Commits
-------

f2053bb PHPUnit 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants