You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is used to ensure that your scaffold files are updated every time drupal/core is
59
-
updated. If you customize any of the "scaffolding" files (commonly .htaccess),
55
+
updated. If you customize any of the "scaffolding" files (commonly `.htaccess`),
60
56
you may need to merge conflicts if any of your modified files are updated in a
61
57
new release of Drupal core.
62
58
63
59
Follow the steps below to update your core files.
64
60
65
-
1. Run `composer update drupal/core drupal/core-dev --with-dependencies` to update Drupal Core and its dependencies.
61
+
1. Run `composer update drupal/core-recommended drupal/core-dev --with-dependencies` to update Drupal Core and its dependencies.
66
62
2. Run `git diff` to determine if any of the scaffolding files have changed.
67
63
Review the files for any changes and restore any customizations to
68
64
`.htaccess` or `robots.txt`.
@@ -75,13 +71,6 @@ Follow the steps below to update your core files.
75
71
keeping all of your modifications at the beginning or end of the file is a
76
72
good strategy to keep merges easy.
77
73
78
-
## Generate composer.json from existing project
79
-
80
-
With using [the "Composer Generate" drush extension](https://www.drupal.org/project/composer_generate)
81
-
you can now generate a basic `composer.json` file from an existing project. Note
82
-
that the generated `composer.json` might differ from this project's file.
83
-
84
-
85
74
## FAQ
86
75
87
76
### Should I commit the contrib modules I download?
@@ -91,11 +80,14 @@ workrounds if a project decides to do it anyway](https://getcomposer.org/doc/faq
91
80
92
81
### Should I commit the scaffolding files?
93
82
94
-
The [Drupal Composer Scaffold](https://github.com/drupal/core-composer-scaffold) plugin can download the scaffold files (like
95
-
index.php, update.php, …) to the web/ directory of your project. If you have not customized those files you could choose
96
-
to not check them into your version control system (e.g. git). If that is the case for your project it might be
97
-
convenient to automatically run the drupal-scaffold plugin after every install or update of your project. You can
98
-
achieve that by registering `@composer drupal:scaffold` as post-install and post-update command in your composer.json:
83
+
The [Drupal Composer Scaffold](https://github.com/drupal/core-composer-scaffold)
84
+
plugin can download the scaffold files (like index.php, update.php, …) to the
85
+
web/ directory of your project. If you have not customized those files you could
86
+
choose to not check them into your version control system (e.g. git). If that is
87
+
the case for your project it might be convenient to automatically run the
88
+
drupal-scaffold plugin after every install or update of your project. You can
89
+
achieve that by registering `@composer drupal:scaffold` as post-install and
90
+
post-update command in your composer.json:
99
91
100
92
```json
101
93
"scripts": {
@@ -109,6 +101,7 @@ achieve that by registering `@composer drupal:scaffold` as post-install and post
109
101
]
110
102
},
111
103
```
104
+
112
105
### How can I apply patches to downloaded modules?
113
106
114
107
If you need to apply patches (depending on the project being modified, a pull
@@ -117,6 +110,7 @@ request is often a better solution), you can do so with the
117
110
118
111
To add a patch to drupal module foobar insert the patches section in the extra
119
112
section of composer.json:
113
+
120
114
```json
121
115
"extra": {
122
116
"patches": {
@@ -126,20 +120,18 @@ section of composer.json:
126
120
}
127
121
}
128
122
```
129
-
### How do I switch from packagist.drupal-composer.org to packages.drupal.org?
130
-
131
-
Follow the instructions in the [documentation on drupal.org](https://www.drupal.org/docs/develop/using-composer/using-packagesdrupalorg).
132
123
133
124
### How do I specify a PHP version ?
134
125
135
-
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+.
126
+
This project supports PHP 7.3 as minimum version (see [Environment requirements of Drupal 9](https://www.drupal.org/docs/understanding-drupal/how-drupal-9-was-made-and-what-is-included/environment-requirements-of)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7.3+.
136
127
137
128
To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`:
0 commit comments