From 5c080faef2665b3e2eb4e37cfe52706fc773c417 Mon Sep 17 00:00:00 2001 From: m0nken Date: Tue, 14 May 2024 20:07:55 +0200 Subject: [PATCH] Mention loading fixtures via symfony console command in README (#18) Co-authored-by: Jacob Dreesen --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index cadae5c..7ef48b7 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,19 @@ final class MyCustomTest extends BaseKernelTestCase } ``` +To load fixtures in your local environment or as part of a deployment two commands are provided: +- `neusta:pimcore-fixture:load` (Loads a defined fixture class.) +- `neusta:pimcore-fixtures:load` (Loads all defined fixture classes.) + +Beware that loading a large amount of objects may lead to a high consumption of memory. +Should you encounter memory issues when running the commands in `dev` environments you may want to try +setting the environment to `prod`. Disabling the debug mode also seems to be beneficial in terms of memory consumption. + +For example provide these options when using the symfony console: +```shell +bin/console --env=prod --no-debug neusta:pimcore-fixtures:load +``` + ### Accessing Services from the Fixtures As the Fixtures are just normal PHP Services you can use all DI features like constructor, setter or property injection as usual.