rector / rector-phpunit
Rector upgrades rules for PHPUnit
Installs: 1 448 772
Dependents: 3
Suggesters: 0
Security: 0
Stars: 69
Watchers: 4
Forks: 47
Open Issues: 1
Type:rector-extension
Requires
- php: >=8.2
Requires (Dev)
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^1.11
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^10.5
- rector/rector-src: dev-main
- rector/type-perfect: ^0.1.6
- symplify/easy-coding-standard: ^12.3
- symplify/phpstan-extensions: ^11.2
- symplify/phpstan-rules: ^13.0
- symplify/rule-doc-generator: ^12.0
- symplify/vendor-patches: ^11.2
- tomasvotruba/class-leak: ^0.2
- tracy/tracy: ^2.10
Conflicts
- rector/rector: <0.11
- 1.1.0
- 0.19.1
- 0.19.0
- 0.14.1
- 0.14.0
- 0.13.4
- 0.13.3
- 0.13.2
- 0.13.1
- 0.13.0
- 0.12.0
- dev-main / 0.11.x-dev
- 0.11.26
- 0.11.25
- 0.11.24
- 0.11.23
- 0.11.22
- 0.11.21
- 0.11.20
- 0.11.19
- 0.11.18
- 0.11.17
- 0.11.16
- 0.11.15
- 0.11.14
- 0.11.13
- 0.11.12
- 0.11.11
- 0.11.10
- 0.11.9
- 0.11.8
- 0.11.7
- 0.11.6
- 0.11.5
- 0.11.4
- 0.11.3
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.9
- 0.10.8
- 0.10.7
- 0.10.6
- 0.10.5
- 0.10.4
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- dev-tv-protected-accidental-attribute
- dev-use-rector-src-dev-main
- dev-tv-data-attribute-check
- dev-use-rector-src-dev-upgrade-to-php-parser5-and-phpstan-2
- dev-tv-self-this
- dev-tv-test-3
- dev-tv-move-rules-6
This package is auto-updated.
Last update: 2024-11-20 15:49:22 UTC
README
See available PHPUnit rules
Install
This package is already part of rector/rector package, so it works out of the box.
All you need to do is install the main package, and you're good to go:
composer require rector/rector --dev
Use Sets
To add a set to your config, use Rector\PHPUnit\Set\PHPUnitSetList
class and pick one of constants:
use Rector\Config\RectorConfig; use Rector\PHPUnit\Set\PHPUnitSetList; return RectorConfig::configure() ->withSets([ PHPUnitSetList::PHPUNIT_90, ]);
Learn Rector Faster
Rector is a tool that we develop and share for free, so anyone can save hundreds of hours on refactoring. But not everyone has time to understand Rector and AST complexity. You have 2 ways to speed this process up:
- read a book - The Power of Automated Refactoring
- hire our experienced team to improve your code base
Both ways support us to and improve Rector in sustainable way by learning from practical projects.