Skip to content

[cache:context:debug] Create command and move cache:rebuild command #2489

Merged
enzolutions merged 7 commits intohechoendrupal:masterfrom
smalot:master
Jul 3, 2016
Merged

[cache:context:debug] Create command and move cache:rebuild command #2489
enzolutions merged 7 commits intohechoendrupal:masterfrom
smalot:master

Conversation

@smalot
Copy link
Copy Markdown
Contributor

@smalot smalot commented Jul 3, 2016

Create cache:context:list command and move cache:rebuild command into new namespace.

@smalot smalot changed the title Create cache:context:list command and move cache:rebuild command [cache:context:list] Create command and move cache:rebuild command Jul 3, 2016
@smalot
Copy link
Copy Markdown
Contributor Author

smalot commented Jul 3, 2016

This new command list all available contexts which can be used in cache config:
https://www.drupal.org/developing/api/8/cache/contexts

Useful if context are added via multiple contrib modules

@enzolutions enzolutions added this to the 1.0.0-beta4 milestone Jul 3, 2016
@enzolutions
Copy link
Copy Markdown
Contributor

Awesome contribution @smalot , only a small change, please rename the class and debug as cache:context:debug to maintain consistency with others commands

@smalot
Copy link
Copy Markdown
Contributor Author

smalot commented Jul 3, 2016

Ok for me, with great pleasure !

@jmolivas
Copy link
Copy Markdown
Member

jmolivas commented Jul 3, 2016

@smalot Do you mind to:

  1. Rename commands classes

src/Command/Cache/CacheRebuildCommand.php
as
src/Command/Cache/Cache/RebuildCommand.php

src/Command/Cache/CacheContextListCommand.php
as
src/Command/Cache/ContextDebugCommand.php

  1. Update config/services/cache.yml file to reflect namespace changes.

  2. Update command classes

use Symfony\Component\Console\Command\Command as BaseCommand;
and
class CacheContextListCommand extends BaseCommand

with

use Symfony\Component\Console\Command\Command;
and
class CacheContextListCommand extends Command

@enzolutions enzolutions changed the title [cache:context:list] Create command and move cache:rebuild command [cache:context:debug] Create command and move cache:rebuild command Jul 3, 2016
@enzolutions
Copy link
Copy Markdown
Contributor

Works like a charm, thanks @smalot

@enzolutions enzolutions merged commit 6cbb4a9 into hechoendrupal:master Jul 3, 2016
@smalot
Copy link
Copy Markdown
Contributor Author

smalot commented Jul 3, 2016

My pleasure !

@jmolivas
Copy link
Copy Markdown
Member

jmolivas commented Jul 3, 2016

@smalot great work, thanks for the PR and the super-fast reply.

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.

3 participants