mohammad-alavi/apiato-rector
Composer 安装命令:
composer require mohammad-alavi/apiato-rector
包简介
A collection of Rectors for the Apiato meta-framework.
README 文档
README
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
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-01