lracicot / silex-template
A small silex template for scalable web application
Requires
- php: ^5.3.3 || ^7.0
- monolog/monolog: ^1.21
- silex/silex: ~2.0
- symfony/asset: ^3.1
- symfony/twig-bridge: ^3.1
- twig/twig: ^1.26
- vlucas/phpdotenv: ^2.4
Requires (Dev)
- phpunit/phpunit: ^5.4
- symfony/browser-kit: ^3.2
- symfony/css-selector: ^3.2
This package is not auto-updated.
Last update: 2019-02-20 19:03:46 UTC
README
WARNING: The end of life of Silex has been set for June 2018. This package will be no longer maintained. Please use Symfony 4.
Silex Template
This Silex template has been written to shorten the setup process of a new Silex Application.
Pre-installation
You will need the following program installed in your computer:
Installation
Create your project:
composer create-project lracicot/silex-template path/to/new/project
Go to your project:
cd path/to/new/project
Setup your environment:
cp .env.example .env
Change the values you need in the .env
file.
Run the tests
composer test
Start the server:
php -S localhost:8000 -t web
Try it! http://localhost:8000
Configuration
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.
What's included?
Libraries
- 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 ?
Optional dependencies
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