Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention loading fixtures via symfony console command in README #18

Merged
merged 6 commits into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading