The http://docs.drush.org/en/master/install page states:
Drush 9 only supports one install method. It requires that your Drupal 8 site be built with Composer and Drush be listed as a dependency.
and if you go to https://github.com/drupal-composer/drupal-project and follow the given steps, in particular run the
composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interaction command, then:
You will have to create an empty directory (otherwise it will complain the given directory is not empty);
It will create Composer structure with Drupal 8 located in
It will also create
vendorsub-directory with lot's of other sub-directories as:
alchemy composer doctrine fabpot league phar-io sebastian theseer asm89 consolidation drupal grasmash masterminds phpdocumentor squizlabs twig autoload.php container-interop drupal-composer guzzlehttp mikey179 phpspec stack vlucas behat cweagans drush instaclick myclabs phpunit stecman webflo bin dflydev easyrdf jakub-onderka nikic psr symfony webmozart chi-teck dnoegel egulias jcalderonzumba paragonie psy symfony-cmf zendframework
Now with regard the new way of isntalling Drupal 8 I have two questions:
- Previously we would install Drupal 8 in document root set by control panel. Different control panel have different document roots, ours default them in
Now, with the new way of installing Drupal 8 we end up with document root located in
/home/username/some-dir/web, which does not play nice with our control panel's defaults. So I wonder what is the best recommended practice here?
Creating symbolic links between the old and new document roots also have its issues. For example, if you switch to
/home/username/public_html (which is a symbolic link to
/home/username/some-dir/web) and run the
composer update command then it will give:
No composer.json in current directory, do you want to use the one at /home/username/some-dir? [Y,n]?
and we would really like to avoid this kind of extra steps, but at the same time respecting our control panel's default settings.
Changing the default setting for document roots in control panel is also not a good option as there could be lot's of old and non-Drupal websites on servers, so the old document root must be kept.
- Do we have to have Composer structure with lot's of sub-directories like ones in
vendorin every website's home directory? Please note that in my test setup Composer is installed globally. But when you run the
composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interactioncommand it creates all those directories within a website's home directory.