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
Copy file name to clipboardExpand all lines: docs/config.md
+13-5
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ services:
18
18
webroot: .
19
19
xdebug: false
20
20
composer: []
21
-
composer_version: '2.2.12'
21
+
composer_version: '2'
22
22
# Below only valid for via: cli
23
23
command: tail -f /dev/null
24
24
config:
@@ -161,16 +161,22 @@ You can use `lando info --deep | grep IPAddress` to help discover the correct ho
161
161
162
162
## Installing composer
163
163
164
-
As of Lando `3.0.17` you can configure the version of `composer` you would like to install. This _should_ respect any of the versions listed on the [Composer download page](https://getcomposer.org/download/) but it is required you specify down to the patch version.
164
+
Lando automatically installs the latest compatible version of Composer based on your specified PHP version:
165
+
166
+
- PHP >= 7.3: Composer 2.x
167
+
- PHP >= 5.3.2 and < 7.3: Composer 2.2 LTS
168
+
- PHP < 5.3.2: Composer 1.x
169
+
170
+
You can customize the Composer version by specifying either a specific version number or using a channel alias:
165
171
166
172
```yaml
167
173
services:
168
174
myservice:
169
-
type: php
170
-
composer_version: "1.10.1"
175
+
type: php:8.2
176
+
composer_version: "2.6.5" # Install specific version
171
177
```
172
178
173
-
You can also choose to ignore the `composer` install step by setting `composer_version: false`. This will use whatever version of `composer` was last bundled with our `php` image. The following "convenience flags" are also available:
179
+
The following channel aliases are available:
174
180
175
181
```yaml
176
182
# Install the latest stable 1.x version
@@ -192,6 +198,8 @@ composer_version: preview
192
198
composer_version: snapshot
193
199
```
194
200
201
+
You can disable Composer installation entirely by setting `composer_version: false`.
202
+
195
203
## Installing global dependencies
196
204
197
205
You can also use the `composer` key if you need to require any [global composer dependenices](https://getcomposer.org/doc/03-cli.md#require). This follows the same syntax as your normal [`composer.json`](https://getcomposer.org/doc/01-basic-usage.md#composer-json-project-setup) except written as YAML instead of JSON.
0 commit comments