danielm/symfony-demo-bundle
Demo Symfony bundle showing common bundle features: console command, services/contracts, events/subscriber, Twig extension, controllers with JSON/HTML routes, config with env vars, translations and public assets. Useful as a Symfony Flex recipe/demo reference.
See my blog post about this:
https://danielmg.org/php/2023/02/extending-symfony-bundle-flex-recipes-and-private-repositories.html
This project is part of my Post series about how to build a Symfony Flex Recipes repository (private or not).
This bundle is a demo that shows a couple of things yo can do on a Symfony bundle, such as:
bin/console demo:commandUnnecessaryEvent and simple EventSubscriber DemoSubscriberdemoFcn()/{a}/{b} -> Simple endpoint that returns a Json response with some values and adds a + b/view -> Simple endpoint that renders a Twig template and returns HTML/dispatch/{md5_hash} -> Simple endpoint to test dispatching our UnnecessaryEventDEMO_SAMPLE_ENVcomposer require danielm/symfony-demo-bundle
Same composer command as using the Recipe, you will also need to create/edit some files manually (that's what a Symfony recipe does for you)
...
Coding Standards (follows symfony's default rules)
# Displays errors
composer run cs:check
# Makes changes
composer run cs:fix
Testing
composer run test
PHP code analysis
composer run stan
How can I help you explore Laravel packages today?