定制 mohammad-alavi/apiato-rector 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mohammad-alavi/apiato-rector

Composer 安装命令:

composer require mohammad-alavi/apiato-rector

包简介

A collection of Rectors for the Apiato meta-framework.

README 文档

README

tests status code coverage

Apiato Rector

A set of Rector rules to automatically upgrade your Apiato project to the latest version.

Installation

composer require --dev mohammad-alavi/apiato-rector dev-latest

Also ensure you have Rector itself installed:

composer require --dev rector/rector

Usage

php vendor/bin/rector

v12 to v13 Rules

TransformMethodToResponseFacadeRector

Converts $this->transform(...) calls to Response::create(...).

use MohammadAlavi\ApiatoRector\Rules\TransformMethodToResponseFacadeRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withPaths([
        __DIR__ . '/app',
        __DIR__ . '/config',
    ])
    ->withImportNames(true, false, false, true)
    ->withRules([
        TransformMethodToResponseFacadeRector::class,
    ]);

RefactorHttpExceptionRector

Refactor exception classes to the new HTTP exception signature.

use MohammadAlavi\ApiatoRector\Rules\RefactorHttpExceptionRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withPaths([
        __DIR__ . '/app',
        __DIR__ . '/config',
    ])
    ->withImportNames(true, false, false, true)
    ->withConfiguredRule(RefactorHttpExceptionRector::class, [
        'parent_class' => \App\Ship\Parents\Exceptions\HttpException::class,
    ]);

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-01