jycamier / alice-process-bundle
Simple Task fileloader of nelmio/alice-bundle for the Process Bundle
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 4
Type:symfony-bundle
Requires
- cleverage/process-bundle: 3.*|dev-v3.0-dev
- nelmio/alice: ^3.5
This package is auto-updated.
Last update: 2024-12-30 02:54:57 UTC
README
Simple Task fileloader of nelmio/alice-bundle for the Process Bundle
How to...
You need to create "fake" instance of the following classe.
<?php namespace App\Entity; class User { private $lastName; private $firstName; public function __construct(string $lastName, string $firstName) { $this->lastName = $lastName; $this->firstName = $firstName; } }
You can use easily Alice which provide an easy way to get a bunch of fake instance of
our class App\Entity\User
which the following declaration.
## '%kernel.project_dir%/fixtures/dev.yaml' App\Entity\User: user_{1..20}: __construct: - '<lastName()>' - '<firstName()>'
Then, define a configuration for an install process
## '%kernel.project_dir%/config/packages/process.yml' clever_age_process: configurations: install: entry_point: load tasks: load: service: '@Jycamier\AliceProcessBundle\Task\File\AliceFixtureLoaderTask' options: file_path: '%kernel.project_dir%/fixtures/dev.yml' outputs: [debug] debug: service: '@CleverAge\ProcessBundle\Task\Debug\DebugTask'
$ bin/console cleverage:process:execute install