ghostwriter / mockery-rector
Rector extension for Mockery
Fund package maintenance!
ghostwriter
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:rector-extension
Requires
- php: >=8.3
- mockery/mockery: ^1.6.11 || ^2.0
- rector/rector: ^1.0.4
Requires (Dev)
- ghostwriter/coding-standard: dev-main
- ghostwriter/psalm-plugin: ^0.2 || ^1.0
- symplify/rule-doc-generator: ^12.1.10
Conflicts
- rector/rector: <1.0
This package is auto-updated.
Last update: 2024-05-16 04:58:14 UTC
README
Rector extension for Mockery
Star ⭐️ this repo if you find it useful
You can also star (🌟) this repo to find it easier later.
Installation
You can install the package via composer:
composer require rector/rector --dev composer require ghostwriter/mockery-rector --dev
Usage
To add a set to your config, and pick one of constants:
Ghostwriter\MockeryRector\MockeryRectorSetList
Ghostwriter\MockeryRector\MockeryRectorLevelSetList
use Ghostwriter\MockeryRector\MockeryLevelSetList; use Ghostwriter\MockeryRector\MockerySetList; use Ghostwriter\MockeryRector\Rule\ExtendMockeryTestCaseRector; use Ghostwriter\MockeryRector\Rule\HamcrestToPHPUnitRector; use Ghostwriter\MockeryRector\Rule\PHPUnitToMockeryRector; use Ghostwriter\MockeryRector\Rule\ProphecyToMockeryRector; use Ghostwriter\MockeryRector\Rule\ShouldReceiveToAllowsRector; use Ghostwriter\MockeryRector\Rule\ShouldReceiveToExpectsRector; use Ghostwriter\MockeryRector\Rule\UseMockeryPHPUnitIntegrationTraitRector; use Rector\Config\RectorConfig; return RectorConfig::configure() ->withRules([ // ExtendMockeryTestCaseRector::class, // HamcrestToPHPUnitRector::class, // PHPUnitToMockeryRector::class, // ProphecyToMockeryRector::class, // ShouldReceiveToAllowsRector::class, // ShouldReceiveToExpectsRector::class, // UseMockeryPHPUnitIntegrationTraitRector::class, ]) ->withSets([ // version sets MockerySetList::MOCKERY_1_6, // v1.6.0 MockerySetList::MOCKERY_2_0, // v2.0.0 // or level sets MockeryLevelSetList::UP_TO_MOCKERY_1_6, // v0.1.0 - v1.6.0 MockeryLevelSetList::UP_TO_MOCKERY_2_0, // v0.1.0 - v2.0.0 // or migration sets MockerySetList::PHPUNIT_TO_MOCKERY, // PHPUnit to Mockery MockerySetList::PROPHECY_TO_MOCKERY, // Prophecy to Mockery ]);
Mockery Rector Rules
To see all the rules, check the docs/rector_rules_overview.md file.
Credits
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
License
Please see LICENSE for more information on the license that applies to this project.
Security
Please see SECURITY.md for more information on security disclosure process.