mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[Documentation] [Fixtures] Built-in listeners section
This commit is contained in:
parent
48bde3375a
commit
9839331bd5
2 changed files with 81 additions and 0 deletions
80
docs/bundles/SyliusFixturesBundle/builtin_listeners.rst
Normal file
80
docs/bundles/SyliusFixturesBundle/builtin_listeners.rst
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
Built-in listeners
|
||||
==================
|
||||
|
||||
**SyliusFixturesBundle** comes bundled with a few useful listeners.
|
||||
|
||||
Logger (``logger``)
|
||||
-------------------
|
||||
|
||||
Provides output during running ``sylius:fixtures:load`` command.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Without logger
|
||||
|
||||
$ app/console sylius:fixtures:load my_suite
|
||||
$ _
|
||||
|
||||
# With logger
|
||||
|
||||
$ app/console sylius:fixtures:load my_suite
|
||||
Running suite "my_suite"...
|
||||
Running fixture "country"...
|
||||
Running fixture "locale"...
|
||||
Running fixture "currency"...
|
||||
$ _
|
||||
|
||||
Has no configuration options, can be enabled by:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sylius_fixtures:
|
||||
suites:
|
||||
my_suite:
|
||||
listeners:
|
||||
logger: ~
|
||||
|
||||
ORM Purger (``orm_purger``)
|
||||
---------------------------
|
||||
|
||||
Purges the relational database. Uses ``delete`` purge mode and the default entity manager if not configured otherwise.
|
||||
|
||||
Configuration options:
|
||||
|
||||
- ``purge_mode`` - sets how databse is purged, available values: ``delete`` (default), ``truncate``
|
||||
- ``managers`` - array of entity managers names used to purge the database, ``[null]`` by default
|
||||
|
||||
Example configuration:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sylius_fixtures:
|
||||
suites:
|
||||
my_suite:
|
||||
listeners:
|
||||
orm_purger:
|
||||
purge_mode: truncate
|
||||
managers:
|
||||
- custom_manager
|
||||
|
||||
PHPCR / MongoDB Purger (``phpcr_purger`` / ``mongodb_purger``)
|
||||
--------------------------------------------------------------
|
||||
|
||||
Purges the document database. Uses the default document manager if not configured otherwise.
|
||||
|
||||
Configuration options:
|
||||
|
||||
- ``managers`` - array of document managers names used to purge the database, ``[null]`` by default
|
||||
|
||||
Example configuration:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sylius_fixtures:
|
||||
suites:
|
||||
my_suite:
|
||||
listeners:
|
||||
phpcr_purger:
|
||||
managers:
|
||||
- custom_manager # Uses custom document manager
|
||||
mongodb_purger: ~ # Uses default document manager
|
||||
|
|
@ -10,4 +10,5 @@ Configurable fixtures management for Symfony2 applications.
|
|||
installation
|
||||
architecture
|
||||
custom_fixture
|
||||
builtin_listeners
|
||||
summary
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue