gnugat / micro-framework-bundle
Symfony Micro Framework Bundle
Installs: 10 616
Dependents: 1
Suggesters: 0
Security: 0
Stars: 37
Watchers: 1
Forks: 3
Open Issues: 0
Type:symfony-bundle
pkg:composer/gnugat/micro-framework-bundle
Requires
- php: ^8.2
 - symfony/config: ^7.0
 - symfony/console: ^7.0
 - symfony/dependency-injection: ^7.0
 - symfony/error-handler: ^7.0
 - symfony/event-dispatcher: ^7.0
 - symfony/filesystem: ^7.0
 - symfony/finder: ^7.0
 - symfony/http-foundation: ^7.0
 - symfony/http-kernel: ^7.0
 - symfony/routing: ^7.0
 
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
 - phpunit/phpunit: ^11.0
 - symfony/monolog-bridge: ^7.0
 - symfony/monolog-bundle: ^3.10
 - symfony/yaml: ^7.0
 
README
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 tagcommand - 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.