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

[TwigComponent] refactor debug:twig-component/TwigComponentDataCollector #1812

Draft
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

kbond
Copy link
Member

@kbond kbond commented Apr 30, 2024

Q A
Bug fix? no
New feature? no
Issues n/a
License MIT

Successor to #1722.

Comment on lines +72 to +73
if ($name = $input->getArgument('name')) {
if (!$component = $this->findComponentName($io, $name, $input->isInteractive())) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe even put this in "interact" ?

Comment on lines +260 to +263
match (true) {
null === $metadata->get('class') => '<comment>Anon</comment>',
$metadata->get('live') => '<info>Live</info>',
default => '',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmpf :)

$container->setAlias('console.command.stimulus_component_debug', 'ux.twig_component.command.debug')
->setDeprecated('symfony/ux-twig-component', '2.13', '%alias_id%');

if ($container->getParameter('kernel.debug')) {
$loader->load('debug.php');

$container->setParameter('ux.twig_component.anonymous_template_directory', $config['anonymous_template_directory']);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure to understand why we need this ?

i'd rather not set container parameters (even in debug only) if we can avoid

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure to understand why we need this ?

This was a relic from the previous PR. I think I can remove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants