-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a legacy 'drush dl' command #2790
Conversation
Not sure if this code should stay in LegacyCommands or move somewhere else. |
This is odd:
Maybe I should remap |
…prototype --dev handler via git clone.
Remapping to drupal-composer/drupal-project seems to work pretty well. I tried a preliminary implementation of using |
I threw in some quick prototype code to parse the release xml. Maybe this should ultimately use an xml parser rather than preg_match, maybe default_major isn't the right attribute, maybe there should be some way for the user to specify which version they want when using --dev. Looks like there might be some promise here, though, in terms of volume of code to utility. |
I see this as an education tool. I'd like for this to, by default, show you a composer command thats close to what you meant when you run I'd prefer to stay away from XML fetch/parse entirely. This should be the job of composer and drupal.org's Packagist. Am willing to discuss all this. |
I'm totally on the fence about I do think that we should run composer for the user. The command that is run is in fact echo'ed in the progress logs. I know composer, but I find that the lack of |
I reviewed the commands in LegacyCommand.php again, and don't feel that wrappers for the others are really necessary. I also pointed folks trying If you're satisfied with the story here, I think this is done-ish (pending release of Robo 1.0.8 and maybe some docs / test updates). |
The case when composerRoot is not found may need more thought. It still works today to have a global Drush9 and point |
I forgot about It technically works to use Drupal's docroot as the composer root, but this should not be done if the target site has a nested docroot. I think that right now the DrupalFinder is only instantiated if we search for the docroot. I'll ensure that it is set up correctly when root is identified. This will be necessary for areas other than drush dl, I'm sure. Not sure if we should warn or advise if the user is deliberately using |
f5ec10e
to
90998af
Compare
It would be helpful if we find composerRoot very early on in preflight (phase 0). Thats because I want to get the Drush version via |
Borrowing from our new generate command, maybe destination can be as simple as
|
If there is a DRUPAL_ROOT, then we have a Drupal site. If we have a Drupal site, then Composer should set the destination for the modules. The |
I dont see much demand for this. If you run |
Wraps 'composer require' / 'composer create-project'.
The
create-project
version can behave strangely; for example,drush dl drupal
downloads Drupal 8.1.3 instead of 8.3.2. Not sure why that is. Also, it seems that--dev
does not work; perhaps this is an expected characteristic of the drupal.org packagist.