frosh/shopware-rector

Shopware 专用 Rector

安装次数: 118,571

依赖项: 2

建议者: 0

安全性: 0

星标: 38

关注者: 2

分支: 14

开放问题: 2

类型:rector-extension

0.4.0 2024-05-18 17:03 UTC

This package is auto-updated.

Last update: 2024-08-27 17:02:19 UTC


README

本项目扩展了 Rector,增加了多个 Shopware 特定的规则。

查看可用的 Shopware 规则

安装

请确保安装 frosh/shopware-rectorrector/rector

composer req rector/rector frosh/shopware-rector --dev

使用集

要将集添加到您的配置中,请使用 Frosh\Rector\Set\ShopwareSetList 类并选择其中一个常量

use Frosh\Rector\Set\ShopwareSetList;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->sets([
        ShopwareSetList::SHOPWARE_6_5_0,
    ]);
};

直接使用配置

# Clone this repo

composer install

# Dry Run
./vendor/bin/rector process --config config/shopware-6.5.0.php --autoload-file [SHOPWARE]/vendor/autoload.php [SHOPWARE]/custom/plugins/MyPlugin --dry-run

# Normal Run
./vendor/bin/rector process --config config/shopware-6.5.0.php --autoload-file [SHOPWARE]/vendor/autoload.php [SHOPWARE]/custom/plugins/MyPlugin