It's "core-recommended" as in "recommended to avoid having dependency-related trouble with core."
Drupal core (and some of the contributed modules, but not all) has a variety of automated tests that are run to make sure that everything is working as expected. However, Drupal also needs dependencies to run. If you use different versions of the dependencies that were not tested, there might be a bug and the tests might not pass. core-recommended
contains the specific dependencies that were used to test a given version of Drupal core.
By using core-recommended
, you are guaranteed to get the same dependencies that were used to release that version of Drupal core, and Drupal core is only released when those tests pass. So, you can be more confident when you are deploying your site because you know that your combination of core + dependencies is verified to work according to the tests.
let's say you install a dev version of a module or any other third
party library with composer, which explicitly needs a different
version of a Symfony component than drupal/core-recommended,
It's relatively rare for a contributed module to need a specific version of a Symfony component. When you do need to use such a module and you switch from core/recommended
to core
, you might experience some Symfony-related or other dependency-related bugs because some of the dependencies may require changes in core that have not been made yet. So when you do this, you are now responsible for running the tests, and if you encounter bugs you may have to search the core issue queue and apply patches, etc.
As for dev modules, it's never recommended to install dev modules on production, so whenever you install a dev module, you are taking responsibility for testing into your own hands.
TLDR: Recommended means "recommended because it passed the tests." These are the recommended dependencies because they are known to work, but of course you can try to use others if you like. But, if you don't use the recommended dependencies and then you find a bug and think, "hey, core is broken, let's file an issue!", you should first check with core-recommended
to make sure the issue isn't specific to the contrib module/dependency that required you to remove core-recommended
.
drupal/core
.