Search by

ghostwriter / rector-extension

Rector upgrades rules for Mockery

Maintainers

Package info

github.com/ghostwriter/rector-extension

Type:rector-extension

pkg:composer/ghostwriter/rector-extension

Transparency log

Fund package maintenance!

ghostwriter

Paypal

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.x-dev 2026-09-04 07:13 UTC

This package is auto-updated.

Last update: 2026-09-04 07:16:44 UTC


README

Automation PHP Version Packagist Downloads PayPal Sponsors via GitHub

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.