Skip to content

Commit 4d0c600

Browse files
committed
Deployed 8aa7750 to 13.x with MkDocs 1.4.3 and mike 2.0.0
1 parent 2e4fdf7 commit 4d0c600

File tree

5 files changed

+241
-240
lines changed

5 files changed

+241
-240
lines changed

13.x/commands/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5282,15 +5282,16 @@ <h2 id="altering-command-info">Altering Command Info<a class="headerlink" href="
52825282
<p>Drush command info (annotations/attributes) can be altered from other modules. This is done by creating and registering <em>command info alterers</em>. Alterers are classes that are able to intercept and manipulate an existing command annotation.</p>
52835283
<p>In the module that wants to alter a command info, add a class that:</p>
52845284
<ol>
5285-
<li>The generator class namespace, relative to base namespace, should be <code>Drupal\&lt;module-name&gt;\Drush\CommandInfoAlterers</code> and the class file should be located under the <code>src/Drush/CommandInfoAlterers</code> directory.</li>
5285+
<li>The class namespace, relative to base namespace, should be <code>Drupal\&lt;module-name&gt;\Drush\CommandInfoAlterers</code> and the class file should be located under the <code>src/Drush/CommandInfoAlterers</code> directory.</li>
52865286
<li>The filename must have a name like FooCommandInfoAlterer.php. The prefix <code>Foo</code> can be whatever string you want. The file must end in <code>CommandInfoAlterer.php</code>.</li>
52875287
<li>The class must implement the <code>\Consolidation\AnnotatedCommand\CommandInfoAltererInterface</code>.</li>
52885288
<li>Implement the alteration logic in the <code>alterCommandInfo()</code> method.</li>
52895289
<li>Along with the alter code, it's strongly recommended to log a debug message explaining what exactly was altered. This makes things easier on others who may need to debug the interaction of the alter code with other modules. Also it's a good practice to inject the the logger in the class constructor.</li>
52905290
</ol>
52915291
<p>For an example, see <a href="https://github.com/drush-ops/drush/blob/13.x/sut/modules/unish/woot/src/Drush/CommandInfoAlterers/WootCommandInfoAlterer.php">WootCommandInfoAlterer</a> provided by the testing 'woot' module.</p>
52925292
<h2 id="symfony-console-commands">Symfony Console Commands<a class="headerlink" href="#symfony-console-commands" title="Permanent link">&para;</a></h2>
5293-
<p>Drush lists and runs Symfony Console commands, in addition to more typical annotated commands. See <a href="https://github.com/drush-ops/drush/blob/eed106ae4510d5a2df89f8e7fd54b41ffb0aa5fa/tests/integration/AnnotatedCommandCase.php#L178-L180">this test</a> and this <a href="https://github.com/drush-ops/drush/blob/13.x/sut/modules/unish/woot/src/Commands/GreetCommand.php">commandfile</a>.</p>
5293+
<p>Drush lists and runs Symfony Console commands, in addition to more typical annotated commands.
5294+
See <a href="https://github.com/drush-ops/drush/blob/13.x/sut/modules/unish/woot/src/Drush/Commands/GreetCommands.php">GreetCommands</a> as an example. Note that these commands must conform to the usual class name and class namespace requirements. You might need to extend the Console class if you can't rename and move it.</p>
52945295
<h2 id="auto-discovered-commands-psr4">Auto-discovered commands (PSR4)<a class="headerlink" href="#auto-discovered-commands-psr4" title="Permanent link">&para;</a></h2>
52955296
<p>Such commands are auto-discovered by their class PSR4 namespace and class/file name suffix. Drush will auto-discover commands if:</p>
52965297
<ul>
@@ -5372,7 +5373,7 @@ <h2 id="global-commands-discovered-by-configuration">Global commands discovered
53725373
<small>
53735374

53745375
Last update:
5375-
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 12, 2024</span>
5376+
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 29, 2024</span>
53765377

53775378

53785379
</small>

13.x/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)