frosh / shopware-rector
Shopware 专用 Rector
0.4.0
2024-05-18 17:03 UTC
Requires
- php: ^8.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.57
- phpstan/phpstan: ~1.10.26
- phpunit/phpunit: ^9.5
- rector/rector: ^1.0
- symfony/var-dumper: *
- symplify/easy-coding-standard: ~11.2
- tracy/tracy: ^2.9
Conflicts
- rector/rector: <1.0
README
本项目扩展了 Rector,增加了多个 Shopware 特定的规则。
查看可用的 Shopware 规则
安装
请确保安装 frosh/shopware-rector
和 rector/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