sylius/sylius-rector 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sylius/sylius-rector

最新稳定版本:v3.7.0

Composer 安装命令:

composer require sylius/sylius-rector

包简介

Rector upgrades rules for Sylius

README 文档

README

Installation Sylius-Standard

In Sylius-Standard, we are providing a basic configuration to getting started with Sylius/SyliusRector. You can add rules or rule sets to your <project_root>/rector.php and reap benefits from Rector.

Installation in older projects

sylius/sylius-rector package requires at least PHP 8.0. Of course, if you use PHP in version 7.4 you can use rector/rector to upgrade your PHP version easily!

Then, when you meet the minimal requirements, run the following commands:

composer require sylius/sylius-rector --dev

Finally, create <project_root>/rector.php file with the following content:

<?php

declare(strict_types=1);

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Sylius\SyliusRector\Set\SyliusPlus;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->importNames();
    $rectorConfig->import(__DIR__ . '/vendor/sylius/sylius-rector/config/config.php');
    $rectorConfig->paths([
        __DIR__ . '/src'
    ]);
};

Learn Rector Faster

Rector is a tool that we develop and share for free, so anyone can save hundreds of hours on refactoring. But not everyone has time to understand Rector and AST complexity. You have 2 ways to speed this process up:

Both ways support us to and improve Rector in sustainable way by learning from practical projects.

Thank you note

We would like to thank @alexander-schranz for starting this initiative and setting up initial codebase structure.

统计信息

  • 总下载量: 675.8k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 1
  • 依赖项目数: 52
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 8
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-01