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

PHPUnit 9 Shift #2

Closed
wants to merge 3 commits into from
Closed

PHPUnit 9 Shift #2

wants to merge 3 commits into from

Conversation

thedotedge
Copy link

This pull request contains changes for upgrading to PHPUnit 9 automated by the PHPUnit 9 Shift.

Before merging, you should review all comments and commit any changes to the shift-61416 branch.

If there were changes you felt could have been automated, please reply to the follow-up email with your feedback or on Twitter.

Since PHP 5.4 the short array syntax `[]` may be used instead of `array()`.
From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html
@thedotedge
Copy link
Author

⚠️ PHPUnit 9 requires PHP version 7.3 or higher. Be sure to verify you met this requirement by running php -v on your test environment.

@thedotedge
Copy link
Author

❌ The attribute assertions were removed in PHPUnit 9. These assertions have no replacement. You should refactor these assertions on public attributes to use existing assertions and remove any which reference private or protected attributes.

Shift detected uses of these assertions within the following tests. You will need to review these instances and convert or remove them.

  • tests/FresqueTest.php

@thedotedge
Copy link
Author

⚗️ This Shift is still in beta. Please send any issues, feedback, or ideas you might have to help improve this Shift.

@thedotedge thedotedge closed this May 3, 2022
@thedotedge thedotedge deleted the shift-61416 branch August 17, 2022 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants