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`
55
-
is updated.
96
+
is used to ensure that your scaffold files are updated every time `drupal/core`
97
+
is updated.
56
98
57
99
If you customize any of the "scaffolding" files (commonly `.htaccess`),
58
100
you may need to merge conflicts if any of your modified files are updated in a
59
101
new release of Drupal core.
60
102
61
103
Follow the steps below to update your Drupal core files.
62
104
63
-
1. Run `composer update "drupal/core-*" --with-dependencies` to update Drupal Core and its dependencies.
105
+
1. Run `composer update "drupal/core-*" --with-dependencies` to update Drupal
106
+
Core and its dependencies.
64
107
2. Run `git diff` to determine if any of the scaffolding files have changed.
65
108
Review the files for any changes and restore any customizations to
66
-
`.htaccess` or `robots.txt`.
109
+
`.htaccess` or `robots.txt`.
67
110
3. Commit everything all together in a single commit, so `web` will remain in
68
111
sync with the `core` when checking out branches or running `git bisect`.
69
112
4. In the event that there are non-trivial conflicts in step 2, you may wish
70
113
to perform these steps on a branch, and use `git merge` to combine the
71
114
updated core files with your customized files. This facilitates the use
72
-
of a [three-way merge tool such as kdiff3](http://www.gitshah.com/2010/12/how-to-setup-kdiff-as-diff-tool-for-git.html). This setup is not necessary if your changes are simple;
115
+
of
116
+
a [three-way merge tool such as kdiff3](http://www.gitshah.com/2010/12/how-to-setup-kdiff-as-diff-tool-for-git.html).
117
+
This setup is not necessary if your changes are simple;
73
118
keeping all of your modifications at the beginning or end of the file is a
74
119
good strategy to keep merges easy.
75
120
@@ -83,24 +128,25 @@ workarounds if a project decides to do it anyway](https://getcomposer.org/doc/fa
83
128
### Should I commit the scaffolding files?
84
129
85
130
The [Drupal Composer Scaffold](https://github.com/drupal/core-composer-scaffold)
86
-
plugin can download the scaffold files (like `index.php`, `update.php` etc.) to
87
-
the `web` directory of your project. If you have not customized those files you
88
-
could choose to not check them into your version control system (e.g. git).
89
-
If that is the case for your project, it might be convenient to automatically
90
-
run the drupal-scaffold plugin after every install or update of your project.
91
-
You can achieve that by registering `@composer drupal:scaffold` as `post-install`
131
+
plugin can download the scaffold files (like `index.php`, `update.php` etc.) to
132
+
the `web` directory of your project. If you have not customized those files you
133
+
could choose to not check them into your version control system (e.g. git).
134
+
If that is the case for your project, it might be convenient to automatically
135
+
run the drupal-scaffold plugin after every install or update of your project.
136
+
You can achieve that by registering `@composer drupal:scaffold`
137
+
as `post-install`
92
138
and `post-update` command in your `composer.json`:
93
139
94
140
```json
95
141
"scripts": {
96
-
"post-install-cmd": [
97
-
"@composer drupal:scaffold",
98
-
"..."
99
-
],
100
-
"post-update-cmd": [
101
-
"@composer drupal:scaffold",
102
-
"..."
103
-
]
142
+
"post-install-cmd": [
143
+
"@composer drupal:scaffold",
144
+
"..."
145
+
],
146
+
"post-update-cmd": [
147
+
"@composer drupal:scaffold",
148
+
"..."
149
+
]
104
150
},
105
151
```
106
152
@@ -110,23 +156,24 @@ If you need to apply patches, you can do so with the
110
156
[composer-patches](https://github.com/cweagans/composer-patches) plugin included
111
157
in this project.
112
158
113
-
To add a patch to Drupal module `foobar`, insert the `patches` section in the
159
+
To add a patch to Drupal module `foobar`, insert the `patches` section in the
114
160
`extra` section of `composer.json`:
115
161
116
162
```json
117
163
"extra": {
118
-
"patches": {
119
-
"drupal/foobar": {
120
-
"Patch description": "URL or local path to patch"
121
-
}
122
-
}
164
+
"patches": {
165
+
"drupal/foobar": {
166
+
"Patch description": "URL or local path to patch"
167
+
}
168
+
}
123
169
}
124
170
```
125
171
126
172
### How do I specify a PHP version?
127
173
128
174
There are 2 places where Composer will be looking for PHP version requirements
129
175
when resolving dependencies:
176
+
130
177
1. The `require.php` version value in `composer.json`.
131
178
2. The `config.platform` version value in `composer.json`.
132
179
@@ -137,7 +184,7 @@ for a package. For example, the minimum version required for Drupal 11.0 is
137
184
The purpose of `config.platform` is to set the PHP language requirements for the
138
185
specific instance of the package running in the current environment. For
139
186
example, while the minimum version required for Drupal 11 is `8.3` or above,
140
-
the actual PHP version on the hosting provider could be `8.3.1`. The value of
187
+
the actual PHP version on the hosting provider could be `8.3.1`. The value of
141
188
this field should provide your exact version of PHP with all 3 parts of the
142
189
version.
143
190
@@ -153,8 +200,8 @@ that only the package versions supported by your current environment are used.
0 commit comments