drush
drush copied to clipboard
Add an inflection for bootstrapManager
Is your feature request related to a problem? Please describe.
There are a lot of Drush commands that do Drush::bootstrapManager().
Describe the solution you'd like
This could be adapted to the inflection DI pattern, so:
- a BootstrapManagerAwareInterface
- a BootstrapManagerAwareTrait
code becomes: $this->bootstrapManager()
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
Very few commands need this, so not sure an inflection is warranted.
A quick grep got me this:
src/Commands/pm/SecurityUpdateCommands.php
src/Commands/core/MkCommands.php
src/Commands/core/CacheCommands.php
src/Commands/core/EditCommands.php
src/Commands/core/SiteInstallCommands.php
src/Commands/core/SiteCommands.php
src/Commands/core/RunserverCommands.php
src/Commands/core/LoginCommands.php
src/Commands/core/StatusCommands.php
src/Commands/generate/ApplicationFactory.php
src/Commands/core/BrowseCommands.php
src/Commands/generate/Generators/Drush/DrushAliasFile.php
src/Commands/help/ListCommands.php
src/Commands/sql/SqlCommands.php
I don't know what you consider as 'few' ;)
It's also useful for custom commands, as AFAICT the BootstrapManager is the right way to get the app root -- eg https://github.com/joachim-n/automultisites/blob/main/Drush/Commands/SitesDrushCommands.php#L28
Thats more than I expected. Ping @greg-1-anderson for input.