Add sample data generation cli#15
Open
PierreGauthier wants to merge 1 commit intomainfrom
Open
Conversation
Collaborator
PierreGauthier
commented
Apr 24, 2026
| Q | A |
|---|---|
| Branch? | master for features / current stable version branch for bug fixes |
| Tickets | #... |
| License | OSL-3.0 |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a Symfony Console CLI to generate full sample datasets (catalogs, localized catalogs, metadata/source fields/options, categories, products) and includes translation resources to localize generated labels/names.
Changes:
- Introduces
gally:sample-data:generatecommand with presets and CLI overrides. - Adds generators/providers/models to create and index catalogs, categories, products, and metadata in batch.
- Adds new XLIFF translation catalogs for product name fragments and source field option labels.
Reviewed changes
Copilot reviewed 27 out of 37 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Resources/translations/source_field_options.de.xlf | Adds DE translations for generated source-field option labels. |
| src/Resources/translations/product.fr.xlf | Adds FR translations for generated product name tokens. |
| src/Resources/translations/product.es.xlf | Adds ES translations for generated product name tokens. |
| src/Resources/translations/product.de.xlf | Adds DE translations for generated product name tokens. |
| src/Resources/config/services.yaml | Registers generators/providers/services and wires the new CLI command. |
| src/Provider/UserProvider.php | Creates default users needed for the sample dataset. |
| src/Provider/ProductNameProvider.php | Generates category-aware product name translation keys. |
| src/Provider/MetadataProvider.php | Creates extra metadata entities for generation. |
| src/Provider/LocaleProvider.php | Enumerates locales/currencies and picks least-used locales. |
| src/Provider/FieldTypeProvider.php | Defines field-type distribution and templates for source fields. |
| src/Provider/CategoryHierarchyProvider.php | Generates realistic category hierarchies based on templates. |
| src/Model/GenerationResult.php | Captures counts/timing/memory metrics for a generation run. |
| src/Model/GenerationConfig.php | Holds generation parameters (presets, counts, seed, etc.). |
| src/Generator/SourceFieldOptionGenerator.php | Generates select-field options and localized labels in batches. |
| src/Generator/SourceFieldGenerator.php | Generates source fields per metadata entity with localized labels. |
| src/Generator/ProductGenerator.php | Generates product documents, adds categories/images/names and variants. |
| src/Generator/LocalizedCatalogGenerator.php | Creates localized catalogs with locale diversity rules. |
| src/Generator/CategoryGenerator.php | Generates categories + localized configurations and indexes them. |
| src/Generator/CatalogGenerator.php | Generates catalogs in batches. |
| src/Generator/AbstractGenerator.php | Base generator utilities (batching, progress bar). |
| src/Generator/AbstractEntityGenerator.php | Base indexing/localization pipeline for entity documents. |
| src/Command/GenerateTestDataCommand.php | New CLI entrypoint orchestrating database reset + generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b8a7968 to
16410d6
Compare
16410d6 to
75f159a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.