Finalize DI for sitewide command packages
Urgently needed this. Found a code comment how to do it. Did it.
Patch worksforme. Only thing left is to fix the path expression.
Needs a test and code style fixes.
OK Codestyle is fixed now.
Next i can use some hints:
// @fixme Fix directory to use project root.
$this->addDrushServiceProviderFromSubdirectories(dirname(DRUPAL_ROOT) . '/drush');
Deriving the drush dir from Drupal root is wrong but the best i could figure out. I think it should be derived from project root.
@weitzman What is the canonical way to get the project root?
(Also memo to me: Some tests fail with windows-style paths. So use DIRECTORY_SEPARATOR, not '/')
@weitzman As of tests: Not my strong point, but i'll try. Can you give me a hint how to approach this?
I',m not sure the answer to those questions. Needs a review. Maybe @greg-1-anderson or @claudiu-cristea can review.
This brings complexity. if anyone really wants it please post a use case.