Skip to content

Commit 3cb68fb

Browse files
authored
docs: add workaround for PHP plugin tool install order with corporate certs (#437)
* docs: add workaround for PHP plugin tool install order with corporate certs As of @lando/php 1.10.0+, tools like Composer are installed before user-defined build_as_root commands, breaking corporate proxy cert workflows. Documents the workaround of disabling automatic tool installation and manually installing after the cert is in place. Closes lando/php#236 * fix: add broken external links to netlify checklinks todoPatterns Docker dockerfile-release-notes has a fragment redirect issue and jeffgeerling.com returns 301 instead of expected 302. Both are external sites we can't control. * Update composer installation command in tips guide Removed version number from composer installation script.
1 parent 68d2b26 commit 3cb68fb

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

docs/guides/lando-corporate-network-tips.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,25 @@ services:
125125
- update-ca-certificates
126126
```
127127

128+
::: warning PHP plugin tools install before user build steps
129+
As of `@lando/php` 1.10.0+, tools like Composer are installed during the build phase **before** your `build_as_root` commands run. This means the cert won't be in place yet when tools try to download, causing SSL errors.
130+
131+
To work around this, disable automatic tool installation and install them manually after your cert is in place:
132+
133+
```yaml
134+
services:
135+
appserver:
136+
composer_version: false # Prevent automatic composer install
137+
build_as_root:
138+
- cp /app/yourcert.crt /usr/local/share/ca-certificates/
139+
- chmod 644 /usr/local/share/ca-certificates/yourcert.crt
140+
- update-ca-certificates
141+
- /etc/lando/service/helpers/install-composer.sh # Install composer after cert
142+
```
143+
144+
The same approach applies to other PHP tools — disable their automatic installation via config, install your cert first, then install the tools manually using the helper scripts in `/etc/lando/service/helpers/`.
145+
:::
146+
128147
#### Adding Certs for PHP cURL Requests
129148
If you make external requests with the PHP process in your app, you will also need to include the cert in your appserver's `php.ini` file:
130149

netlify.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
"overrides",
3131
"fragment-check",
3232
"sqlshack",
33-
"/v/"
33+
"/v/",
34+
"dockerfile-release-notes",
35+
"jeffgeerling.com"
3436
]
3537
skipPatterns = [
3638
".gif",

0 commit comments

Comments
 (0)