Skip to content

[Console] fix profiler with overridden run() method #61138

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

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

vinceAmstoutz
Copy link
Contributor

@vinceAmstoutz vinceAmstoutz commented Jul 16, 2025

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

When a command overrides the run() method, using the --profile option would bypass this custom logic. This was caused by TraceableCommand calling parent::run() instead of delegating the call to the decorated command.

This change ensures $this->command->run() is called, preserving the overridden logic and allowing the profiler to work as expected.

@carsonbot

This comment was marked as outdated.

@vinceAmstoutz vinceAmstoutz changed the base branch from 7.4 to 7.2 July 16, 2025 11:59
@vinceAmstoutz vinceAmstoutz changed the title fix(console): fix profiler with overridden run() method [Console] fix profiler with overridden run() method Jul 16, 2025
@alexandre-daubois alexandre-daubois modified the milestones: 7.4, 7.2 Jul 16, 2025
@vinceAmstoutz vinceAmstoutz force-pushed the fix/61134 branch 2 times, most recently from 5a381da to 0a2a602 Compare July 16, 2025 12:12
@nicolas-grekas
Copy link
Member

The test files are missing the license header.
Did you check branch 6.4? Is it not affected?

@vinceAmstoutz vinceAmstoutz force-pushed the fix/61134 branch 2 times, most recently from b058b1f to 0353eb1 Compare July 16, 2025 12:50
@vinceAmstoutz vinceAmstoutz changed the base branch from 7.2 to 6.4 July 16, 2025 12:50
@vinceAmstoutz
Copy link
Contributor Author

The test files are missing the license header. Did you check branch 6.4? Is it not affected?

The missing license headers have been added and yes, version 6.4 is affected, so I changed the target from version 7.2 to version 6.4.

@nicolas-grekas nicolas-grekas modified the milestones: 7.2, 6.4 Jul 16, 2025
Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@nicolas-grekas
Copy link
Member

Thank you @vinceAmstoutz.

@nicolas-grekas nicolas-grekas merged commit 6317c59 into symfony:6.4 Jul 16, 2025
10 checks passed
@vinceAmstoutz vinceAmstoutz deleted the fix/61134 branch July 16, 2025 13:42
@HeahDude
Copy link
Contributor

This breaks the protected functions decoration. We need to either delete some (now useless) code or find another way to fix this.

This was referenced Jul 31, 2025
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.

Using --profile on a command with run() overriden
6 participants