LegacyServiceFinder
class LegacyServiceFinder (View source)
Find drush.services.yml files.
This discovery class is used solely for backwards compatability with
Drupal modules that still use drush.services.ymls to define Drush
Commands, Alterers & etc.; this mechanism is deprecated, though.
Modules should instead use the static factory create
mechanism.
Properties
protected | $drushServiceYamls |
Methods
Get all service files that this class can discover.
Search for drush.service.yml files in discoverable locations.
Determine whether or not the Drush services.yml file is applicable for this version of Drush.
No description
No description
In composer.json, the Drush version constraints will appear in the 'extra' section like so:
No description
Add a services.yml file if it exists.
Find Drupal modules
Details
__construct($moduleHandler, DrushConfig $drushConfig)
No description
array
getDrushServiceFiles()
Get all service files that this class can discover.
protected
discoverDrushServiceProviders()
Search for drush.service.yml files in discoverable locations.
protected
addModuleDrushServiceProvider(string $module, string $filename)
Determine whether or not the Drush services.yml file is applicable for this version of Drush.
protected string[]
findModuleDrushServiceProvider(string $module, string $dir)
No description
protected string
findDefaultServicesFile(string $module, string $dir)
No description
protected array
findModuleDrushServiceProviderFromComposer(string $dir)
In composer.json, the Drush version constraints will appear in the 'extra' section like so:
"extra": { "drush": { "services": { "drush.services.yml": "^9" } } }
There may be multiple drush service files listed; the first one that has a version constraint that matches the Drush version is used.
protected string
findAppropriateServicesFile(string $module, array $services, string $dir)
No description
protected
addDrushServiceProvider(string $serviceProviderName, string $serviceYmlPath = '')
Add a services.yml file if it exists.
protected string[]
getModuleFileNames()
Find Drupal modules