Problem/Motivation
Doing Drupal core development currently involves getting a git clone of core, then installing dependencies with Composer, and then having a non-clean git repo because of the changes Composer makes to files such as composer.lock.
Developers then have to keep stashing and unstashing these changes, and dealing with conflicts every time something changes in composer.lock.
This situation is made even worse if a developer wants to install tools to help with development, such as Drush or Devel module, as the composer.lock file will have more changes.
Steps to reproduce
Try to get set up to work on core:
1. git clone core
2. do composer install
Notice that the git clone now has changes which are going to be a pain to deal with all the time.
Proposed resolution
Provide a Composer project template which links in a git clone of Drupal core as a Composer file repository. This means that anything can be installed into the project without affecting Drupal core files.
Proof of concept at https://github.com/joachim-n/drupal-core-composer.
Remaining tasks
- Fix #1792310: Wrong DRUPAL_ROOT with non-standard code structure, as many workarounds in the joachim-n/drupal-core-composer template are needed because of this
- move the project template into Drupal core
- add it to the d.org developer documentation
Comments
Comment #2
gregglesI read through this and think that making it easier to develop code is an important one, for sure.
It's been a little while since this was filed so I wonder if you think things have changed since you filed it?
Comment #3
joachim commentedSince I filed this issue:
- lots of people are using the https://github.com/joachim-n/drupal-core-composer Composer project -- including DrupalPod!
- I've added Composer scripts to handle all the installation steps. Installing a Drupal project with this template is now a single command (including cloning Drupal core!)
- I've made a lot of progress on #1792310: Wrong DRUPAL_ROOT with non-standard code structure. Fixing this would remove the need for the special tweaks in the installation of this project (the symlinks and patches). There are just a few failing tests on that issue which I am working through.
I've updated the IS to reflect this.
Comment #4
gregglesHeh, I guess "things have changed" in part because you're continuing the effort. Thanks for that!
Comment #5
catchMoving to core given the ideas queue is deprecated, but postponing on #1792310: Wrong DRUPAL_ROOT with non-standard code structure
Comment #6
catchComment #8
joachim commentedComment #9
joachim commented