Posts

Showing posts with the label Flex

Installing Packages in Symfony using Flex and Packs

Explanation of installing packages in Symfony using Flex and Packs. Flex Package is a ready-to-use functionality that adds new features to simplify development process. In Symfony, packages are called bundles and are installed via Composer. In order for bundle to work, it needs to be attached to framework. This usually requires doing some extra work - adding a bundle class in config/bundles.php and adding a config file in config/packages/*.yaml and possibly some others. In order for bundle to automatically attach after installation, plugin for Composer called Flex was created. Flex after installing bundle executes recipes, that is instructions for automating attachment and configuration of bundle in Symfony. Executed recipes are written to symfony.lock file. There are two recipe repositories: main and contributor . Main repository contains quality recipes for popular bundles. Contributor repository contains recipes for the rest of bundles developed by community. Bund...