Skip to content

Commit 198ec24

Browse files
committed
Add support for Composer 2.
1 parent 237fcdc commit 198ec24

File tree

6 files changed

+164
-121
lines changed

6 files changed

+164
-121
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ For more details, see https://asset-packagist.org/site/about
158158

159159
### How do I specify a PHP version ?
160160

161-
This project supports PHP 7.0 as minimum version (see [Drupal 8 PHP requirements](https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7+.
161+
This project supports PHP 7.1 as minimum version (see [Drupal 8 PHP requirements](https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7+.
162162

163163
To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`:
164164
```json
165165
"config": {
166166
"sort-packages": true,
167167
"platform": {
168-
"php": "7.0.33"
168+
"php": "7.1"
169169
}
170170
},
171171
```

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,24 @@
2828
"discard-changes": true,
2929
"sort-packages": true,
3030
"platform": {
31-
"php": "7.0.8"
31+
"php": "7.1"
3232
}
3333
},
3434
"require": {
35-
"php": ">=7.0.8",
35+
"php": ">=7.1",
3636
"ext-curl": "*",
3737
"composer/installers": "^1.2",
3838
"cweagans/composer-patches": "^1.6.5",
39-
"drupal/console": "^1.0.2",
4039
"drupal/core": "^8.9.0",
4140
"drupal/core-composer-scaffold": "^8.9.0",
4241
"drupalcommerce/demo_commerce": "dev-master",
43-
"oomphinc/composer-installers-extender": "^1.1",
42+
"oomphinc/composer-installers-extender": "^2.0",
4443
"webflo/drupal-finder": "^1.0.0",
45-
"webmozart/path-util": "^2.3",
46-
"zaporylie/composer-drupal-optimizations": "^1.0"
44+
"webmozart/path-util": "^2.3"
4745
},
4846
"require-dev": {
49-
"drupal/core-dev": "^8.9.0"
47+
"drupal/core-dev": "^8.9.0",
48+
"zaporylie/composer-drupal-optimizations": "^1.1"
5049
},
5150
"conflict": {
5251
"drupal/drupal": "*"

web/.htaccess

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
# Protect files and directories from prying eyes.
6-
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
6+
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
77
<IfModule mod_authz_core.c>
88
Require all denied
99
</IfModule>
@@ -27,16 +27,9 @@ AddEncoding gzip svgz
2727
# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be
2828
# changed at runtime.
2929

30-
# PHP 5, Apache 1 and 2.
31-
<IfModule mod_php5.c>
30+
# PHP 7, Apache 1 and 2.
31+
<IfModule mod_php7.c>
3232
php_value assert.active 0
33-
php_flag session.auto_start off
34-
php_value mbstring.http_input pass
35-
php_value mbstring.http_output pass
36-
php_flag mbstring.encoding_translation off
37-
# PHP 5.6 has deprecated $HTTP_RAW_POST_DATA and produces warnings if this is
38-
# not set.
39-
php_value always_populate_raw_post_data -1
4033
</IfModule>
4134

4235
# Requires mod_expires to be enabled.
@@ -167,9 +160,9 @@ AddEncoding gzip svgz
167160
RewriteCond %{REQUEST_FILENAME}\.gz -s
168161
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
169162

170-
# Serve correct content types, and prevent mod_deflate double gzip.
171-
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
172-
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
163+
# Serve correct content types, and prevent double compression.
164+
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]
165+
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
173166

174167
<FilesMatch "(\.js\.gz|\.css\.gz)$">
175168
# Serve correct encoding type.

0 commit comments

Comments
 (0)