What is it?
Silexor is a set of commands that accelerate your Silex app generation.
It is based on the awesome Symfony components:
And uses Twig to generate base files.
Silexor is inspired by the SensioGeneratorBundle for the Symfony framework.
Find more information about Silex at http://silex.sensiolabs.org/
Download the php archive from here : https://github.com/benja-M-1/Silexor/raw/master/silexor.phar
Generate a Silex project
$ php silexor.phar project:generate MyProject --path='/path/to/your/project'
This command will generate your Silex app under the MyProject folder in
The structure of the generated project looks like this:
project:generate command also generates every files you need to run a simple Silex app (pleonasm):
src/app.php: this is the first controller of your application
web/index.php: web bootstrapper
vendor/silex.phar: PHP archive including Silex (directly downloaded from the Silex website)
tests/boostrap.php: the unit test bootstrap
tests/ControllerTest.php: the functional test of the first controller contained in
phpunit.xml.dist: PHPUnit configuration file
Once the project is generated, you can run the tests:
$ phpunit tests
- Providing options to add services in the generation of the app.php file (doctrine, twig, ...) -> see feature/providerinstaller for a workaround with composer
- Service provider generator
- Controller provider generator