Symfony Minimal Edition
Symfony ME (pun not intended) is an opinionated minimal base install
of the Symfony2 framework - sort of a middle ground between
using Silex and the full blown Symfony SE install.
Some concepts are heavily inspired by
Benjamin's post
on the subject., (*1)
For experienced Symfony2 developers, ME provides a clean starting point where you
only add what you need.
On the other hand, newcomers to Symfony2 can use this as a playground to
understand how the full stack framework can be set up manually and in
non-standard ways., (*2)
Disclaimer: This is not an official Symfony distribution, just a
private project. While it is perfectly possible to build production projects
on Symfony ME, it lacks some features from Symfony SE that are meant to
enable SE to be used in a broad range of environments (for example, ME lacks
the bootstrap.php.cache). If you use this for more than educational purposes,
it is assumed that you know what you are doing., (*3)
The main differences compared to the
Symfony Standard Edition are:, (*4)
Bundles
Symfony ME comes with the Symfony core bundles plus the MonologBundle.
Most other tools such as Assetic, FrameworkExtraBundle, Swiftmailer,
Doctrine, etc. are missing from a default install., (*5)
Configuration
Following 12 factor app recommendations, all
infrastructure parameters are configured using environment variables,
down to setting the debug flag and the environment name.
In consequence, there is no parameters.yml and the configuration file
structure is simplified compared to Symfony SE., (*6)
To facilitate easy development with this approach, the kernel will use
PHP dotenv to load environment vars if
no SYMFONY_ENV
var is found in the environment, or when the app is running
using the built-in webserver. The names used for the environment variable checks
can be set in the front controller when calling the kernel constructor., (*7)
For any kind of deployment other than development, configuration should
take place exclusively through environment variables. No code or file changes
from development are required., (*8)
Files and folder structure
Symfony ME uses a Symfony 3.0 inspired directory structure:, (*9)
- The
console
script is found in the bin
directory
- The
app/cache
and app/log
directories have been moved to var
- There is only a single index.php front controller
- No .htaccess file included
Installation
Create a project:, (*10)
$ composer create-project monkeycode/minisf myproject
Symfony ME does not come with the SensioDistributionBundle
or other
composer script handlers. Therefore you also need to run:, (*11)
$ cp .env.dist .env
$ bin/console assets:install --symlink
That's it, you're good to go., (*12)
Version Numbering
To enable staying in sync with official Symfony2 version numbers, ME uses a fourth version number sequence [sic] to denote bugfixes for all ME releases that are based on the same Symfony2 release., (*13)