tomasvotruba/laravelize

Rector rules and utils to convert Symfony project to Laravel

0.1.0 2023-03-28 15:54 UTC

This package is auto-updated.

Last update: 2024-03-30 00:31:33 UTC


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