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

Twig debug #5668

Merged
merged 10 commits into from
Jul 6, 2023
Merged

Twig debug #5668

merged 10 commits into from
Jul 6, 2023

Conversation

Chi-teck
Copy link
Collaborator

This adds Drush command to enable/disable Twig debug mode.

This was previously requested as part of #5109. However, the proposed site:mode command is too wide, indeed. And it may need a lot of options to fit everyone's needs.

Unlike most of site:mode settings Twig debug mode cannot be set through settings.php or drush cset. It requires changing Twig parameters in development.services.yml file and rebuilding container. However, since Drupal 10.1.0 there is a way to enable it through Drupal states. So that the drush twig:debug command can be really simple.

Relevant issue on drupal.org
https://www.drupal.org/project/drupal/issues/3363676

src/Commands/core/TwigCommands.php Outdated Show resolved Hide resolved
src/Commands/core/TwigCommands.php Outdated Show resolved Hide resolved
@Chi-teck
Copy link
Collaborator Author

Chi-teck commented Jul 6, 2023

Fixed version number comparison.

@weitzman weitzman merged commit 8664a4f into drush-ops:12.x Jul 6, 2023
2 checks passed
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