ghostwriter / rector-extension
Rector upgrades rules for Mockery
Package info
github.com/ghostwriter/rector-extension
Type:rector-extension
pkg:composer/ghostwriter/rector-extension
Requires
- php: >=7.4
- rector/rector: ^2.0 || ^2.6
Requires (Dev)
- ext-xdebug: *
- mockery/mockery: ^1.6.15
- phpunit/phpunit: ^9.6.36
Suggests
None
Provides
None
Conflicts
- rector/rector: <2.6.2
Replaces
None
This package is auto-updated.
Last update: 2026-09-04 07:16:44 UTC
README
Rector upgrades rules for Mockery
Installation
You can install the package via composer:
composer require ghostwriter/rector-extension --dev
Star ⭐️ this repo if you find it useful
You can also star (🌟) this repo to find it easier later.
Usage
Rector can be configured to use the Mockery Rector rules by adding the following to your rector.php configuration file:
<?php declare(strict_types=1); use Mockery\Rector\DeprecatedFuncCallToArgumentMatcherStaticMethodCallRector; use Mockery\Rector\DeprecatedMockeryStaticMethodCallToArgumentMatcherStaticMethodCallRector; use Rector\Config\RectorConfig; return RectorConfig::configure()->withRules([ DeprecatedFuncCallToArgumentMatcherStaticMethodCallRector::class, DeprecatedMockeryStaticMethodCallToArgumentMatcherStaticMethodCallRector::class, ]);
Sets are collections of rules that can be applied together. The MockerySetList provides predefined sets for upgrading Mockery code to newer versions.
<?php declare(strict_types=1); use Mockery\Rector\MockerySetList; use Rector\Config\RectorConfig; return RectorConfig::configure()->withSets([ MockerySetList::MOCKERY_16, // v1.6.x MockerySetList::MOCKERY_20, // v2.0.x ]);
Preview changes
vendor/bin/rector --dry-run
Run
vendor/bin/rector
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.