2017 © Pedro PelĆ”ez
 

symfony-bundle micro-framework-bundle

Symfony Micro Framework Bundle

image

gnugat/micro-framework-bundle

Symfony Micro Framework Bundle

  • Wednesday, November 22, 2017
  • by gnupat
  • Repository
  • 2 Watchers
  • 35 Stars
  • 2,847 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 9 Versions
  • 36 % Grown

The README.md

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., (*1)

Installation

First install it using Composer:, (*2)

composer require gnugat/micro-framework-bundle:^0.9

Then enable it in your application, for example by adding it in config/bundles.php:, (*3)

<?php

return [
    \Gnugat\MicroFrameworkBundle\GnugatMicroFrameworkBundle::class => ['all' => true],
];

Next, set up autowiring / autoconfigure in `config/services.yaml:, (*4)

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:, (*5)

controllers:
    resource:                  
        path: ../../src/Controller/     
        namespace: App\Controller       
    type: attribute

More information, (*6)

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:, (*7)

And finally some meta documentation:, (*8)

Note: Some logic has been taken from Symfony FrameworkBundle and modified, all attributions go to Fabien Potencier and the contributors., (*9)

The Versions