Problem/Motivation

At #3453474: CLI entry point in Drupal Core @larowlan pointed out:

Are these two mutually exclusive? i.e. if the file extension isn't .php we don't get the the subdir code - but a subdir won't end in .php?

Indeed, trying to add a Command as Drupal\console_test\Command\Sub.dir\ConsoleSubExampleCommand fails.

Steps to reproduce

Proposed resolution

Fix core/lib/Drupal/Core/DependencyInjection/Compiler/ConsoleCompilerPass.php for this. Again, quoting @larowlan:

If my comment below about mutually exclusivity means subdir scanning isn't working - perhaps instead we should do the fitltering by adding a \RecursiveCallbackFilterIterator callback that limits to .php files and folders and use that between the RecursiveIteratorIterator and the RecursiveDirectoryIterator to achieve the filtering?

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3594184

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dww created an issue.