tomasvotruba / laravelize
Rector rules and utils to convert Symfony project to Laravel
Fund package maintenance!
tomasvotruba
0.1.0
2023-03-28 15:54 UTC
Requires
- php: ^8.1
- laravel/framework: ^10.4
- nikic/php-parser: ^4.15
- sebastian/diff: ^5.0
- tomasvotruba/punchcard: ^0.1.3
- webmozart/assert: ^1.11
Requires (Dev)
- phpstan/extension-installer: ^1.2
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.0
- rector/rector: ^0.15.23
- symplify/easy-ci: 11.2.0.72
- symplify/easy-coding-standard: ^11.3
- symplify/phpstan-extensions: ^11.2
README
Install
composer require tomasvotruba/laravelize --dev
Usage
1. Migrate PHP code with Rector
Add migrate set to your rector.php
:
use Rector\Config\RectorConfig; use Rector\Set\ValueObject\LevelSetList; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ \TomasVotruba\Laravelize\Enum\SetList::SYMFONY_TO_LARAVEL ]); };
Make use of config:
vendor/bin/rector process src
2. Migrate Twig to Blade with regexes
vendor/bin/laravelize twig-to-blade views
@todo