diff --git a/axltempl/composer.py b/axltempl/composer.py index a3eb199..3f44873 100644 --- a/axltempl/composer.py +++ b/axltempl/composer.py @@ -99,6 +99,10 @@ def get_drupal_template(name, description, core, core_version, docroot, cache_se if cache_service == "memcache": composer["require"]["drupal/memcache"] = "^2.0" composer["require"]["drupal/core-composer-scaffold"] = core_version + + if not is_version_2(): + composer["require"]["zaporylie/composer-drupal-optimizations"] = "^1.1" + return composer diff --git a/axltempl/files/drupal/composer.json b/axltempl/files/drupal/composer.json index 75faf7a..48ad6a3 100644 --- a/axltempl/files/drupal/composer.json +++ b/axltempl/files/drupal/composer.json @@ -6,10 +6,9 @@ "require": { "php": ">=7.2", "composer/installers": "^1.2", - "cweagans/composer-patches": "^1.6.5", + "cweagans/composer-patches": "^1.7.0", "drush/drush": "^9.7.1 | ^10.0", - "vlucas/phpdotenv": "^5.0", - "zaporylie/composer-drupal-optimizations": "^1.1" + "vlucas/phpdotenv": "^5.0" }, "require-dev": { "axelerant/db-docker": "^1.0",