Rector upgrades rules for Mockery
You can install the package via composer:
composer require ghostwriter/rector-extension --devYou can also star (🌟) this repo to find it easier later.
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
]);vendor/bin/rector --dry-runvendor/bin/rectorPlease see CHANGELOG.md for more information on what has changed recently.
Please see LICENSE for more information on the license that applies to this project.
Please see SECURITY.md for more information on security disclosure process.