Installation
MicroFrameworkBundle can be installed in new and existing applications.
Here's how to create a new Symfony project, using the Empy Edition:
composer create-project gnugat/symfony-empty-edition
cd symfony-empty-edition
Or alternatively, using Symfony Flex:
symfony new my_project_directory
cd my_project_directory
Now we need to replace FrameworkBundle by MicroFrameworkBundle, first in the
composer dependencies:
composer require 'gnugat/micro-framework-bundle'
composer remove --update-with-dependencies 'symfony/framework-bundle'
Note: With Symfony Flex, the
symfony/symfonyglobal package is installed, and it contains thesymfony/framework-bundle package.
Then in the config/bundles.php file by replacing:
Symfony\Bundle\FrameworkBundle\FrameworkBundle- with
Gnugat\MicroFrameworkBundle\GnugatMicroFrameworkBundle
Next, the framework configuration key needs to be removed:
- from
config/services.yml - or in
config/packages/
Finally in the bin/console file, replace:
Symfony\Bundle\FrameworkBundle\Console\Application- with
Gnugat\MicroFrameworkBundle\Service\KernelApplication as Application.
Make sure to try and debug your application after that:
- remove the cache
rm -rf var/cache - try to run the console:
bin/console - try to browse pages
- run your tests
If any step fails, then:
- check if there's any configuration to remove
- check if it's a bundle issue and if so if we can remove it