Change how the templates link the project into Drupal

Migrated issue

Reported by: alexpott

Problem/Motivation

The current way that the project alters the composer.json under test and links files to a project directory is extremely fragile and has caused a number of bugs over time. For example #3495586: PHPCS error in contributed module caused by core recipe.README.txt.

Proposed resolution

Alter the templates to not change the code under test at all. We should copy the project's composer.json to a different directory that is not part of the checkout code. We should then alter that composer json using the expand script and tell composer where to find the code under test. This can be achieved with something like

    - cd /some/other/path
    - composer config repositories.module path "$CI_PROJECT_DIR"
    - composer require "$PROJECT_NAME:@dev"

Remaining tasks

Work out all the steps to do this.

User interface changes

None

API changes

TBD

Data model changes

TBD

Edited by drupalbot