Symfony Micro Framework Bundle
A replacement of the official FrameworkBundle allowing Symfony to be used as a micro-framework which follows the "add what you need" philosophy.
Installation
First install it using Composer:
composer require gnugat/micro-framework-bundle:^0.9
Then enable it in your application, for example by adding it in config/bundles.php
:
<?php
return [
\Gnugat\MicroFrameworkBundle\GnugatMicroFrameworkBundle::class => ['all' => true],
];
Next, set up autowiring / autoconfigure in `config/services.yaml:
services:
_defaults:
autowire: true
autoconfigure: true
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/AppKernel.php'
# Controllers have to be marked as "public"
App\Controller\:
resource: '../src/Controller/'
public: true
Finally enable Routing Attributes in config/routings/attributes.yaml
:
controllers:
resource:
path: ../../src/Controller/
namespace: App\Controller
type: attribute
Features
- compatible with most third party bundles, more information
- micro framework spirit, including:
- "add what you need" philosohpy
- few dependencies
- small API
- small footprint for better performance
- more information
- supports autowiring/autoconfiguration
- supports Routing Attributes
- there are however some intentional incompatibilities, more information
Want to know more?
You can see the current and past versions using one of the following:
- the
git tag
command - the releases page on Github
- the file listing the changes between versions
And finally some meta documentation:
Note: Some logic has been taken from Symfony FrameworkBundle and modified, all attributions go to Fabien Potencier and the contributors.