Problem/Motivation

The Symfony Runtime component provides a standardised way to perform application bootstrapping and environment set-up in a way that is decoupled from the specific application being implemented.

Originally proposed as part of #3313404: Use symfony/runtime for less bespoke bootstrap/compatibility with varied runtime environments, using the Symfony Runtime component to provide a place for bootstrap work that should not be the responsibility of the DrupalKernel.

Later in time adopted by #3453474: CLI entry point in Drupal Core (Dex) to provide the runtime set-up for the new Drupal CLI.

This issue includes the steps needed to add the dependency to the core composer files so that development using the library can begin.

Steps to reproduce

Proposed resolution

For the full reasoning of why the symfony/runtime component was chosen see #3313404: Use symfony/runtime for less bespoke bootstrap/compatibility with varied runtime environments. The module evaluation has been provided below.

Dependency Evaluation

Maintainership of the package

The package is maintained by Symfony.

Security policies of the package

Follows the Symfony security policy followed for our other Symfony dependencies.

Expected release and support cycles

Follows the regular Symfony release cycle.

Code quality

Written according to Symfony standards.

Other dependencies it would add, if any (the full tree, not just direct dependencies), and evaluations for those dependencies as well

The component requires PHP 8.4 or later. It also requires the composer-plugin-api. This fits in the existing dependency of Drupal's components on composer-plugin-api version 2.

The Runtime component has no other dependencies but can optionally integrate (and is tested with) other Symfony components.

Remaining tasks

Issues after this one:

User interface changes

Documentation Change

Symfony is already documented as PHP dependency for all components (symfony/symfony).

Introduced terminology

API changes

None, the new Drupal CLI will be the first (based on current issue readiness) consumer of the component in #3453474: CLI entry point in Drupal Core (Dex).

Improvements in moving Drupal's existing front-controllers to use the component are proposed in #3313404: Use symfony/runtime for less bespoke bootstrap/compatibility with varied runtime environments

Data model changes

Release notes snippet

Drupal has added the Symfony Runtime component. This will allow Drupal to start moving bootstrapping logic from the DrupalKernel into runtime classes that may be reused or swapped out by developers who are using Drupal. The first example of this will be in the upcoming Drupal CLI which uses the component to run the new console application.

Issue fork drupal-3552922

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kingdutch created an issue. See original summary.

kingdutch’s picture

Version: 11.2.x-dev » 11.x-dev

kingdutch’s picture

Issue summary: View changes
kingdutch’s picture

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, thanks!

xjm’s picture

I got to overhear the reasoning for #3313404: Use symfony/runtime for less bespoke bootstrap/compatibility with varied runtime environments earlier today and everything here convinces me this is worth the tradeoff of the additional dependency. Thanks @kingdutch!

xjm’s picture

Status: Reviewed & tested by the community » Postponed
Parent issue: » #3528698: [meta] Release preparation steps for 11.3.0 and 10.6.0

Discussed with @alexpott. Having this dependency added separately from #3313404: Use symfony/runtime for less bespoke bootstrap/compatibility with varied runtime environments is a good separation of concerns; however, we don't want to end up in a situation where this dependency is added to a minor release without the functionality it unlocks. Since we're pretty close to alpha1 of 11.3 and we probably don't want to make a change as dramatic as #3313404: Use symfony/runtime for less bespoke bootstrap/compatibility with varied runtime environments in that release since it's so soon and it would not give us enough time for review and testing, we agreed to postpone this issue on 11.3.x being branched. Then potentially commit it to 11.x after that. I'm adding this issue to #3528698: [meta] Release preparation steps for 11.3.0 and 10.6.0 to keep track of it.

Thanks!

klausi’s picture

Issue tags: +Vienna2025

Tagging.

quietone’s picture

Since 11.3.x has been branch, I am setting this to active.

nicxvan’s picture

I agree this should be done separately, but think it should still be postponed until the concerns in the other issue are resolved.

quietone’s picture

Version: 11.x-dev » main

I meant to set this to Active, so doing that now.

@nicxvan, can you elaborate on what you think this should be postponed on?

nicxvan’s picture

Yes there are two fairly divergent options in the related issue.

Now that both approaches have an mr demonstrating how they would work i have a bit less concern about this.

But I thought the dependency question should wait until an approach is decided upon. Both approaches use runtime so this is probably safe to move forward.

ghost of drupal past’s picture

Although currently the two branches there are divergent if you check my comment then you'll see the next steps are to bring them very close to achieve znerol's most excellent appcontext idea with the only difference being how front controllers are written

So yeah this issue should go ahead the other issue will resolve hopefully soon

quietone’s picture

Status: Postponed » Needs work

OK, then changing to Needs work to get the MR updated

larowlan’s picture

Status: Needs work » Needs review

This is now blocking #3453474: CLI entry point in Drupal Core (Dex) which is a strategic priority.

Given we have another use-case for it that doesn't involve a major rewrite of our front-controller like #3313404: Use symfony/runtime for less bespoke bootstrap/compatibility with varied runtime environments does - can we move forward with this?

The goal is to get #3453474: CLI entry point in Drupal Core (Dex) in before Drupal dev days to unlock the porting of other commands.

I'll reach out to RMs on slack

nicxvan’s picture

I'll take a look at the command issue, I'm interested if it looks like: #3576593: Create pre-bootstrap extension mechanism which still feels like the correct direction for the front controllers.

quietone’s picture

mradcliffe made their first commit to this issue’s fork.

mradcliffe’s picture

I rebased onto current main.

I ran COMPOSER_ROOT_VERSION=dev-main composer update drupal/core-recommended symfony/runtime, which added 8.0.8 to core-recommended. This was released on 2026.03.30 a couple of weeks after main was updated to Symfony 8. The prior release was 8.0.1 released in 2025.12.

I did a quick spot check by running ComposerIntegrationTest locally, which passed.

mradcliffe’s picture

Issue summary: View changes
Related issues: +#3453474: CLI entry point in Drupal Core

I updated the PHP version that is required by symfony/runtime to 8.4 since Symfony 8 was released.

godotislate’s picture

Issue summary: View changes
Issue tags: -Needs release manager review

Discussed with @catch and @longwave and have release manager approval. Also appears per #7 & #8 that @xjm also approved. Removing tag.

mradcliffe’s picture

Rebased again since I think we are close to RTBC.

mradcliffe’s picture

Test failures seem unrelated:

Drupal\Tests\config\Functional\ConfigInstallProfileOverrideTest::testInstallProfileConfigOverwrite
Error: Call to a member function label() on null

core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php:141
Drupal\Tests\ckeditor5\FunctionalJavascript\CKEditor5Test::testLanguageOfPartsPlugin
Behat\Mink\Exception\ExpectationException: The string "The text format <em class="placeholder">ckeditor5</em> has been updated." was not found anywhere in the HTML response of the current page.

vendor/behat/mink/src/WebAssert.php:888
vendor/behat/mink/src/WebAssert.php:363
core/tests/Drupal/Tests/WebAssert.php:569
core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php:238
core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php:165
mradcliffe’s picture

Rebased and the previous test failures disappeared. So we’re green if anyone wants to do another review of the issue summary and changes to RTBC?

kingdutch’s picture

As original author of the PR I'm happy with the rebased state and believe it reflects the correct changes against the current version of Drupal, as originally RTBC'd by Klausi in #6 and approved by xjm in #7. Given that I originally authored it I don't feel like I can be the person to now mark it as RTBC, but I don't know if that provides precedence for making those RTBCs apply, or gives someone else the confidence to give their final review.

kingdutch’s picture

Issue summary: View changes

I've adjusted the issue summary to also reference the Drupal CLI since with the current state of issues, that'll likely be the first adopter of the component. I've also updated the release note snippet to reflect that.

klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +DevDaysAthens2026

Thanks, looks good to me. We are only adding the new dependency here, which is approved by release managers.

xjm’s picture

The approach that we discussed at DrupalCon Vienna 2025 was waiting for one of the issues that requires the dependency to be RTBC and ready for commit. Then, we would update this issue for the latest composer.lock etc., commit it, and then rebase the others for a smaller MR for final review there. (That way, the dependency does not sit unused in HEAD requiring dependency management while we're waiting for a usecase to maybe-land-maybe-not.)

xjm’s picture

Title: Add symfony/runtime dependency to core » [PP-1]Add symfony/runtime dependency to core
Status: Reviewed & tested by the community » Postponed

Proper status is postponed to not clutter the queue; this will probably need to be rerolled against both main and 11.x once one or the other of the child issues is ready. It can be Re-TBCed then. Thanks everyone!