@lando/php
Advanced tools
+81
| # PROJECT KNOWLEDGE BASE | ||
| **Generated:** 2026-01-09 | ||
| **Commit:** 355c304 | ||
| **Branch:** main | ||
| ## OVERVIEW | ||
| Lando PHP plugin - provides PHP services (5.3-8.5) via nginx/apache/cli with composer, xdebug support. Part of @lando ecosystem. | ||
| ## STRUCTURE | ||
| ``` | ||
| lando--php/ | ||
| ├── builders/ # Service builders (php.js = main logic) | ||
| ├── config/ # PHP/nginx config templates | ||
| ├── utils/ # Helper functions | ||
| ├── examples/ # Version-specific test fixtures (php-*) | ||
| ├── test/ # Unit tests (placeholder) | ||
| ├── docs/ # Project documentation markdown files and associated Vitepress site | ||
| ├── scripts/ # Helper scripts for build/install/etc | ||
| └── images/ # Docker image definitions for various PHP versions | ||
| ``` | ||
| ## WHERE TO LOOK | ||
| | Task | Location | Notes | | ||
| |------|----------|-------| | ||
| | PHP version logic | `builders/php.js` | LandoPhp class, version detection | | ||
| | Nginx wrapper | `builders/php-nginx.js` | Extends @lando/nginx | | ||
| | Composer install | `builders/php.js:getDefaultComposerVersion()` | Version auto-detection | | ||
| | Xdebug config | `builders/php.js:xdebugConfig()` | Per-version handling | | ||
| | PHP config templates | `config/*.conf.tpl` | EJS templates | | ||
| | Add CLI/build steps | `utils/add-build-step.js` | Front/back insertion | | ||
| | Install command gen | `utils/get-install-commands.js` | Package manager abstraction | | ||
| ## CODE MAP | ||
| | Symbol | Type | Location | Role | | ||
| |--------|------|----------|------| | ||
| | `LandoPhp` | class | builders/php.js:18 | Main service builder | | ||
| | `getDefaultComposerVersion` | fn | builders/php.js | Composer version detection | | ||
| | `nginxConfig` | fn | builders/php.js | Nginx service config | | ||
| | `xdebugConfig` | fn | builders/php.js | Xdebug version handling | | ||
| | `parseApache/Cli/Nginx` | fns | builders/php.js | Via-specific parsing | | ||
| | `addBuildStep` | fn | utils/add-build-step.js | Build step insertion | | ||
| | `getInstallCommands` | fn | utils/get-install-commands.js | Install command gen | | ||
| | `cloneOverrides` | fn | utils/clone-overrides.js | Deep clone sans image/build | | ||
| ## CONVENTIONS | ||
| - **ESLint**: Google style, max-len 140, JSDoc required for functions | ||
| - **Images**: `devwithlando/php:{version}-{via}` format | ||
| - **Versions**: Supported 5.3-8.5, legacy removed at 8.x | ||
| - **Via options**: apache (default), nginx, cli | ||
| - **Composer**: v1 for PHP <7.2, v2 otherwise | ||
| ## ANTI-PATTERNS | ||
| - Don't modify `index.js` - intentionally empty placeholder | ||
| - Don't add dependencies without checking @lando/nginx compatibility | ||
| - examples/* are test fixtures - structured identically per version | ||
| ## COMMANDS | ||
| ```bash | ||
| # Development | ||
| npm run lint # ESLint check | ||
| npm run test:unit # Mocha unit tests | ||
| npm run test:leia # Leia integration tests | ||
| # Coverage | ||
| nyc covers: lib/, recipes/, services/, types/ | ||
| ``` | ||
| ## NOTES | ||
| - `plugin.yml` has `legacy: true` for Lando v3 compatibility | ||
| - Root `.lando.yml` is for docs site (vitepress), not plugin testing | ||
| - Test file `test/auth.spec.js` is placeholder ("should have tests") | ||
| - PHP config uses EJS templates (`.conf.tpl` extension) |
| #!/bin/bash | ||
| # Install database client matching the detected database type/version | ||
| # Usage: install-db-client.sh <type>:<version> | ||
| # Examples: | ||
| # install-db-client.sh mysql:8.4 | ||
| # install-db-client.sh mariadb:11.8 | ||
| set -e | ||
| DB_CLIENT="${1:-}" | ||
| if [[ -z "$DB_CLIENT" ]]; then | ||
| echo "No database client specified, keeping defaults" | ||
| exit 0 | ||
| fi | ||
| DB_TYPE="${DB_CLIENT%%:*}" | ||
| DB_VERSION="${DB_CLIENT##*:}" | ||
| SCRIPTS_DIR="$(dirname "$0")" | ||
| case "$DB_TYPE" in | ||
| mysql) | ||
| "$SCRIPTS_DIR/mysql-client-install.sh" "$DB_VERSION" | ||
| ;; | ||
| mariadb) | ||
| "$SCRIPTS_DIR/mariadb-compat-install.sh" | ||
| ;; | ||
| *) | ||
| echo "Unknown database type: $DB_TYPE" | ||
| exit 1 | ||
| ;; | ||
| esac |
| #!/bin/bash | ||
| # Usage: mariadb-compat-install.sh | ||
| # Creates wrapper scripts to map deprecated mysql commands to mariadb equivalents | ||
| # The mariadb-client package is already installed in the base image | ||
| set -e | ||
| echo "Installing MariaDB compatibility wrappers..." | ||
| # Create wrapper scripts for each mysql* command that maps to mariadb* equivalent | ||
| for cmd in mysql mysqldump mysqladmin mysqlcheck mysqlimport mysqlshow; do | ||
| suffix="${cmd#mysql}" | ||
| mariadb_cmd="mariadb${suffix:+-}${suffix}" | ||
| if command -v "$mariadb_cmd" &> /dev/null; then | ||
| cat > "/usr/local/bin/$cmd" << EOF | ||
| #!/bin/bash | ||
| exec -a "\$0" $mariadb_cmd "\$@" | ||
| EOF | ||
| chmod +x "/usr/local/bin/$cmd" | ||
| echo " Created wrapper: $cmd -> $mariadb_cmd" | ||
| fi | ||
| done | ||
| # Create config directory if it doesn't exist | ||
| mkdir -p /etc/mysql/conf.d | ||
| # Create MySQL client config with compatibility settings | ||
| cat > /etc/mysql/conf.d/lando.cnf << 'MYCNF' | ||
| [client] | ||
| default-character-set=utf8mb4 | ||
| [client-mariadb] | ||
| # Prevent SSL errors when connecting to servers without SSL | ||
| disable-ssl-verify-server-cert | ||
| [mysqldump] | ||
| # Prevent column-statistics errors with newer mysqldump | ||
| skip-column-statistics | ||
| MYCNF | ||
| echo "MariaDB compatibility wrappers installed" |
| #!/bin/bash | ||
| # Install MySQL client from pre-downloaded binaries | ||
| # Usage: mysql-client-install.sh <version> | ||
| # Examples: mysql-client-install.sh 8.4, mysql-client-install.sh 8.0 | ||
| set -e | ||
| VERSION="${1:-8.4}" | ||
| echo "Installing MySQL $VERSION client..." | ||
| # Map version to the closest available pre-downloaded version | ||
| # We have 8.0 and 8.4 available | ||
| case "$VERSION" in | ||
| 8.4*|8.3*) | ||
| CLIENT_VERSION="8.4" | ||
| ;; | ||
| 8.0*|8.1*|8.2*|5.7*) | ||
| CLIENT_VERSION="8.0" | ||
| ;; | ||
| *) | ||
| # Default to 8.4 for unknown versions | ||
| CLIENT_VERSION="8.4" | ||
| echo "Warning: Unknown MySQL version $VERSION, using $CLIENT_VERSION client" | ||
| ;; | ||
| esac | ||
| CLIENT_DIR="/usr/local/mysql-client/$CLIENT_VERSION" | ||
| if [ -d "$CLIENT_DIR" ]; then | ||
| # Remove MariaDB client symlinks if they exist in /usr/local/bin | ||
| rm -f /usr/local/bin/mysql /usr/local/bin/mysqldump /usr/local/bin/mysqladmin 2>/dev/null || true | ||
| # Create symlinks to the pre-downloaded MySQL client | ||
| ln -sf "$CLIENT_DIR/mysql" /usr/local/bin/mysql | ||
| ln -sf "$CLIENT_DIR/mysqldump" /usr/local/bin/mysqldump | ||
| ln -sf "$CLIENT_DIR/mysqladmin" /usr/local/bin/mysqladmin | ||
| echo "MySQL $CLIENT_VERSION client activated from pre-downloaded binaries" | ||
| else | ||
| echo "Warning: Pre-downloaded MySQL client not found at $CLIENT_DIR" | ||
| echo "Keeping default mariadb-client" | ||
| exit 0 | ||
| fi | ||
| # Create config directory if it doesn't exist | ||
| mkdir -p /etc/mysql/conf.d | ||
| # Create MySQL client config with compatibility settings | ||
| cat > /etc/mysql/conf.d/lando.cnf << 'MYCNF' | ||
| [client] | ||
| default-character-set=utf8mb4 | ||
| [mysqldump] | ||
| # Prevent column-statistics errors with newer mysqldump | ||
| skip-column-statistics | ||
| MYCNF | ||
| mysql --version 2>/dev/null || echo "Warning: MySQL client not available" |
+38
-4
@@ -61,2 +61,30 @@ 'use strict'; | ||
| const detectDatabaseClient = (options, debug = () => {}) => { | ||
| if (options.db_client === false) return null; | ||
| if (options.db_client && options.db_client !== 'auto') return options.db_client; | ||
| const services = options._app?.config?.services || {}; | ||
| let mysqlVersion = null; | ||
| let mariaVersion = null; | ||
| for (const service of Object.values(services)) { | ||
| const type = service?.type || ''; | ||
| // Match mysql:X, mysql:X.Y, or mysql:X.Y.Z formats | ||
| const mysqlMatch = type.match(/^mysql:(\d+(?:\.\d+)?)/); | ||
| if (mysqlMatch && !mysqlVersion) mysqlVersion = mysqlMatch[1]; | ||
| // Match mariadb:X, mariadb:X.Y, or mariadb:X.Y.Z formats | ||
| const mariaMatch = type.match(/^mariadb:(\d+(?:\.\d+)?)/); | ||
| if (mariaMatch && !mariaVersion) mariaVersion = mariaMatch[1]; | ||
| } | ||
| if (mariaVersion && mysqlVersion) { | ||
| debug('Both MariaDB (%s) and MySQL (%s) detected; using MariaDB. Set db_client to override.', | ||
| mariaVersion, mysqlVersion); | ||
| } | ||
| if (mariaVersion) return `mariadb:${mariaVersion}`; | ||
| if (mysqlVersion) return `mysql:${mysqlVersion}`; | ||
| return null; | ||
| }; | ||
| /** | ||
@@ -167,4 +195,5 @@ * Helper function to build a package string by combining package name and version | ||
| sources: [], | ||
| suffix: '6', | ||
| suffix: '7', | ||
| ssl: false, | ||
| db_client: 'auto', | ||
| via: 'apache', | ||
@@ -236,10 +265,15 @@ volumes: ['/usr/local/bin'], | ||
| // Install the desired composer version as the first `build_internal` build step | ||
| // Install the desired composer version as a `build_as_root_internal` step so it runs | ||
| // before user build steps — prevents composer from being missing if build_as_root fails | ||
| if (options.composer_version) { | ||
| debug('Installing composer version %s', options.composer_version); | ||
| const commands = [`/etc/lando/service/helpers/install-composer.sh ${options.composer_version}`]; | ||
| const firstStep = true; | ||
| addBuildStep(commands, options._app, options.name, 'build_internal', firstStep); | ||
| addBuildStep(commands, options._app, options.name, 'build_as_root_internal'); | ||
| } | ||
| const dbClient = detectDatabaseClient(options, debug); | ||
| if (dbClient && phpSemver && semver.gte(phpSemver, '8.3.0')) { | ||
| addBuildStep([`/etc/lando/service/helpers/install-db-client.sh ${dbClient}`], options._app, options.name, 'build_as_root_internal'); | ||
| } | ||
| // Add in nginx if we need to | ||
@@ -246,0 +280,0 @@ if (_.startsWith(options.via, 'nginx')) { |
+14
-0
| ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) | ||
| ## v1.10.0 - [February 18, 2026](https://github.com/lando/php/releases/tag/v1.10.0) | ||
| * Added database client auto-detection and version matching [#212](https://github.com/lando/php/pull/212) | ||
| * Added Docker image build status badge to README | ||
| * Added GD AVIF support verification for PHP 8.3+ [#219](https://github.com/lando/php/pull/219) | ||
| * Fixed composer install ordering to run before user build steps | ||
| * Fixed MariaDB wrapper script command names and test auto-detection [#212](https://github.com/lando/php/pull/212) | ||
| * Fixed typo in documentation | ||
| * Updated Docker image base version to Debian 13 | ||
| * Updated Docker image tags from -6 to -7 | ||
| * Updated Node.js 14.x to 20.x in test examples [#215](https://github.com/lando/php/pull/215) | ||
| * Updated `actions/cache` from 4 to 5 | ||
| * Updated `actions/checkout` from 4 to 6 | ||
| ## v1.9.0 - [December 5, 2025](https://github.com/lando/php/releases/tag/v1.9.0) | ||
@@ -4,0 +18,0 @@ |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:5.6-apache-6 . | ||
| # docker build -t devwithlando/php:5.6-apache-7 . | ||
@@ -3,0 +3,0 @@ FROM php:5.6-apache-stretch |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:5.6-fpm-6 . | ||
| # docker build -t devwithlando/php:5.6-fpm-7 . | ||
@@ -3,0 +3,0 @@ FROM php:5.6-fpm-stretch |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.0-apache-6 . | ||
| # docker build -t devwithlando/php:7.0-apache-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.0-apache-stretch |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.0-fpm-6 . | ||
| # docker build -t devwithlando/php:7.0-fpm-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.0-fpm-stretch |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.1-apache-6 . | ||
| # docker build -t devwithlando/php:7.1-apache-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.1-apache-buster |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.1-fpm-6 . | ||
| # docker build -t devwithlando/php:7.1-fpm-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.1-fpm-buster |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.2-apache-6 . | ||
| # docker build -t devwithlando/php:7.2-apache-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.2-apache-buster |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.2-fpm-6 . | ||
| # docker build -t devwithlando/php:7.2-fpm-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.2-fpm-buster |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.3-apache-6 . | ||
| # docker build -t devwithlando/php:7.3-apache-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.3-apache-bullseye |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.3-fpm-6 . | ||
| # docker build -t devwithlando/php:7.3-fpm-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.3-fpm-bullseye |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.4-apache-6 . | ||
| # docker build -t devwithlando/php:7.4-apache-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.4-apache-bullseye |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:7.4-fpm-6 . | ||
| # docker build -t devwithlando/php:7.4-fpm-7 . | ||
@@ -3,0 +3,0 @@ FROM php:7.4-fpm-bullseye |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:8.0-apache-6 . | ||
| # docker build -t devwithlando/php:8.0-apache-7 . | ||
@@ -3,0 +3,0 @@ FROM php:8.0-apache-bullseye |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:8.0-fpm-6 . | ||
| # docker build -t devwithlando/php:8.0-fpm-7 . | ||
@@ -3,0 +3,0 @@ FROM php:8.0-fpm-bullseye |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:8.1-apache-6 . | ||
| # docker build -t devwithlando/php:8.1-apache-7 . | ||
@@ -3,0 +3,0 @@ FROM php:8.1-apache-bookworm |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:8.1-fpm-6 . | ||
| # docker build -t devwithlando/php:8.1-fpm-7 . | ||
@@ -3,0 +3,0 @@ FROM php:8.1-fpm-bookworm |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:8.2-apache-6 . | ||
| # docker build -t devwithlando/php:8.2-apache-7 . | ||
@@ -3,0 +3,0 @@ FROM php:8.2-apache-bookworm |
@@ -1,2 +0,2 @@ | ||
| # docker build -t devwithlando/php:8.2-fpm-6 . | ||
| # docker build -t devwithlando/php:8.2-fpm-7 . | ||
@@ -3,0 +3,0 @@ FROM php:8.2-fpm-bookworm |
@@ -1,3 +0,6 @@ | ||
| # docker build -t devwithlando/php:8.3-apache-6 . | ||
| # docker build -t devwithlando/php:8.3-apache-7 . | ||
| FROM mysql:8.0 AS mysql-client-80 | ||
| FROM mysql:8.4 AS mysql-client-84 | ||
| FROM php:8.3-apache-trixie | ||
@@ -57,2 +60,10 @@ | ||
| # Pre-download MySQL client binaries for version-matched installs | ||
| COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql | ||
| COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump | ||
| COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin | ||
| COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql | ||
| COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump | ||
| COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin | ||
| RUN \ | ||
@@ -59,0 +70,0 @@ chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ |
@@ -1,3 +0,6 @@ | ||
| # docker build -t devwithlando/php:8.3-fpm-6 . | ||
| # docker build -t devwithlando/php:8.3-fpm-7 . | ||
| FROM mysql:8.0 AS mysql-client-80 | ||
| FROM mysql:8.4 AS mysql-client-84 | ||
| FROM php:8.3-fpm-trixie | ||
@@ -57,2 +60,10 @@ | ||
| # Pre-download MySQL client binaries for version-matched installs | ||
| COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql | ||
| COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump | ||
| COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin | ||
| COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql | ||
| COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump | ||
| COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin | ||
| RUN \ | ||
@@ -59,0 +70,0 @@ chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ |
@@ -1,3 +0,6 @@ | ||
| # docker build -t devwithlando/php:8.4-apache-6 . | ||
| # docker build -t devwithlando/php:8.4-apache-7 . | ||
| FROM mysql:8.0 AS mysql-client-80 | ||
| FROM mysql:8.4 AS mysql-client-84 | ||
| FROM php:8.4-apache-trixie | ||
@@ -57,2 +60,10 @@ | ||
| # Pre-download MySQL client binaries for version-matched installs | ||
| COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql | ||
| COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump | ||
| COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin | ||
| COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql | ||
| COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump | ||
| COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin | ||
| RUN \ | ||
@@ -59,0 +70,0 @@ chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ |
@@ -1,3 +0,6 @@ | ||
| # docker build -t devwithlando/php:8.4-fpm-6 . | ||
| # docker build -t devwithlando/php:8.4-fpm-7 . | ||
| FROM mysql:8.0 AS mysql-client-80 | ||
| FROM mysql:8.4 AS mysql-client-84 | ||
| FROM php:8.4-fpm-trixie | ||
@@ -58,2 +61,10 @@ | ||
| # Pre-download MySQL client binaries for version-matched installs | ||
| COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql | ||
| COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump | ||
| COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin | ||
| COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql | ||
| COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump | ||
| COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin | ||
| RUN \ | ||
@@ -60,0 +71,0 @@ chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ |
@@ -1,3 +0,6 @@ | ||
| # docker buildx build -t devwithlando/php:8.5-apache-6 . | ||
| # docker buildx build -t devwithlando/php:8.5-apache-7 . | ||
| FROM mysql:8.0 AS mysql-client-80 | ||
| FROM mysql:8.4 AS mysql-client-84 | ||
| FROM php:8.5-apache-trixie | ||
@@ -57,2 +60,10 @@ | ||
| # Pre-download MySQL client binaries for version-matched installs | ||
| COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql | ||
| COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump | ||
| COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin | ||
| COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql | ||
| COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump | ||
| COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin | ||
| RUN \ | ||
@@ -59,0 +70,0 @@ chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ |
@@ -1,3 +0,6 @@ | ||
| # docker buildx build -t devwithlando/php:8.5-fpm-6 . | ||
| # docker buildx build -t devwithlando/php:8.5-fpm-7 . | ||
| FROM mysql:8.0 AS mysql-client-80 | ||
| FROM mysql:8.4 AS mysql-client-84 | ||
| FROM php:8.5-fpm-trixie | ||
@@ -58,2 +61,10 @@ | ||
| # Pre-download MySQL client binaries for version-matched installs | ||
| COPY --from=mysql-client-80 /usr/bin/mysql /usr/local/mysql-client/8.0/mysql | ||
| COPY --from=mysql-client-80 /usr/bin/mysqldump /usr/local/mysql-client/8.0/mysqldump | ||
| COPY --from=mysql-client-80 /usr/bin/mysqladmin /usr/local/mysql-client/8.0/mysqladmin | ||
| COPY --from=mysql-client-84 /usr/bin/mysql /usr/local/mysql-client/8.4/mysql | ||
| COPY --from=mysql-client-84 /usr/bin/mysqldump /usr/local/mysql-client/8.4/mysqldump | ||
| COPY --from=mysql-client-84 /usr/bin/mysqladmin /usr/local/mysql-client/8.4/mysqladmin | ||
| RUN \ | ||
@@ -60,0 +71,0 @@ chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ |
+5
-5
| { | ||
| "name": "@lando/php", | ||
| "description": "A Lando plugin that provides a tight integration with PHP.", | ||
| "version": "1.9.0", | ||
| "version": "1.10.0", | ||
| "author": "Mike Pirog @pirog", | ||
@@ -69,7 +69,7 @@ "license": "MIT", | ||
| "dist": { | ||
| "integrity": "sha512-rVVcfFfqh6pLhya7NOOxI22M3OwadUGbJ30KUv5HfQy7UfcNrhQ0SrvAYsPvL5l5Lt9jSxqrzJN9TotYyOLecQ==", | ||
| "shasum": "20621106d351773689ba1a2cd86d307be2734f8e", | ||
| "filename": "lando-php-1.9.0.tgz", | ||
| "unpackedSize": 3044415 | ||
| "integrity": "sha512-KI1gTQPz98mOetlZpUMjzxZas/yF8quXdzY9QCV+Yqe2FKmG+8vFgvCViMeiRzevKVXAVpfRiXb5InH3gnyq/g==", | ||
| "shasum": "85545d2e4b9dc77cc8b771899b1fbdb2e4883c4e", | ||
| "filename": "lando-php-1.10.0.tgz", | ||
| "unpackedSize": 3057365 | ||
| } | ||
| } |
+4
-1
| # PHP Lando Plugin | ||
| [](https://github.com/lando/php/actions/workflows/build-php-images.yml) | ||
| This is the _official_ [Lando](https://lando.dev) plugin for [PHP](https://php.net). When installed it... | ||
@@ -19,3 +21,3 @@ | ||
| myservice: | ||
| type: php:8.1 | ||
| type: php:8.5 | ||
| via: nginx | ||
@@ -47,2 +49,3 @@ webroot: www | ||
| * [@reynoldsalec](https://github.com/reynoldsalec) | ||
| * [@aaronfeledy](https://github.com/AaronFeledy) | ||
@@ -49,0 +52,0 @@ ## Contributors |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
3057625
0.43%2235
0.18%84360
0.03%65
4.84%14
-6.67%