@lando/php 1.8.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md ADDED
@@ -0,0 +1,81 @@
1
+ # PROJECT KNOWLEDGE BASE
2
+
3
+ **Generated:** 2026-01-09
4
+ **Commit:** 355c304
5
+ **Branch:** main
6
+
7
+ ## OVERVIEW
8
+
9
+ Lando PHP plugin - provides PHP services (5.3-8.5) via nginx/apache/cli with composer, xdebug support. Part of @lando ecosystem.
10
+
11
+ ## STRUCTURE
12
+
13
+ ```
14
+ lando--php/
15
+ ├── builders/ # Service builders (php.js = main logic)
16
+ ├── config/ # PHP/nginx config templates
17
+ ├── utils/ # Helper functions
18
+ ├── examples/ # Version-specific test fixtures (php-*)
19
+ ├── test/ # Unit tests (placeholder)
20
+ ├── docs/ # Project documentation markdown files and associated Vitepress site
21
+ ├── scripts/ # Helper scripts for build/install/etc
22
+ └── images/ # Docker image definitions for various PHP versions
23
+ ```
24
+
25
+ ## WHERE TO LOOK
26
+
27
+ | Task | Location | Notes |
28
+ |------|----------|-------|
29
+ | PHP version logic | `builders/php.js` | LandoPhp class, version detection |
30
+ | Nginx wrapper | `builders/php-nginx.js` | Extends @lando/nginx |
31
+ | Composer install | `builders/php.js:getDefaultComposerVersion()` | Version auto-detection |
32
+ | Xdebug config | `builders/php.js:xdebugConfig()` | Per-version handling |
33
+ | PHP config templates | `config/*.conf.tpl` | EJS templates |
34
+ | Add CLI/build steps | `utils/add-build-step.js` | Front/back insertion |
35
+ | Install command gen | `utils/get-install-commands.js` | Package manager abstraction |
36
+
37
+ ## CODE MAP
38
+
39
+ | Symbol | Type | Location | Role |
40
+ |--------|------|----------|------|
41
+ | `LandoPhp` | class | builders/php.js:18 | Main service builder |
42
+ | `getDefaultComposerVersion` | fn | builders/php.js | Composer version detection |
43
+ | `nginxConfig` | fn | builders/php.js | Nginx service config |
44
+ | `xdebugConfig` | fn | builders/php.js | Xdebug version handling |
45
+ | `parseApache/Cli/Nginx` | fns | builders/php.js | Via-specific parsing |
46
+ | `addBuildStep` | fn | utils/add-build-step.js | Build step insertion |
47
+ | `getInstallCommands` | fn | utils/get-install-commands.js | Install command gen |
48
+ | `cloneOverrides` | fn | utils/clone-overrides.js | Deep clone sans image/build |
49
+
50
+ ## CONVENTIONS
51
+
52
+ - **ESLint**: Google style, max-len 140, JSDoc required for functions
53
+ - **Images**: `devwithlando/php:{version}-{via}` format
54
+ - **Versions**: Supported 5.3-8.5, legacy removed at 8.x
55
+ - **Via options**: apache (default), nginx, cli
56
+ - **Composer**: v1 for PHP <7.2, v2 otherwise
57
+
58
+ ## ANTI-PATTERNS
59
+
60
+ - Don't modify `index.js` - intentionally empty placeholder
61
+ - Don't add dependencies without checking @lando/nginx compatibility
62
+ - examples/* are test fixtures - structured identically per version
63
+
64
+ ## COMMANDS
65
+
66
+ ```bash
67
+ # Development
68
+ npm run lint # ESLint check
69
+ npm run test:unit # Mocha unit tests
70
+ npm run test:leia # Leia integration tests
71
+
72
+ # Coverage
73
+ nyc covers: lib/, recipes/, services/, types/
74
+ ```
75
+
76
+ ## NOTES
77
+
78
+ - `plugin.yml` has `legacy: true` for Lando v3 compatibility
79
+ - Root `.lando.yml` is for docs site (vitepress), not plugin testing
80
+ - Test file `test/auth.spec.js` is placeholder ("should have tests")
81
+ - PHP config uses EJS templates (`.conf.tpl` extension)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})
2
2
 
3
+ ## v1.10.0 - [February 18, 2026](https://github.com/lando/php/releases/tag/v1.10.0)
4
+
5
+ * Added database client auto-detection and version matching [#212](https://github.com/lando/php/pull/212)
6
+ * Added Docker image build status badge to README
7
+ * Added GD AVIF support verification for PHP 8.3+ [#219](https://github.com/lando/php/pull/219)
8
+ * Fixed composer install ordering to run before user build steps
9
+ * Fixed MariaDB wrapper script command names and test auto-detection [#212](https://github.com/lando/php/pull/212)
10
+ * Fixed typo in documentation
11
+ * Updated Docker image base version to Debian 13
12
+ * Updated Docker image tags from -6 to -7
13
+ * Updated Node.js 14.x to 20.x in test examples [#215](https://github.com/lando/php/pull/215)
14
+ * Updated `actions/cache` from 4 to 5
15
+ * Updated `actions/checkout` from 4 to 6
16
+
17
+ ## v1.9.0 - [December 5, 2025](https://github.com/lando/php/releases/tag/v1.9.0)
18
+
19
+ * Added support for PHP 8.5
20
+ * Added Debian 13 (trixie) base images for PHP 8.3-8.5
21
+ * Changed PHP 7.4 and 8.0 images to use MariaDB `archive.mariadb.org` apt repository
22
+ * Fixed expired keys preventing stretch-based images from building
23
+
3
24
  ## v1.8.0 - [September 2, 2025](https://github.com/lando/php/releases/tag/v1.8.0)
4
25
 
5
26
  * Removed automatic installation of `hirak/prestissimo` for `composer:1`
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # PHP Lando Plugin
2
2
 
3
+ [![Build PHP Images](https://github.com/lando/php/actions/workflows/build-php-images.yml/badge.svg)](https://github.com/lando/php/actions/workflows/build-php-images.yml)
4
+
3
5
  This is the _official_ [Lando](https://lando.dev) plugin for [PHP](https://php.net). When installed it...
4
6
 
5
7
  * Allows users to run various `php` versions
@@ -16,7 +18,7 @@ Add a `php` service to your Landofile
16
18
  ```yaml
17
19
  services:
18
20
  myservice:
19
- type: php:8.1
21
+ type: php:8.5
20
22
  via: nginx
21
23
  webroot: www
22
24
  ```
@@ -43,6 +45,7 @@ We try to log all changes big and small in both [THE CHANGELOG](https://github.c
43
45
 
44
46
  * [@pirog](https://github.com/pirog)
45
47
  * [@reynoldsalec](https://github.com/reynoldsalec)
48
+ * [@aaronfeledy](https://github.com/AaronFeledy)
46
49
 
47
50
  ## Contributors
48
51
 
package/builders/php.js CHANGED
@@ -58,6 +58,34 @@ const xdebugConfig = host => ([
58
58
  `remote_host=${host}`,
59
59
  ].join(' '));
60
60
 
61
+ const detectDatabaseClient = (options, debug = () => {}) => {
62
+ if (options.db_client === false) return null;
63
+ if (options.db_client && options.db_client !== 'auto') return options.db_client;
64
+
65
+ const services = options._app?.config?.services || {};
66
+ let mysqlVersion = null;
67
+ let mariaVersion = null;
68
+
69
+ for (const service of Object.values(services)) {
70
+ const type = service?.type || '';
71
+ // Match mysql:X, mysql:X.Y, or mysql:X.Y.Z formats
72
+ const mysqlMatch = type.match(/^mysql:(\d+(?:\.\d+)?)/);
73
+ if (mysqlMatch && !mysqlVersion) mysqlVersion = mysqlMatch[1];
74
+ // Match mariadb:X, mariadb:X.Y, or mariadb:X.Y.Z formats
75
+ const mariaMatch = type.match(/^mariadb:(\d+(?:\.\d+)?)/);
76
+ if (mariaMatch && !mariaVersion) mariaVersion = mariaMatch[1];
77
+ }
78
+
79
+ if (mariaVersion && mysqlVersion) {
80
+ debug('Both MariaDB (%s) and MySQL (%s) detected; using MariaDB. Set db_client to override.',
81
+ mariaVersion, mysqlVersion);
82
+ }
83
+
84
+ if (mariaVersion) return `mariadb:${mariaVersion}`;
85
+ if (mysqlVersion) return `mysql:${mysqlVersion}`;
86
+ return null;
87
+ };
88
+
61
89
  /**
62
90
  * Helper function to build a package string by combining package name and version
63
91
  *
@@ -126,7 +154,7 @@ module.exports = {
126
154
  name: 'php',
127
155
  config: {
128
156
  version: '7.4',
129
- supported: ['8.4', '8.3', '8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3'],
157
+ supported: ['8.5', '8.4', '8.3', '8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3'],
130
158
  legacy: ['7.2', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3'],
131
159
  gen2: ['5.5', '5.4', '5.3'],
132
160
  path: [
@@ -163,8 +191,9 @@ module.exports = {
163
191
  },
164
192
  scriptsDir: path.resolve(__dirname, '..', 'scripts'),
165
193
  sources: [],
166
- suffix: '5',
194
+ suffix: '7',
167
195
  ssl: false,
196
+ db_client: 'auto',
168
197
  via: 'apache',
169
198
  volumes: ['/usr/local/bin'],
170
199
  webroot: '.',
@@ -231,12 +260,17 @@ module.exports = {
231
260
  addBuildStep(commands, options._app, options.name, 'build_internal');
232
261
  }
233
262
 
234
- // Install the desired composer version as the first `build_internal` build step
263
+ // Install the desired composer version as a `build_as_root_internal` step so it runs
264
+ // before user build steps — prevents composer from being missing if build_as_root fails
235
265
  if (options.composer_version) {
236
266
  debug('Installing composer version %s', options.composer_version);
237
267
  const commands = [`/etc/lando/service/helpers/install-composer.sh ${options.composer_version}`];
238
- const firstStep = true;
239
- addBuildStep(commands, options._app, options.name, 'build_internal', firstStep);
268
+ addBuildStep(commands, options._app, options.name, 'build_as_root_internal');
269
+ }
270
+
271
+ const dbClient = detectDatabaseClient(options, debug);
272
+ if (dbClient && phpSemver && semver.gte(phpSemver, '8.3.0')) {
273
+ addBuildStep([`/etc/lando/service/helpers/install-db-client.sh ${dbClient}`], options._app, options.name, 'build_as_root_internal');
240
274
  }
241
275
 
242
276
  // Add in nginx if we need to
@@ -1,15 +1,20 @@
1
- # docker build -t devwithlando/php:5.6-apache-5 .
1
+ # docker build -t devwithlando/php:5.6-apache-7 .
2
2
 
3
3
  FROM php:5.6-apache-stretch
4
4
 
5
- # Install dependencies we need
5
+ # Debian Stretch has archived repositories and expired keys
6
6
  RUN \
7
7
  sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \
8
8
  && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \
9
9
  && sed -i '/stretch-updates/d' /etc/apt/sources.list \
10
10
  && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \
11
- && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
12
- && apt -y update && apt-get install -y \
11
+ && apt-get -qq update -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true -o APT::Get::AllowUnauthenticated=true \
12
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests -o APT::Get::AllowUnauthenticated=true debian-archive-keyring
13
+
14
+ # Install dependencies
15
+ RUN \
16
+ mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
17
+ && apt-get update && apt-get install -y \
13
18
  gnupg2 \
14
19
  wget \
15
20
  bzip2 \
@@ -1,15 +1,20 @@
1
- # docker build -t devwithlando/php:5.6-fpm-5 .
1
+ # docker build -t devwithlando/php:5.6-fpm-7 .
2
2
 
3
3
  FROM php:5.6-fpm-stretch
4
4
 
5
- # Install dependencies we need
5
+ # Debian Stretch has archived repositories and expired keys
6
6
  RUN \
7
7
  sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \
8
8
  && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \
9
9
  && sed -i '/stretch-updates/d' /etc/apt/sources.list \
10
10
  && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \
11
- && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
12
- && apt -y update && apt-get install -y \
11
+ && apt-get -qq update -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true -o APT::Get::AllowUnauthenticated=true \
12
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests -o APT::Get::AllowUnauthenticated=true debian-archive-keyring
13
+
14
+ # Install dependencies
15
+ RUN \
16
+ mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
17
+ && apt-get update && apt-get install -y \
13
18
  gnupg2 \
14
19
  wget \
15
20
  bzip2 \
@@ -1,15 +1,20 @@
1
- # docker build -t devwithlando/php:7.0-apache-5 .
1
+ # docker build -t devwithlando/php:7.0-apache-7 .
2
2
 
3
3
  FROM php:7.0-apache-stretch
4
4
 
5
- # Install dependencies we need
5
+ # Debian Stretch has archived repositories and expired keys
6
6
  RUN \
7
7
  sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \
8
8
  && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \
9
9
  && sed -i '/stretch-updates/d' /etc/apt/sources.list \
10
10
  && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \
11
- && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
12
- && apt -y update && apt-get install -y \
11
+ && apt-get -qq update -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true -o APT::Get::AllowUnauthenticated=true \
12
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests -o APT::Get::AllowUnauthenticated=true debian-archive-keyring
13
+
14
+ # Install dependencies
15
+ RUN \
16
+ mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
17
+ && apt-get update && apt-get install -y \
13
18
  gnupg2 \
14
19
  wget \
15
20
  bzip2 \
@@ -1,15 +1,20 @@
1
- # docker build -t devwithlando/php:7.0-fpm-5 .
1
+ # docker build -t devwithlando/php:7.0-fpm-7 .
2
2
 
3
3
  FROM php:7.0-fpm-stretch
4
4
 
5
- # Install dependencies we need
5
+ # Debian Stretch has archived repositories and expired keys
6
6
  RUN \
7
7
  sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \
8
8
  && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \
9
9
  && sed -i '/stretch-updates/d' /etc/apt/sources.list \
10
10
  && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \
11
- && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
12
- && apt -y update && apt-get install -y \
11
+ && apt-get -qq update -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true -o APT::Get::AllowUnauthenticated=true \
12
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests -o APT::Get::AllowUnauthenticated=true debian-archive-keyring
13
+
14
+ # Install dependencies
15
+ RUN \
16
+ mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
17
+ && apt-get update && apt-get install -y \
13
18
  gnupg2 \
14
19
  wget \
15
20
  bzip2 \
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:7.1-apache-5 .
1
+ # docker build -t devwithlando/php:7.1-apache-7 .
2
2
 
3
3
  FROM php:7.1-apache-buster
4
4
 
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:7.1-fpm-5 .
1
+ # docker build -t devwithlando/php:7.1-fpm-7 .
2
2
 
3
3
  FROM php:7.1-fpm-buster
4
4
 
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:7.2-apache-5 .
1
+ # docker build -t devwithlando/php:7.2-apache-7 .
2
2
 
3
3
  FROM php:7.2-apache-buster
4
4
 
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:7.2-fpm-5 .
1
+ # docker build -t devwithlando/php:7.2-fpm-7 .
2
2
 
3
3
  FROM php:7.2-fpm-buster
4
4
 
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:7.3-apache-5 .
1
+ # docker build -t devwithlando/php:7.3-apache-7 .
2
2
 
3
3
  FROM php:7.3-apache-bullseye
4
4
 
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:7.3-fpm-5 .
1
+ # docker build -t devwithlando/php:7.3-fpm-7 .
2
2
 
3
3
  FROM php:7.3-fpm-bullseye
4
4
 
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:7.4-apache-5 .
1
+ # docker build -t devwithlando/php:7.4-apache-7 .
2
2
 
3
3
  FROM php:7.4-apache-bullseye
4
4
 
@@ -8,7 +8,7 @@ RUN \
8
8
  # MariaDB client compatibility (https://github.com/lando/php/issues/120)
9
9
  mkdir -p /etc/apt/keyrings \
10
10
  && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \
11
- && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list
11
+ && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://archive.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list
12
12
 
13
13
  RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
14
14
  && apt -y update && apt-get install -y \
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:7.4-fpm-5 .
1
+ # docker build -t devwithlando/php:7.4-fpm-7 .
2
2
 
3
3
  FROM php:7.4-fpm-bullseye
4
4
 
@@ -8,7 +8,7 @@ RUN \
8
8
  # MariaDB client compatibility (https://github.com/lando/php/issues/120)
9
9
  mkdir -p /etc/apt/keyrings \
10
10
  && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \
11
- && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list
11
+ && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://archive.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list
12
12
 
13
13
  RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
14
14
  && apt -y update && apt-get install -y \
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:8.0-apache-5 .
1
+ # docker build -t devwithlando/php:8.0-apache-7 .
2
2
 
3
3
  FROM php:8.0-apache-bullseye
4
4
 
@@ -8,7 +8,7 @@ RUN \
8
8
  # MariaDB client compatibility (https://github.com/lando/php/issues/120)
9
9
  mkdir -p /etc/apt/keyrings \
10
10
  && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \
11
- && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list
11
+ && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://archive.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list
12
12
 
13
13
  RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
14
14
  && apt -y update && apt-get install -y \
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:8.0-fpm-5 .
1
+ # docker build -t devwithlando/php:8.0-fpm-7 .
2
2
 
3
3
  FROM php:8.0-fpm-bullseye
4
4
 
@@ -8,7 +8,7 @@ RUN \
8
8
  # MariaDB client compatibility (https://github.com/lando/php/issues/120)
9
9
  mkdir -p /etc/apt/keyrings \
10
10
  && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \
11
- && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list
11
+ && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://archive.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list
12
12
 
13
13
  RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
14
14
  && apt -y update && apt-get install -y \
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:8.1-apache-5 .
1
+ # docker build -t devwithlando/php:8.1-apache-7 .
2
2
 
3
3
  FROM php:8.1-apache-bookworm
4
4
 
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:8.1-fpm-5 .
1
+ # docker build -t devwithlando/php:8.1-fpm-7 .
2
2
 
3
3
  FROM php:8.1-fpm-bookworm
4
4
 
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:8.2-apache-5 .
1
+ # docker build -t devwithlando/php:8.2-apache-7 .
2
2
 
3
3
  FROM php:8.2-apache-bookworm
4
4
 
@@ -1,4 +1,4 @@
1
- # docker build -t devwithlando/php:8.2-fpm-5 .
1
+ # docker build -t devwithlando/php:8.2-fpm-7 .
2
2
 
3
3
  FROM php:8.2-fpm-bookworm
4
4
 
@@ -1,41 +1,30 @@
1
- # docker build -t devwithlando/php:8.3-apache-5 .
1
+ # docker build -t devwithlando/php:8.3-apache-7 .
2
2
 
3
- FROM php:8.3-apache-bookworm
3
+ FROM mysql:8.0 AS mysql-client-80
4
+ FROM mysql:8.4 AS mysql-client-84
5
+
6
+ FROM php:8.3-apache-trixie
4
7
 
5
8
  ARG TARGETARCH
6
9
 
7
10
  ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
8
11
 
9
- RUN \
10
- # MariaDB client compatibility (https://github.com/lando/php/issues/120)
11
- mkdir -p /etc/apt/keyrings \
12
- && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \
13
- && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.11/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list
14
-
15
- # Drupal 11 requires sqlite3 3.45+
16
- ARG SQLITE_VERSION=3.45.1
17
- RUN \
18
- curl -Lo /tmp/sqlite3.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \
19
- && curl -Lo /tmp/libsqlite3-0.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \
20
- && curl -Lo /tmp/libsqlite3-dev.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-dev_${SQLITE_VERSION}-1_${TARGETARCH}.deb"
21
-
22
12
  RUN \
23
13
  mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
24
14
  && apt -y update && apt-get install -y \
25
15
  default-mysql-client \
26
- exiftool \
27
- git-core \
16
+ libimage-exiftool-perl \
17
+ git \
28
18
  gnupg2 \
29
19
  imagemagick \
30
- postgresql-client-15 \
20
+ mariadb-client \
21
+ mariadb-client-compat \
22
+ postgresql-client-17 \
31
23
  pv \
32
24
  rsync \
33
25
  ssh \
34
26
  unzip \
35
- wget \
36
- /tmp/sqlite3.deb \
37
- /tmp/libsqlite3-0.deb \
38
- /tmp/libsqlite3-dev.deb
27
+ wget
39
28
 
40
29
  RUN \
41
30
  install-php-extensions @fix_letsencrypt \
@@ -68,6 +57,14 @@ RUN \
68
57
  RUN install-php-extensions xdebug \
69
58
  && rm -f /usr/local/etc/php/conf.d/*xdebug.ini
70
59
 
60
+ # Pre-download MySQL client binaries for version-matched installs
61
+ COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql
62
+ COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump
63
+ COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin
64
+ COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql
65
+ COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump
66
+ COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin
67
+
71
68
  RUN \
72
69
  chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \
73
70
  && apt-get -y clean \
@@ -1,42 +1,30 @@
1
- # docker build -t devwithlando/php:8.3-fpm-5 .
1
+ # docker build -t devwithlando/php:8.3-fpm-7 .
2
2
 
3
- FROM php:8.3-fpm-bookworm
3
+ FROM mysql:8.0 AS mysql-client-80
4
+ FROM mysql:8.4 AS mysql-client-84
5
+
6
+ FROM php:8.3-fpm-trixie
4
7
 
5
8
  ARG TARGETARCH
6
9
 
7
10
  ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
8
11
 
9
- RUN \
10
- # MariaDB client compatibility (https://github.com/lando/php/issues/120)
11
- mkdir -p /etc/apt/keyrings \
12
- && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \
13
- && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.11/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list
14
-
15
- # Drupal 11 requires sqlite3 3.45+
16
- ARG SQLITE_VERSION=3.45.1
17
- RUN \
18
- curl -Lo /tmp/sqlite3.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \
19
- && curl -Lo /tmp/libsqlite3-0.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \
20
- && curl -Lo /tmp/libsqlite3-dev.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-dev_${SQLITE_VERSION}-1_${TARGETARCH}.deb"
21
-
22
12
  RUN \
23
13
  mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
24
14
  && apt -y update && apt-get install -y \
25
15
  default-mysql-client \
26
- exiftool \
27
- git-core \
16
+ libimage-exiftool-perl \
17
+ git \
28
18
  gnupg2 \
29
19
  imagemagick \
30
20
  mariadb-client \
31
- postgresql-client-15 \
21
+ mariadb-client-compat \
22
+ postgresql-client-17 \
32
23
  pv \
33
24
  rsync \
34
25
  ssh \
35
26
  unzip \
36
- wget \
37
- /tmp/sqlite3.deb \
38
- /tmp/libsqlite3-0.deb \
39
- /tmp/libsqlite3-dev.deb
27
+ wget
40
28
 
41
29
  RUN \
42
30
  install-php-extensions @fix_letsencrypt \
@@ -69,6 +57,14 @@ RUN \
69
57
  RUN install-php-extensions xdebug \
70
58
  && rm -f /usr/local/etc/php/conf.d/*xdebug.ini
71
59
 
60
+ # Pre-download MySQL client binaries for version-matched installs
61
+ COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql
62
+ COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump
63
+ COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin
64
+ COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql
65
+ COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump
66
+ COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin
67
+
72
68
  RUN \
73
69
  chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \
74
70
  && apt-get -y clean \
@@ -1,43 +1,30 @@
1
- # docker build -t devwithlando/php:8.4-apache-5 .
1
+ # docker build -t devwithlando/php:8.4-apache-7 .
2
2
 
3
- FROM php:8.4-apache-bookworm
3
+ FROM mysql:8.0 AS mysql-client-80
4
+ FROM mysql:8.4 AS mysql-client-84
5
+
6
+ FROM php:8.4-apache-trixie
4
7
 
5
8
  ARG TARGETARCH
6
9
 
7
10
  ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
8
11
 
9
- RUN \
10
- # MariaDB client compatibility (https://github.com/lando/php/issues/120)
11
- mkdir -p /etc/apt/keyrings \
12
- && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \
13
- && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/11.4/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list
14
-
15
- # Drupal 11 requires sqlite3 3.45+
16
- ARG SQLITE_VERSION=3.45.1
17
- RUN \
18
- curl -Lo /tmp/sqlite3.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \
19
- && curl -Lo /tmp/libsqlite3-0.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \
20
- && curl -Lo /tmp/libsqlite3-dev.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-dev_${SQLITE_VERSION}-1_${TARGETARCH}.deb"
21
-
22
12
  RUN \
23
13
  mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
24
14
  && apt -y update && apt-get install -y \
25
15
  default-mysql-client \
26
- exiftool \
27
- git-core \
16
+ libimage-exiftool-perl \
17
+ git \
28
18
  gnupg2 \
29
19
  imagemagick \
30
20
  mariadb-client \
31
21
  mariadb-client-compat \
32
- postgresql-client-15 \
22
+ postgresql-client-17 \
33
23
  pv \
34
24
  rsync \
35
25
  ssh \
36
26
  unzip \
37
- wget \
38
- /tmp/sqlite3.deb \
39
- /tmp/libsqlite3-0.deb \
40
- /tmp/libsqlite3-dev.deb
27
+ wget
41
28
 
42
29
  RUN \
43
30
  install-php-extensions @fix_letsencrypt \
@@ -70,6 +57,14 @@ RUN \
70
57
  RUN install-php-extensions xdebug \
71
58
  && rm -f /usr/local/etc/php/conf.d/*xdebug.ini
72
59
 
60
+ # Pre-download MySQL client binaries for version-matched installs
61
+ COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql
62
+ COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump
63
+ COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin
64
+ COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql
65
+ COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump
66
+ COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin
67
+
73
68
  RUN \
74
69
  chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \
75
70
  && apt-get -y clean \
@@ -1,44 +1,31 @@
1
- # docker build -t devwithlando/php:8.4-fpm-5 .
1
+ # docker build -t devwithlando/php:8.4-fpm-7 .
2
2
 
3
- FROM php:8.4-fpm-bookworm
3
+ FROM mysql:8.0 AS mysql-client-80
4
+ FROM mysql:8.4 AS mysql-client-84
5
+
6
+ FROM php:8.4-fpm-trixie
4
7
 
5
8
  ARG TARGETARCH
6
9
 
7
10
  ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
8
11
 
9
- RUN \
10
- # MariaDB client compatibility (https://github.com/lando/php/issues/120)
11
- mkdir -p /etc/apt/keyrings \
12
- && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \
13
- && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/11.4/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list
14
-
15
- # Drupal 11 requires sqlite3 3.45+
16
- ARG SQLITE_VERSION=3.45.1
17
- RUN \
18
- curl -Lo /tmp/sqlite3.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \
19
- && curl -Lo /tmp/libsqlite3-0.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \
20
- && curl -Lo /tmp/libsqlite3-dev.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-dev_${SQLITE_VERSION}-1_${TARGETARCH}.deb"
21
-
22
12
  RUN \
23
13
  mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
24
14
  && apt -y update && apt-get install -y \
25
15
  bzip2 \
26
16
  default-mysql-client \
27
- exiftool \
28
- git-core \
17
+ libimage-exiftool-perl \
18
+ git \
29
19
  gnupg2 \
30
20
  imagemagick \
31
21
  mariadb-client \
32
22
  mariadb-client-compat \
33
- postgresql-client-15 \
23
+ postgresql-client-17 \
34
24
  pv \
35
25
  rsync \
36
26
  ssh \
37
27
  unzip \
38
- wget \
39
- /tmp/sqlite3.deb \
40
- /tmp/libsqlite3-0.deb \
41
- /tmp/libsqlite3-dev.deb
28
+ wget
42
29
 
43
30
  RUN \
44
31
  install-php-extensions @fix_letsencrypt \
@@ -71,6 +58,14 @@ RUN \
71
58
  RUN install-php-extensions xdebug \
72
59
  && rm -f /usr/local/etc/php/conf.d/*xdebug.ini
73
60
 
61
+ # Pre-download MySQL client binaries for version-matched installs
62
+ COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql
63
+ COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump
64
+ COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin
65
+ COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql
66
+ COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump
67
+ COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin
68
+
74
69
  RUN \
75
70
  chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \
76
71
  && apt-get -y clean \
@@ -0,0 +1,73 @@
1
+ # docker buildx build -t devwithlando/php:8.5-apache-7 .
2
+
3
+ FROM mysql:8.0 AS mysql-client-80
4
+ FROM mysql:8.4 AS mysql-client-84
5
+
6
+ FROM php:8.5-apache-trixie
7
+
8
+ ARG TARGETARCH
9
+
10
+ ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
11
+
12
+ RUN \
13
+ mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
14
+ && apt -y update && apt-get install -y \
15
+ default-mysql-client \
16
+ libimage-exiftool-perl \
17
+ git \
18
+ gnupg2 \
19
+ imagemagick \
20
+ mariadb-client \
21
+ mariadb-client-compat \
22
+ postgresql-client-17 \
23
+ pv \
24
+ rsync \
25
+ ssh \
26
+ unzip \
27
+ wget
28
+
29
+ RUN \
30
+ install-php-extensions @fix_letsencrypt \
31
+ && install-php-extensions apcu \
32
+ && install-php-extensions bcmath \
33
+ && install-php-extensions bz2 \
34
+ && install-php-extensions calendar \
35
+ && install-php-extensions exif \
36
+ && install-php-extensions gd \
37
+ && install-php-extensions gettext \
38
+ && install-php-extensions imagick/imagick@master \
39
+ && install-php-extensions imap \
40
+ && install-php-extensions intl \
41
+ && install-php-extensions ldap \
42
+ && install-php-extensions mbstring \
43
+ && install-php-extensions memcached \
44
+ && install-php-extensions mysqli \
45
+ && install-php-extensions oauth \
46
+ && install-php-extensions opcache \
47
+ && install-php-extensions pcntl \
48
+ && install-php-extensions pdo \
49
+ && install-php-extensions pdo_mysql \
50
+ && install-php-extensions pdo_pgsql \
51
+ && install-php-extensions redis \
52
+ && install-php-extensions soap \
53
+ && install-php-extensions xhprof \
54
+ && install-php-extensions zip
55
+
56
+ # Install xdebug but disable it by default
57
+ RUN install-php-extensions xdebug/xdebug@master \
58
+ && rm -f /usr/local/etc/php/conf.d/*xdebug.ini
59
+
60
+ # Pre-download MySQL client binaries for version-matched installs
61
+ COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql
62
+ COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump
63
+ COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin
64
+ COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql
65
+ COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump
66
+ COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin
67
+
68
+ RUN \
69
+ chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \
70
+ && apt-get -y clean \
71
+ && apt-get -y autoclean \
72
+ && apt-get -y autoremove \
73
+ && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/*
@@ -0,0 +1,74 @@
1
+ # docker buildx build -t devwithlando/php:8.5-fpm-7 .
2
+
3
+ FROM mysql:8.0 AS mysql-client-80
4
+ FROM mysql:8.4 AS mysql-client-84
5
+
6
+ FROM php:8.5-fpm-trixie
7
+
8
+ ARG TARGETARCH
9
+
10
+ ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
11
+
12
+ RUN \
13
+ mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
14
+ && apt -y update && apt-get install -y \
15
+ bzip2 \
16
+ default-mysql-client \
17
+ libimage-exiftool-perl \
18
+ git \
19
+ gnupg2 \
20
+ imagemagick \
21
+ mariadb-client \
22
+ mariadb-client-compat \
23
+ postgresql-client-17 \
24
+ pv \
25
+ rsync \
26
+ ssh \
27
+ unzip \
28
+ wget
29
+
30
+ RUN \
31
+ install-php-extensions @fix_letsencrypt \
32
+ && install-php-extensions apcu \
33
+ && install-php-extensions bcmath \
34
+ && install-php-extensions bz2 \
35
+ && install-php-extensions calendar \
36
+ && install-php-extensions exif \
37
+ && install-php-extensions gd \
38
+ && install-php-extensions gettext \
39
+ && install-php-extensions imagick/imagick@master \
40
+ && install-php-extensions imap \
41
+ && install-php-extensions intl \
42
+ && install-php-extensions ldap \
43
+ && install-php-extensions mbstring \
44
+ && install-php-extensions memcached \
45
+ && install-php-extensions mysqli \
46
+ && install-php-extensions oauth \
47
+ && install-php-extensions opcache \
48
+ && install-php-extensions pcntl \
49
+ && install-php-extensions pdo \
50
+ && install-php-extensions pdo_mysql \
51
+ && install-php-extensions pdo_pgsql \
52
+ && install-php-extensions redis \
53
+ && install-php-extensions soap \
54
+ && install-php-extensions xhprof \
55
+ && install-php-extensions zip
56
+
57
+ # Install xdebug but disable it by default
58
+ RUN install-php-extensions xdebug/xdebug@master \
59
+ && rm -f /usr/local/etc/php/conf.d/*xdebug.ini
60
+
61
+ # Pre-download MySQL client binaries for version-matched installs
62
+ COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql
63
+ COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump
64
+ COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin
65
+ COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql
66
+ COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump
67
+ COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin
68
+
69
+ RUN \
70
+ chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \
71
+ && apt-get -y clean \
72
+ && apt-get -y autoclean \
73
+ && apt-get -y autoremove \
74
+ && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/*
package/netlify.toml CHANGED
@@ -10,7 +10,7 @@
10
10
  [[context.deploy-preview.plugins]]
11
11
  package = "netlify-plugin-checklinks"
12
12
  [context.deploy-preview.plugins.inputs]
13
- todoPatterns = [ "load", "CHANGELOG.html", "/v/", "x.com", "twitter.com", "www.php.net" ]
13
+ todoPatterns = [ "load", "CHANGELOG.html", "/v/", "x.com", "twitter.com", "www.php.net", "hub.docker.com" ]
14
14
  skipPatterns = [ ".rss", ".gif", ".jpg" ]
15
15
  checkExternal = true
16
16
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lando/php",
3
3
  "description": "A Lando plugin that provides a tight integration with PHP.",
4
- "version": "1.8.0",
4
+ "version": "1.10.0",
5
5
  "author": "Mike Pirog @pirog",
6
6
  "license": "MIT",
7
7
  "repository": "lando/php",
@@ -66,9 +66,9 @@
66
66
  "semver"
67
67
  ],
68
68
  "dist": {
69
- "integrity": "sha512-iacB+ZbgZlcZen5zwnsaHCluP9ZpE2hIKzFwQlzMWooXC39LeR5z1Kw6pt0BoC9a9dmmTVoYAMbf/vGwenuwBw==",
70
- "shasum": "a63245f0e3fc8a4af8ce2f62cb383af253787ffd",
71
- "filename": "lando-php-1.8.0.tgz",
72
- "unpackedSize": 3042655
69
+ "integrity": "sha512-KI1gTQPz98mOetlZpUMjzxZas/yF8quXdzY9QCV+Yqe2FKmG+8vFgvCViMeiRzevKVXAVpfRiXb5InH3gnyq/g==",
70
+ "shasum": "85545d2e4b9dc77cc8b771899b1fbdb2e4883c4e",
71
+ "filename": "lando-php-1.10.0.tgz",
72
+ "unpackedSize": 3057365
73
73
  }
74
74
  }
@@ -0,0 +1,31 @@
1
+ #!/bin/bash
2
+ # Install database client matching the detected database type/version
3
+ # Usage: install-db-client.sh <type>:<version>
4
+ # Examples:
5
+ # install-db-client.sh mysql:8.4
6
+ # install-db-client.sh mariadb:11.8
7
+
8
+ set -e
9
+
10
+ DB_CLIENT="${1:-}"
11
+ if [[ -z "$DB_CLIENT" ]]; then
12
+ echo "No database client specified, keeping defaults"
13
+ exit 0
14
+ fi
15
+
16
+ DB_TYPE="${DB_CLIENT%%:*}"
17
+ DB_VERSION="${DB_CLIENT##*:}"
18
+ SCRIPTS_DIR="$(dirname "$0")"
19
+
20
+ case "$DB_TYPE" in
21
+ mysql)
22
+ "$SCRIPTS_DIR/mysql-client-install.sh" "$DB_VERSION"
23
+ ;;
24
+ mariadb)
25
+ "$SCRIPTS_DIR/mariadb-compat-install.sh"
26
+ ;;
27
+ *)
28
+ echo "Unknown database type: $DB_TYPE"
29
+ exit 1
30
+ ;;
31
+ esac
@@ -0,0 +1,42 @@
1
+ #!/bin/bash
2
+ # Usage: mariadb-compat-install.sh
3
+ # Creates wrapper scripts to map deprecated mysql commands to mariadb equivalents
4
+ # The mariadb-client package is already installed in the base image
5
+
6
+ set -e
7
+
8
+ echo "Installing MariaDB compatibility wrappers..."
9
+
10
+ # Create wrapper scripts for each mysql* command that maps to mariadb* equivalent
11
+ for cmd in mysql mysqldump mysqladmin mysqlcheck mysqlimport mysqlshow; do
12
+ suffix="${cmd#mysql}"
13
+ mariadb_cmd="mariadb${suffix:+-}${suffix}"
14
+
15
+ if command -v "$mariadb_cmd" &> /dev/null; then
16
+ cat > "/usr/local/bin/$cmd" << EOF
17
+ #!/bin/bash
18
+ exec -a "\$0" $mariadb_cmd "\$@"
19
+ EOF
20
+ chmod +x "/usr/local/bin/$cmd"
21
+ echo " Created wrapper: $cmd -> $mariadb_cmd"
22
+ fi
23
+ done
24
+
25
+ # Create config directory if it doesn't exist
26
+ mkdir -p /etc/mysql/conf.d
27
+
28
+ # Create MySQL client config with compatibility settings
29
+ cat > /etc/mysql/conf.d/lando.cnf << 'MYCNF'
30
+ [client]
31
+ default-character-set=utf8mb4
32
+
33
+ [client-mariadb]
34
+ # Prevent SSL errors when connecting to servers without SSL
35
+ disable-ssl-verify-server-cert
36
+
37
+ [mysqldump]
38
+ # Prevent column-statistics errors with newer mysqldump
39
+ skip-column-statistics
40
+ MYCNF
41
+
42
+ echo "MariaDB compatibility wrappers installed"
@@ -0,0 +1,59 @@
1
+ #!/bin/bash
2
+ # Install MySQL client from pre-downloaded binaries
3
+ # Usage: mysql-client-install.sh <version>
4
+ # Examples: mysql-client-install.sh 8.4, mysql-client-install.sh 8.0
5
+
6
+ set -e
7
+
8
+ VERSION="${1:-8.4}"
9
+
10
+ echo "Installing MySQL $VERSION client..."
11
+
12
+ # Map version to the closest available pre-downloaded version
13
+ # We have 8.0 and 8.4 available
14
+ case "$VERSION" in
15
+ 8.4*|8.3*)
16
+ CLIENT_VERSION="8.4"
17
+ ;;
18
+ 8.0*|8.1*|8.2*|5.7*)
19
+ CLIENT_VERSION="8.0"
20
+ ;;
21
+ *)
22
+ # Default to 8.4 for unknown versions
23
+ CLIENT_VERSION="8.4"
24
+ echo "Warning: Unknown MySQL version $VERSION, using $CLIENT_VERSION client"
25
+ ;;
26
+ esac
27
+
28
+ CLIENT_DIR="/usr/local/mysql-client/$CLIENT_VERSION"
29
+
30
+ if [ -d "$CLIENT_DIR" ]; then
31
+ # Remove MariaDB client symlinks if they exist in /usr/local/bin
32
+ rm -f /usr/local/bin/mysql /usr/local/bin/mysqldump /usr/local/bin/mysqladmin 2>/dev/null || true
33
+
34
+ # Create symlinks to the pre-downloaded MySQL client
35
+ ln -sf "$CLIENT_DIR/mysql" /usr/local/bin/mysql
36
+ ln -sf "$CLIENT_DIR/mysqldump" /usr/local/bin/mysqldump
37
+ ln -sf "$CLIENT_DIR/mysqladmin" /usr/local/bin/mysqladmin
38
+
39
+ echo "MySQL $CLIENT_VERSION client activated from pre-downloaded binaries"
40
+ else
41
+ echo "Warning: Pre-downloaded MySQL client not found at $CLIENT_DIR"
42
+ echo "Keeping default mariadb-client"
43
+ exit 0
44
+ fi
45
+
46
+ # Create config directory if it doesn't exist
47
+ mkdir -p /etc/mysql/conf.d
48
+
49
+ # Create MySQL client config with compatibility settings
50
+ cat > /etc/mysql/conf.d/lando.cnf << 'MYCNF'
51
+ [client]
52
+ default-character-set=utf8mb4
53
+
54
+ [mysqldump]
55
+ # Prevent column-statistics errors with newer mysqldump
56
+ skip-column-statistics
57
+ MYCNF
58
+
59
+ mysql --version 2>/dev/null || echo "Warning: MySQL client not available"