Skip to content

Conversation

@dbu
Copy link
Contributor

@dbu dbu commented Dec 8, 2025

Q A
Branch? 7.4
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

The FrameworkExtension is generally aware that symfony/console is an optional dependency, but when the profiler is loaded, it loads the console profiler unconditionally. this has been broken when the check for CliRequest::class was removed but not replaced with an other check for availability of the console

@carsonbot carsonbot added this to the 8.0 milestone Dec 8, 2025
@carsonbot carsonbot changed the title only load console profiling if console is actually available only load console profiling if console is actually available Dec 8, 2025
@nicolas-grekas nicolas-grekas modified the milestones: 8.0, 7.4 Dec 8, 2025
@symfony symfony deleted a comment from carsonbot Dec 8, 2025
@nicolas-grekas
Copy link
Member

Can you rebase for 7.4? The method call is missing there also.

@dbu
Copy link
Contributor Author

dbu commented Dec 8, 2025

Can you rebase for 7.4? The method call is missing there also.

in 7.4 we check for the (deprecated) CliRequest::class

i guess removing references to the deprecated class was the reason for this regression. i think i would leave 7.4 as is, it works fine. but if you prefer, i can do a PR against 7.4 to replace the class_exists check with a hasConsole call.

@nicolas-grekas
Copy link
Member

I'd keep both calls on 7.4: hasMethod because the method is protected so that it's a possible extension point, and class_exists as a feature test

@dbu dbu force-pushed the profile-console-optional branch from dfff0df to 855e836 Compare December 8, 2025 10:58
@dbu dbu changed the base branch from 8.0 to 7.4 December 8, 2025 10:58
@dbu dbu force-pushed the profile-console-optional branch from 855e836 to 5ab5322 Compare December 8, 2025 10:59
@dbu
Copy link
Contributor Author

dbu commented Dec 8, 2025

okay, i target 7.4 now. there will be a conflict when merging up to 8.0

@GromNaN GromNaN changed the title only load console profiling if console is actually available [FrameworkBundle] Enable console profiling only if the console is actually available Dec 8, 2025
@nicolas-grekas
Copy link
Member

Thank you @dbu.

@nicolas-grekas nicolas-grekas merged commit 13a5dd2 into symfony:7.4 Dec 10, 2025
11 of 12 checks passed
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.

5 participants