Skip to content
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

[Console] Fixed support for Kernel as command #59979

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

yceruto
Copy link
Member

@yceruto yceruto commented Mar 14, 2025

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

Currently, registering the Kernel as a command (see the example here: #59340 (comment)) results in an error:

Undefined array key "kernel"

I added the test case that highlights the issue and the fix (adding the 'container.no_preload' tag to the invokable service is incorrect, as it is not the command service).

@@ -58,6 +57,8 @@ public function process(ContainerBuilder $container): void
$invokableRef = null;
}

$definition->addTag('container.no_preload');
Copy link
Member Author

Choose a reason for hiding this comment

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

See line 54, where the $definition variable is redefined as the new command service

@fabpot
Copy link
Member

fabpot commented Mar 14, 2025

Thank you @yceruto.

@fabpot fabpot merged commit d768193 into symfony:7.3 Mar 14, 2025
11 checks passed
@yceruto yceruto deleted the kernel_command branch March 14, 2025 23:48
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.

4 participants