Skip to content

Commit

Permalink
cache:rebuild not cache-rebuild in docs in tests. (#5126)
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Apr 14, 2022
1 parent f042756 commit 06f21d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/generators.md
Expand Up @@ -11,7 +11,7 @@ See [Woot module](https://github.com/drush-ops/drush/blob/11.x/tests/fixtures/mo
1. Write a class similar to [ExampleGenerator](https://github.com/drush-ops/drush/tree/11.x/tests/fixtures/modules/woot/src/Generators/). Implement your custom logic in the generate() method. Typically this class is placed under the src/Generators directory.
2. Add a .twig file to the same directory. This template specifies what gets output from the generator.
4. Add your class to your module's drush.services.yml file ([example](https://github.com/drush-ops/drush/blob/11.x/tests/fixtures/modules/woot/drush.services.yml)). Use the tag `drush.generator.v2` instead of `drush.command`.
5. Perform a `drush cache-rebuild` to compile your drush.services.yml changes into the Drupal container.
5. Perform a `drush cache:rebuild` to compile your drush.services.yml changes into the Drupal container.

## Global Generators

Expand Down
2 changes: 1 addition & 1 deletion src/Commands/core/CacheCommands.php
Expand Up @@ -244,7 +244,7 @@ public function validate(CommandData $commandData): void
// Check if the provided type ($type) is a valid cache type.
if ($type && !array_key_exists($type, $types)) {
if ($type === 'all') {
throw new \Exception(dt('`cache-clear all` is deprecated for Drupal 8 and later. Please use the `cache-rebuild` command instead.'));
throw new \Exception(dt('`cache-clear all` is deprecated for Drupal 8 and later. Please use the `cache:rebuild` command instead.'));
}
// If we haven't done a full bootstrap, provide a more
// specific message with instructions to the user on
Expand Down
4 changes: 2 additions & 2 deletions src/Drupal/Commands/core/RoleCommands.php
Expand Up @@ -74,7 +74,7 @@ public function roleAddPerm($machine_name, $permissions): void
$perms = StringUtils::csvToArray($permissions);
user_role_grant_permissions($machine_name, $perms);
$this->logger()->success(dt('Added "!permissions" to "!role"', ['!permissions' => $permissions, '!role' => $machine_name]));
$this->processManager()->drush($this->siteAliasManager()->getSelf(), 'cache-rebuild');
$this->processManager()->drush($this->siteAliasManager()->getSelf(), 'cache:rebuild');
}

/**
Expand All @@ -94,7 +94,7 @@ public function roleRemovePerm($machine_name, $permissions): void
$perms = StringUtils::csvToArray($permissions);
user_role_revoke_permissions($machine_name, $perms);
$this->logger()->success(dt('Removed "!permissions" to "!role"', ['!permissions' => $permissions, '!role' => $machine_name]));
$this->processManager()->drush($this->siteAliasManager()->getSelf(), 'cache-rebuild');
$this->processManager()->drush($this->siteAliasManager()->getSelf(), 'cache:rebuild');
}

/**
Expand Down

0 comments on commit 06f21d0

Please sign in to comment.