PHP-CS-Fixer icon indicating copy to clipboard operation
PHP-CS-Fixer copied to clipboard

`PHPUnit70Migration` ruleset

Open BackEndTea opened this issue 7 years ago • 6 comments

One of the changes in phpunit 7.0 is that @test annotation is checked a bit more strict. This means that

/**
 * Big @test, Only run if you have time
 */

Is no longer accepted as test annotation.

I propose a fixer that would change this into

/**
 * @test
 * Big @test, Only run if you have time
 */

This should probably be a risky fixer, since it might change functions that you don't want to be tests into tests. See: https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-7.0.md

BackEndTea avatar Feb 06 '18 08:02 BackEndTea

I guess this could be implemented as well:

@scenario is no longer an alias for @test

ntzm avatar Feb 06 '18 09:02 ntzm

@BackEndTea sounds like great idea, could you create a PR ?

keradus avatar Feb 12 '18 16:02 keradus

Another thing is that methods like setUp, setUpBeforeClass, tearDown and tearDownAfterClass must declare void as return type. There are some more signature changes listed here: https://phpunit.de/announcements/phpunit-7.html

hkdobrev avatar May 16 '18 14:05 hkdobrev

Since this issue has not had any activity within the last 90 days, I have marked it as stale.

The purpose of this action is to enforce backlog review once in a while. This is mostly for maintainers and helps with keeping repository in good condition, because stale issues and PRs can accumulate over time and make it harder for others to find relevant information. It is also possible that some changes has been made to the repo already, and issue or PR became outdated, but wasn't closed for some reason. This action helps with periodic review and closing of such stale items in automated way.

You may let maintainers handle this or verify current relevancy by yourself, to help with re-triage. Any activity will remove stale label so it won't be automatically closed at this point.

I will close it if no further activity occurs within the next 30 days.

github-actions[bot] avatar Sep 07 '23 12:09 github-actions[bot]

Since this issue has not had any activity within the last 90 days, I have marked it as stale.

The purpose of this action is to enforce backlog review once in a while. This is mostly for maintainers and helps with keeping repository in good condition, because stale issues and PRs can accumulate over time and make it harder for others to find relevant information. It is also possible that some changes has been made to the repo already, and issue or PR became outdated, but wasn't closed for some reason. This action helps with periodic review and closing of such stale items in automated way.

You may let maintainers handle this or verify current relevancy by yourself, to help with re-triage. Any activity will remove stale label so it won't be automatically closed at this point.

I will close it if no further activity occurs within the next 30 days.

github-actions[bot] avatar Jan 15 '24 12:01 github-actions[bot]

Since this issue has not had any activity within the last 90 days, I have marked it as stale.

The purpose of this action is to enforce backlog review once in a while. This is mostly for maintainers and helps with keeping repository in good condition, because stale issues and PRs can accumulate over time and make it harder for others to find relevant information. It is also possible that some changes has been made to the repo already, and issue or PR became outdated, but wasn't closed for some reason. This action helps with periodic review and closing of such stale items in automated way.

You may let maintainers handle this or verify current relevancy by yourself, to help with re-triage. Any activity will remove stale label so it won't be automatically closed at this point.

I will close it if no further activity occurs within the next 30 days.

github-actions[bot] avatar Apr 16 '24 12:04 github-actions[bot]

The fact this was automatically closed doesn't mean that the idea got rejected - it simply didn't get any priority for way too long to keep it open. If you're still interested in this, please let as know, we can consider re-opening it.

github-actions[bot] avatar Jun 02 '24 12:06 github-actions[bot]