Skip to content

Commit d3633d4

Browse files
committed
refactor: improve documentation for DevToolsCommandLoader class
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent 08f5365 commit d3633d4

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/Console/CommandLoader/DevToolsCommandLoader.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@
2525
use Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
2626
use Symfony\Component\Finder\Finder;
2727

28+
/**
29+
* Responsible for dynamically discovering and loading Symfony Console commands
30+
* within the DevTools context. This class extends the ContainerCommandLoader
31+
* and integrates with a PSR-11 compatible container to lazily instantiate commands.
32+
*
33+
* The implementation MUST scan a predefined directory for PHP classes representing
34+
* console commands and SHALL only register classes that:
35+
* - Are instantiable
36+
* - Extend the Symfony\Component\Console\Command\Command base class
37+
* - Declare the Symfony\Component\Console\Attribute\AsCommand attribute
38+
*
39+
* The command name MUST be extracted from the AsCommand attribute metadata and
40+
* used as the key in the command map. Classes that do not meet these criteria
41+
* MUST NOT be included in the command map.
42+
*/
2843
final class DevToolsCommandLoader extends ContainerCommandLoader
2944
{
3045
/**

0 commit comments

Comments
 (0)