survos / code-bundle
generate PHP code for Symfony applications. Like maker-bundle, but with nette/php-generator
                                    Fund package maintenance!
                                                                            
                                                                                                                                        kbond
                                                                                    
                                                                
Installs: 294
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
pkg:composer/survos/code-bundle
Requires
- php: ^8.4
 - nette/php-generator: ^4.1
 - nikic/php-parser: ^5.6
 - roave/better-reflection: ^6.0
 - symfony/config: ^7.3||^8.0
 - symfony/dependency-injection: ^7.3||^8.0
 - symfony/http-kernel: ^7.3||^8.0
 - twig/twig: ^3.4
 
Requires (Dev)
- doctrine/doctrine-bundle: ^2.7|^3.0
 - doctrine/orm: ^2.12 || ^3.3
 - easycorp/easyadmin-bundle: ^4.0
 - halaxa/json-machine: ^1.2
 - league/csv: ^9.9
 - phpstan/phpstan: ^2.0
 - phpunit/phpunit: ^12
 - survos/babel-bundle: dev-main
 - survos/ez-bundle: ^2.0
 - survos/meili-bundle: ^2.0
 - survos/state-bundle: ^2.0
 - symfony/browser-kit: ^7.3||^8.0
 - symfony/console: ^7.3||^8.0
 - symfony/framework-bundle: ^7.3||^8.0
 - symfony/http-client-contracts: ^3.5
 - symfony/routing: ^7.3
 - symfony/security-bundle: ^7.3||^8.0
 - symfony/twig-bundle: ^7.3||^8.0
 - symfony/var-dumper: ^7.3||^8.0
 
This package is auto-updated.
Last update: 2025-11-03 18:16:10 UTC
README
Generate PHP code for Symfony applications. Like maker-bundle, but with nette/php-generator
Prerequistes for the demo
- php 8.4+
 - Symfony CLI
 - meilisearch
 
docker-compose.yaml
The bundle requires 2 classes, but you have to explicitly request them because of being in the --dev environment.
composer require --dev survos/code-bundle nikic/php-parser nette/php-generator
symfony new --webapp playground && cd playground composer req survos/code-bundle --dev
General Idea
When making 'controller' (lower-case), we're referring to a method in a Controller class.
Now let's create a simple command.
bin/console survos:make:command app:shout "greet someone, optionally in all caps"