This Silex template has been written to shorten the setup process of a new Silex Application.
You will need the following program installed in your computer:
Create your project:
composer create-project lracicot/silex-template path/to/new/project
Go to your project:
Setup your environment:
cp .env.example .env
Change the values you need in the
Run the tests
Start the server:
php -S localhost:8000 -t web
Try it! http://localhost:8000
When you are deploying, there are a few configuration you might want to change. Here are the available configurations:
ENVIRONMENT: Can be development, staging, testing or production (default: development)
BASEURL: If you are running Silex in a subdirectory, you can change this. It will make the routes and the assets work.
- monolog - Logging for PHP.
- phpdotenv - Loads environment variables.
- twig - Templating system, with a default base template.
- A default controller, with the Controller Provider system.
- bootstrap - The CSS framework.
- jQuery - The "J" word. Yep, I said it. How do you feel about it ?
The security bundle
composer require symfony/security
The doctrine DBAL
composer require doctrine/dbal
A doctrine ORM service provider
composer require dflydev/doctrine-orm-service-provider