Symfony

Symfony is the PHP project whose components carry requests, routing, events and the service container in Drupal core; Drupal 11.4 requires Symfony 7.4.

Learn DrupalDrupal glossary Last updated

Symfony is a PHP project that offers decoupled libraries, called components, and a full web framework built on them. Drupal does not run on the framework. Core builds on a selection of the components, so Symfony class names appear throughout Drupal code.

How Drupal uses Symfony in Drupal 11

The Symfony site describes its packages as decoupled libraries for PHP applications. Drupal core pulls in the ones it needs through Composer. The composer.json of core 11.4.10 requires, among others, symfony/http-foundation, symfony/http-kernel, symfony/routing, symfony/event-dispatcher, symfony/dependency-injection, symfony/console, symfony/yaml, symfony/mailer and symfony/serializer, each constrained to 7.4, such as ^7.4 or ^7.4.13.

The core source shows how those pieces fit:

  • Request handling. DrupalKernel implements an interface that extends Symfony's HttpKernelInterface, and the http_kernel.basic service is Symfony's HttpKernel, wrapped by Drupal's middleware stack. Request and Response objects come from HttpFoundation.
  • Routing. Drupal's route provider returns Symfony RouteCollection objects, and its router uses Symfony's matcher interfaces.
  • Events. The event_dispatcher service is Symfony's EventDispatcher. Core classes such as ClientErrorResponseSubscriber implement EventSubscriberInterface and listen to KernelEvents.
  • Services. Drupal's ContainerBuilder extends Symfony's. The Drupal.org documentation says the service container is built on the Symfony container, that the usual Symfony container concepts apply, and that Drupal overrides parts of it with its own logic.

This is the base under the dependency injection that modern Drupal code uses. Drupal's own hook system, entities and plugins are not Symfony features.

Versions and support dates

The 11.3.0 release notes (17 December 2025) state that the Symfony components were updated to 7.4.0. On 26 October 2026 symfony.com lists 7.4 as a long-term support (LTS) release from November 2025, with bug fixes until November 2028 and security fixes until November 2029. The same page lists 8.1 as the current stable release, and says Symfony 8.x requires PHP 8.4 or higher. Core 11.4.10 stays on 7.4, so these dates are worth checking again when you plan upgrades.

Example

Take a request for a page. In core 11.4.10, web/index.php loads the Symfony Runtime and returns a closure that builds a DrupalKernel. The kernel's handle() method passes the Symfony Request to the inner HTTP kernel and gets a Response back. Subscribers listening to KernelEvents::RESPONSE can change that response before it is sent. Each of these steps has a Symfony class you can look up in the Symfony docs.

Common mistakes

  • Following framework tutorials literally. Guides for bundles or the Symfony framework configuration describe features Drupal core does not use. Use the component documentation instead.
  • Reading the docs for the wrong version. symfony.com documents several release lines; pick 7.4 to match core 11.4.10.
  • Treating Symfony 7.4 and Drupal as one support cycle. The Symfony end dates above come from symfony.com; look up Drupal core's dates on Drupal.org.

For marketing and content teams

You will rarely touch Symfony directly. It matters when a security update or a core release note mentions a Symfony version bump: that is part of core maintenance, and your developer applies it with Composer.

Sources

Questions about Symfony in Drupal

Not on the full framework. Drupal core requires individual Symfony components, such as HttpFoundation, HttpKernel, Routing and EventDispatcher, in its composer.json. That file in core 11.4.10 does not list symfony/framework-bundle, the package that carries the full-stack framework.

Drupal 11.3.0, released on 17 December 2025, updated the components to Symfony 7.4.0, and core 11.4.10 requires ^7.4 for its main components. Symfony lists 7.4 as a long-term support release with bug fixes until November 2028 and security fixes until November 2029 (checked 26 October 2026).

In controllers, which can read the Symfony Request and return a Response object instead of a render array; in event subscribers that implement EventSubscriberInterface; and in *.services.yml files, which feed Symfony's container. Hooks and plugins are Drupal's own systems.

Not outside core's constraints. Core 11.4.10 asks for 7.4 on its main Symfony packages, so Composer will not install Symfony 8 for them. Patch releases inside 7.4 install with a normal Composer update.

Cite this definition

"Symfony." DXPR Drupal glossary, https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/symfony. Last updated October 26, 2026.

Related terms

All Drupal terms from A to Z