Skip to content

rectorphp/extension-installer

Repository files navigation

Rector Extension Installer

Build

Composer plugin for automatic installation of Rector extensions.

Important Note

This functionality is now part of rector/rector core, so you don't need to install this plugin separately if rector/rector is already installed. See comments here.

Usage

composer require --dev rector/extension-installer

Instructions for extension developers

Set the extension's Composer package type to rector-extension so this plugin can recognize it and so it becomes discoverable on Packagist.

Add a rector key to the extension's composer.json extra section:

{
    "extra": {
        "rector": {
            "includes": [
                "config/config.php"
            ]
        }
    }
}

Limitations

The extension installer depends on Composer script events, so you cannot use the --no-scripts flag.

Acknowledgment

This package is heavily inspired by phpstan/extension-installer by Ondřej Mirtes. Thank you.

About

Composer Plugin for simpler registration of Rector extension configs

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages