Screening Entry Level

What is Symfony Flex and how do recipes work? How does installing a package with Composer differ in a Symfony project compared to a plain PHP project?

Quick Tip

Show the developer experience: "I run composer require mailer and Flex creates the config file, adds MAILER_DSN to .env, and registers the bundle. No manual setup. That is the difference — Flex turns package installation into project configuration."

What good answers include

Symfony Flex is a Composer plugin that automates bundle configuration. When you install a package, Flex checks for a recipe — a set of instructions that creates config files, adds environment variables to .env, registers bundles, and creates boilerplate directories. This means installing a package like symfony/mailer automatically adds the config file, sets up MAILER_DSN in .env, and registers the bundle — zero manual setup. Recipes are stored in two repositories: the official symfony/recipes and the community contrib repository. Strong candidates explain: that Flex aliases allow shorthand (composer require mailer instead of the full package name), the symfony.lock file tracks which recipes have been applied, and that recipes can be updated with composer recipes:update.

What interviewers are looking for

Entry-level Symfony ecosystem question. Candidates who manually create config files for every bundle may not know about Flex. Those who understand how recipes automate setup appreciate why Symfony projects have minimal boilerplate out of the box.

← All Symfony questions