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

Add drush sset examples for new Twig debugging / caching settings #5614

Merged

Conversation

DieterHolvoet
Copy link
Contributor

@DieterHolvoet
Copy link
Contributor Author

A couple questions:

  • Should I create an MR for 11.x as well?
  • Do we want a separate command to change these settings, or are we going to stick with state:set?
  • Should we get rid of the drush sset system.maintenance_mode example since there's a separate command now? Should I do that in this MR as well?

@weitzman
Copy link
Member

weitzman commented Jun 5, 2023

Does lowercase true as value work right? I only see handling for uppercase.

I think this MR can proceed as is. No need to remove maint example IMO.

@DieterHolvoet
Copy link
Contributor Author

Does lowercase true as value work right?

No it doesn't, I changed it.

@DieterHolvoet
Copy link
Contributor Author

I do believe separate commands are a better idea. Now, if you want to toggle Twig debugging / caching, you have to run three Drush commands and you have to remember the three internal state keys. People who aren't aware that these values are kept in state - which is an implementation detail if you ask me, end users shouldn't have to care - will not be able to discover how to toggle these values. If we added commands, running drush would list them and people would immediately know what to do. Here's what I propose:

# Enable _Twig development mode_ (including _Twig debug mode_ & _Disable Twig cache_)
drush twig:dev 1
# Enable _Twig development mode_ and _Twig debug mode_ (not including _Disable Twig cache_)
drush twig:debug 1
# Enable _Twig development mode_ and _Disable Twig cache_ (not including _Twig debug mode_)
drush twig:cache 0
# Do not cache markup (disables render cache, dynamic page cache and page cache)
drush cache:markup 0

@weitzman
Copy link
Member

weitzman commented Jun 7, 2023

Yes, separate commands is better for those themers who need them. But that needs to balance against the clutter in the command list for those that dont. There are far more who dont. So, its a balance. I'm mulling it. We can (and have) add a ton of commands to core that are great but only apply to a small audience.

@DieterHolvoet
Copy link
Contributor Author

Okay, fair point! In that case I think this is good to go?

@weitzman weitzman merged commit e54107f into drush-ops:12.x Jun 7, 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