Doctrine-backed demo entities and a loader for DummyJSON data.
Current scope:
User,Post, andCommententities with relationsProduct,Image, andProductReviewentities- repository services
- Doctrine mapping registration by the bundle
dummy:loadcommand
This bundle is currently about loading demo data. It does not provide a UI.
Copy and paste this into a shell:
symfony new dummy-demo --webapp
cd dummy-demo
echo 'DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db' > .env.local
composer req survos/dummy-bundle
bin/console doctrine:database:create --if-not-exists
bin/console doctrine:schema:update --force
bin/console dummy:load --purge
bin/console doctrine:query:sql "select count(*) from product"If you are developing this bundle locally from ~/sites/mono/bu/dummy-bundle, initialize the app like this instead:
symfony new dummy-demo --webapp
cd dummy-demo
echo 'DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db' > .env.local
composer config repositories.survos-dummy path ~/sites/mono/bu/dummy-bundle
composer req survos/dummy-bundle
bin/console doctrine:database:create --if-not-exists
bin/console doctrine:schema:update --force
bin/console dummy:load --purge
bin/console doctrine:query:sql "select count(*) from product"Generate the ER diagram in the demo app root:
composer req --dev jawira/doctrine-diagram-bundle
mkdir -p docs
bin/console doctrine:diagram:er --filename=docs/er.svg --exclude=doctrine_migration_versions,messenger_messagesThen include it in your project README with a few lines of markdown:
## Entity Diagram
dummy:loadloads users, posts, comments, products, product reviews, and images.- It prints a final summary with how many of each entity were loaded.
- DummyJSON post comments belong to both a post and a user.
- DummyJSON product reviews are embedded on products and include reviewer name/email, not a user id.
dummy:loadhard-codes the DummyJSON endpoints for now.