Skip to content

[WebProfilerBundle] Show APP_RUNTIME #61508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 7.4
Choose a base branch
from

Conversation

mudassaralichouhan
Copy link

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #61491
License MIT

This PR adds support for displaying the APP_RUNTIME value in the Symfony Profiler configuration dashboard.

Before

  • The configuration dashboard did not show which application runtime was used.

After

  • A new section "Application Runtime" is displayed when $_SERVER['APP_RUNTIME'] is set, making it easier to debug and confirm the active runtime.
$_SERVER['APP_RUNTIME'] = 'Symfony\\Runtime\\SymfonyRuntime';

Profiler UI

Application Runtime
-------------------
Runtime: Symfony\Runtime\SymfonyRuntime

@carsonbot carsonbot added this to the 7.4 milestone Aug 23, 2025
@carsonbot carsonbot changed the title feature: Add APP_RUNTIME display in Symfony Profiler configuration da… feature: Add APP_RUNTIME display in Symfony Profiler configuration da… Aug 23, 2025
@carsonbot carsonbot changed the title feature: Add APP_RUNTIME display in Symfony Profiler configuration da… [WebProfilerBundle] feature: Add APP_RUNTIME display in Symfony Profiler configuration da… Aug 24, 2025
@OskarStark OskarStark changed the title [WebProfilerBundle] feature: Add APP_RUNTIME display in Symfony Profiler configuration da… [WebProfilerBundle] Show APP_RUNTIME Aug 24, 2025
@MatTheCat
Copy link
Contributor

If APP_RUNTIME is not defined the runtime class will be the one defined in composer.json’s extra.runtime.class, or the SymfonyRuntime by default.

If the goal of this PR is only to display APP_RUNTIME’s value, the profiler already has a Server Parameters tab in the Request panel.

@OskarStark OskarStark changed the title [WebProfilerBundle] Show APP_RUNTIME [WebProfilerBundle] Show APP_RUNTIME Aug 24, 2025
@94noni
Copy link
Contributor

94noni commented Aug 24, 2025

Hey thx for trying that
Indeed this env var alone is not worth it
My main idea in the issue was if we can display, in the profiler or perhaps also the console about command, the real runtime behind the scene from wherever it can come from
(Dont know the feasability thought)

- Resolve runtime from APP_RUNTIME, composer.json extra.runtime.class, or Symfony\Runtime\SymfonyRuntime
- Expose via ConfigDataCollector::getAppRuntime and render in config.html.twig
- Add tests for env/composer/fallback resolution
@mudassaralichouhan
Copy link
Author

The PR now displays the resolved runtime class — it checks APP_RUNTIME, then composer.json's extra.runtime.class, and finally falls back to Symfony\Runtime\SymfonyRuntime if none are set. So it shows the actual runtime behind the scenes, not just the env var.

- Remove static cache from resolveAppRuntime() to avoid cross-test contamination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Profiler] RFC: display app runtime in the Symfony configuration dashboard
5 participants