Skip to content

Simple Task fileloader of nelmio/alice-bundle for the Process Bundle

License

Notifications You must be signed in to change notification settings

jycamier/alice-process-bundle

Repository files navigation

alice-process-bundle

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

See

About

Simple Task fileloader of nelmio/alice-bundle for the Process Bundle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages