rdh / laravel-factory-converter
Convert your old Laravel factories to the new version 8 classes
dev-master
2021-02-28 11:02 UTC
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- friendsofphp/php-cs-fixer: ^2.16
- illuminate/collections: ^8.2
- symfony/console: ^5.1
- symfony/finder: ^5.1
- symfony/process: ^5.1
- symfony/templating: ^5.1
Requires (Dev)
- phpunit/phpunit: ^9.3
- rdh/php-cs-fixer: ^1.2
- symfony/var-dumper: ^5.1
This package is auto-updated.
Last update: 2021-03-28 11:14:52 UTC
README
This package allows to easily convert your 'classic' model factories to the Laravel version 8 class style.
Requirements
- PHP 7.4
- Your models are in the
App
namespace (app
directory) - There is no namespace defined in your seeders
- Start without any changes in your repository (make a backup if you don't use version control)
Installation
composer global require rdh/laravel-factory-converter:dev-master
Usage
!! Your code will be PSR-2 formatted
Make sure that your global composer bin directory is in your $PATH
.
Find out where it is with:
composer global config bin-dir --absolute
Run the following commands for your project:
cd your-project
laravel-factory-converter
Options
Check laravel-factory-converter --help
for all options