There should be a Composer template for people that just want to install Drupal without doing development, production or not, for example site builders. This template should not install any dev packages, such as phpunit, by default, if possible. Perhaps it should not install drush or drupal console either, since it is easy to add those later. It should really match the drupal release tarball, as much as possible.
See also https://github.com/drupal-composer/drupal-project/issues/443
I support this suggestion. It should be dead easy for site builders to install a non-dev version of Drupal using Composer.
This template will of course be unnecessary whenever Drupal core issue 2002304 is finished.
Or people could add/remove packages as needed after installation. This project is just a starter kit. Everyone modifies their project after create-project
People are seriously struggling with Composer. It really hurts the reputation of Drupal.
Since more and more Drupal docs (User Guide and community docs on drupal.org) are recommending this project, the project should offer a simple(non-dev template. If that template in addition enables us to run just composer update drupal/core --with-dependices to update Drupal, we would reduce the support request by half 馃槃
Me Composer helped to make big jumps in better understanding Drupal, PHP, the command line, development in general.
Drupal isn't WordPress, Drupal is an enterprise level CMS, a framework, an API. If anybody wants to customize their composer.json, fine. But please leave the mentioned dependencies in this project's composer.json as they are part of the whole ecosystem and they will undoubtedly help to climb the steep learning curve of Drupal.
The best purpose of the generated dev dependencies is to allow folks to do Drupal core development, e.g. running the unit tests. The drupal-dev-dependencies project is hard-constrained to a specific version of drupal-core, though, which often causes update problems for new users. Those who just want to run Behat on their site are better off with ordinary dev dependencies stipulated directly in their project's composer.json file.
New users who follow this template do not know why drupal-dev-dependencies are required; they keep it in their project specifically because it is in the template, and therefore appears to be required. I think it would be better to explicitly list a reasonable set of dev dependencies in the drupal-composer/drupal-project composer.json file, and have instructions in the README on how to substitute drupal-dev-dependencies instead, and the circumstances under which this should be done.
Thanks for clarifying @greg-1-anderson. Do you know if the Add composer-ready project templates to Drupal core project will exclude drupal-dev-dependencies by default? Having to remember to add --update-no-dev and --no-dev gets tiring. It also confuses new users, like you write.
Currently
$ composer update drupal/core --with-dependencies --no-dev
$ composer require drupal/admin_toolbar --update-no-dev
Better, possible at some point?
$ composer update drupal/core --with-dependencies
$ composer require drupal/admin_toolbar
@gitressa: At the moment, the Composer-ready template projects do include a new project, drupal/dev-dependencies, by default. However, this metapackage does not require or conflict with any version of drupal/core, so it should not cause any problems with updates.
Instructions for updating from a site created from a template project can be found in the README. The package generator README explains how the new metapackages relate to each other. We will be updating the documentation on drupal.org as the Drupal 8.8.x release cycle progresses.
Thanks for the links @greg-1-anderson, I have created the issue Exclude development libraries by default at drupal.org.
Please use https://github.com/drupal/core-recommended for an simplified version with dev dependencies and drush etc.
I think that the above recommendation intended to refer to https://github.com/drupal/recommended-project
That project does include dev dependencies in its dev branches, but does not include them in tagged releases. It does not include Drush or other optional utilities -- at least not yet.
Most helpful comment
The best purpose of the generated dev dependencies is to allow folks to do Drupal core development, e.g. running the unit tests. The drupal-dev-dependencies project is hard-constrained to a specific version of drupal-core, though, which often causes update problems for new users. Those who just want to run Behat on their site are better off with ordinary dev dependencies stipulated directly in their project's composer.json file.
New users who follow this template do not know why drupal-dev-dependencies are required; they keep it in their project specifically because it is in the template, and therefore appears to be required. I think it would be better to explicitly list a reasonable set of dev dependencies in the drupal-composer/drupal-project composer.json file, and have instructions in the README on how to substitute drupal-dev-dependencies instead, and the circumstances under which this should be done.