A small silex template.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
src/MyApp
var/logs
web
.env.example
.gitignore
LICENSE
README.md
composer.json
composer.lock
phpunit.xml.dist
pre-commit.php

README.md

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

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