Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab_templates
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
gitlab_templates
Merge requests
!270
#3480296
Cannot use Composer 1 any more
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
#3480296
Cannot use Composer 1 any more
issue/gitlab_templates-3480296:3480296-d7-composer2
into
main
Overview
0
Commits
4
Pipelines
8
Changes
1
Merged
Jonathan Smith
requested to merge
issue/gitlab_templates-3480296:3480296-d7-composer2
into
main
7 months ago
Overview
0
Commits
4
Pipelines
8
Changes
1
Expand
Closes
#3480296
0
0
Merge request reports
Compare
main
version 6
e86aa1e9
7 months ago
version 5
172e780e
7 months ago
version 4
d337d99e
7 months ago
version 3
f694b094
7 months ago
version 2
f8ea11de
7 months ago
version 1
eec6b44b
7 months ago
main (base)
and
latest version
latest version
e86aa1e9
4 commits,
7 months ago
version 6
e86aa1e9
4 commits,
7 months ago
version 5
172e780e
4 commits,
7 months ago
version 4
d337d99e
2 commits,
7 months ago
version 3
f694b094
2 commits,
7 months ago
version 2
f8ea11de
2 commits,
7 months ago
version 1
eec6b44b
1 commit,
7 months ago
1 file
+
11
−
16
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
includes/include.drupalci.main-d7.yml
+
11
−
16
Options
@@ -268,31 +268,26 @@ stages:
# Get the composer version currently installed. Use space or . for delimiters to return the single digit top-level version.
-
COMPOSER_VERSION=$(composer --version | awk -F'[ .]' "{print \$3}")
-
|
if [ "$COMPOSER_VERSION" == "2" ]; then
if [ "$_D7_DRUPAL_COMPOSER_NEEDED" == "1" ]; then
# Revert to Composer version 1, see https://www.drupal.org/project/composer/issues/3178950
echo "Composer 2 is installed, reverting to Composer 1 because _D7_DRUPAL_COMPOSER_NEEDED=$_D7_DRUPAL_COMPOSER_NEEDED"
composer self-update --1
else
echo "Composer 2 is installed, setting allow-plugins"
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
fi
if [ "$COMPOSER_VERSION" == "1" ]; then
composer --version
echo "Composer 1 is installed but is no longer supported, updating to Composer 2. See https://www.drupal.org/project/gitlab_templates/issues/3480296"
composer self-update --2
fi
-
composer --version
-
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer
true
-
composer config repositories.0 composer https://packages.drupal.org/7
# Get dependencies that will be used at a later stage.
-
composer require --dev drupal/coder:^8.2@stable phpunit/phpunit symfony/filesystem drush/drush:^8.3.3
-
|
if [ "$_D7_DRUPAL_COMPOSER_NEEDED" == "1" ]; then
# Bring the drupal/composer package and
copy/move things arou
nd
.
# Bring the drupal/composer package and
move it to vendor/drush/drush/comma
nd
s
composer require --dev drupal/composer:1.x-dev
mv vendor/drupal/composer vendor/drush/drush/commands/composer
# Third-party modules loaded via the projects composer.json will be in
# vendor/drupal but they need to be moved into sites/all/modules.
# The 'drupal' and 'coder' directories must not be moved.
ls $CI_PROJECT_DIR/vendor/drupal | grep -Ev '(drupal|coder)' | xargs -I {} mv -v $CI_PROJECT_DIR/vendor/drupal/{} $CI_PROJECT_DIR/$_WEB_ROOT/sites/all/modules || true
mv -v vendor/drupal/composer vendor/drush/drush/commands/composer
fi
# Third-party modules loaded via the projects composer.json will be in
# vendor/drupal but they need to be moved into sites/all/modules.
# The 'drupal' and 'coder' directories must not be moved.
-
ls $CI_PROJECT_DIR/vendor/drupal | grep -Ev '(drupal|coder)' | xargs -I {} mv -v $CI_PROJECT_DIR/vendor/drupal/{} $CI_PROJECT_DIR/$_WEB_ROOT/sites/all/modules ||
true
# Symlink module files to a module folder so we can do a full Drupal install.
-
echo "Executing curl -OL https://git.drupalcode.org/$_CURL_TEMPLATES_REPO/-/raw/$_CURL_TEMPLATES_REF/scripts/symlink_project.php"
-
curl -OL https://git.drupalcode.org/$_CURL_TEMPLATES_REPO/-/raw/$_CURL_TEMPLATES_REF/scripts/symlink_project.php
Loading