Silexor is a set of commands that accelerate your Silex app generation.
It is based on the awesome Symfony components:
- Console
- Filesystem
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
$ php silexor.phar project:generate MyProject --path='/path/to/your/project'
This command will generate your Silex app under the MyProject folder in /path/to/your/project
.
The structure of the generated project looks like this:
src
tests
vendor
web
The 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 applicationweb/index.php
: web bootstrappervendor/silex.phar
: PHP archive including Silex (directly downloaded from the Silex website)tests/boostrap.php
: the unit test bootstraptests/ControllerTest.php
: the functional test of the first controller contained inapp.php
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