Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b039fa3
fix: switch to official phpmyadmin Docker image for arm64 support
AaronFeledy Feb 22, 2026
1d79e08
Fix: Use phpmyadmin/phpmyadmin image for legacy 4.x versions
cursoragent Feb 22, 2026
002accf
Fix phpMyAdmin version threshold to support 5.0/5.1 tags
cursoragent Feb 22, 2026
e56a627
fix: simplify image reference and fix lint error
AaronFeledy Feb 22, 2026
0b0efb9
fix: add hub.docker.com to netlify link checker todoPatterns
AaronFeledy Feb 22, 2026
20418cc
fix: restore correct legacy command threshold to 5.2.0
AaronFeledy Feb 22, 2026
65b0b83
fix: use legacy image for 4.x versions (official image only supports …
AaronFeledy Feb 22, 2026
250e46d
fix: correct legacy threshold to 5.0.0 (official image has 5.0+)
AaronFeledy Feb 22, 2026
6c9a9f2
test: modernize examples with specific database versions
AaronFeledy Feb 22, 2026
9490c24
chore: update @lando package deps and changelog
AaronFeledy Feb 22, 2026
d0e97cb
Fix duplicated semver comparison by defining isLegacy once and reusin…
cursoragent Feb 22, 2026
00ee91b
chore: update GitHub Actions runners to Node 20 and ubuntu-24.04
cursoragent Feb 22, 2026
989808c
fix: add @lando/mariadb and @lando/mysql as dependencies
AaronFeledy Feb 22, 2026
6744a01
fix: move mariadb/mysql to devDependencies, fix plugin paths
AaronFeledy Feb 22, 2026
3b0d366
fix: update example lockfiles and revert root changes
AaronFeledy Feb 22, 2026
4371946
fix: fix 5.x server config test, add dependabot for examples
AaronFeledy Feb 22, 2026
3b8b1ec
fix: use php to evaluate PMA config for server host test
AaronFeledy Feb 22, 2026
2444aaa
Update dependabot configuration for npm examples
AaronFeledy Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ updates:
interval: "daily"
allow:
- dependency-name: "@lando/*"
- package-ecosystem: "npm"
directories:
- "/examples/*"
schedule:
interval: "daily"
allow:
- dependency-name: "@lando/*"
groups:
examples:
applies-to: version-updates
update-types: [ "major", "minor", "patch" ]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
add_to_project:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Add issue/PR to GitHub Project
if: github.event.label.name == 'flag'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr-phpmyadmin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ jobs:
leia-test:
- examples/4.x
- examples/5.x
- examples/mysql
lando-version:
- 3-edge-slim
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:

- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- ubuntu-24.04
- macos-14
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ yarn.lock
.stignore
*.sync-conflict-*

phpmyadmin/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Switched to official `phpmyadmin` Docker image for arm64/Apple Silicon support [#61](https://github.com/lando/phpmyadmin/issues/61)
* Modernized example tests with pinned database versions and added MySQL test coverage
* Updated `@lando/mariadb` test dependency to ^1.8.0
* Updated `@lando/mysql` test dependency to ^1.6.0
* Updated `vite` from 5.4.20 to 5.4.21
* Updated `mdast-util-to-hast` from 13.2.0 to 13.2.1
* Updated `lodash-es` from 4.17.21 to 4.17.23
Expand Down
13 changes: 11 additions & 2 deletions builders/phpmyadmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,21 @@ module.exports = {

// Arrayify the hosts if needed
if (!_.isArray(options.hosts)) options.hosts = [options.hosts];

// Determine if this is a legacy version (< 5.0.0)
const isLegacy = semver.lt(`${options.version}.0`, '5.0.0');

// Switch to legacy command if needed
if (semver.lt(`${options.version}.0`, '5.0.0')) options.command = '/run.sh phpmyadmin';
if (isLegacy) options.command = '/run.sh phpmyadmin';

// Use official image for 5.x+, legacy image for 4.x
const image = isLegacy
? `phpmyadmin/phpmyadmin:${options.version}`
: `phpmyadmin:${options.version}`;

// Assemble the service config
const pmaService = {
image: `phpmyadmin/phpmyadmin:${options.version}`,
image,
environment: {
MYSQL_ROOT_PASSWORD: '',
PMA_HOSTS: options.hosts.join(','),
Expand Down
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:

## Advanced

There are also [several various envvars](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) exposed by the underlying image we use that you can set to further customize how your PhpMyAdmin works. **These are not officially supported** so we *highly recommend* you do not alter them unless you know what you are doing. Even then, YMMV.
There are also [several various envvars](https://hub.docker.com/_/phpmyadmin) exposed by the underlying image we use that you can set to further customize how your PhpMyAdmin works. **These are not officially supported** so we *highly recommend* you do not alter them unless you know what you are doing. Even then, YMMV.

That said, you will need to use a [service override](https://docs.lando.dev/services/lando-3.html#overrides) to take advantage of them as shown below:

Expand Down
14 changes: 7 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ services:

## Supported versions

* [5.2](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
* [5.1](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
* [5.0](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
* [5.2](https://hub.docker.com/_/phpmyadmin)
* [5.1](https://hub.docker.com/_/phpmyadmin)
* [5.0](https://hub.docker.com/_/phpmyadmin)
* [custom](https://docs.lando.dev/services/lando-3.html#overrides)

## Legacy versions

* [4.9](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
* [4.8](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
* [4.7](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
* [4.6](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
* [4.9](https://hub.docker.com/r/phpmyadmin/phpmyadmin)
* [4.8](https://hub.docker.com/r/phpmyadmin/phpmyadmin)
* [4.7](https://hub.docker.com/r/phpmyadmin/phpmyadmin)
* [4.6](https://hub.docker.com/r/phpmyadmin/phpmyadmin)

## Patch versions

Expand Down
4 changes: 2 additions & 2 deletions examples/4.x/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ services:
- chmod +x /app/.lando/pma-theme.sh
- /app/.lando/pma-theme.sh
database:
type: mariadb
type: mariadb:10.6
database2:
type: mariadb
type: mariadb:10.11

# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
Expand Down
10 changes: 5 additions & 5 deletions examples/4.x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ Run the following commands to validate things are rolling as they should.

```bash
# Should return 200 for the pma admin site
lando ssh -s pma -c "curl -I localhost | grep 200 | grep OK"
lando exec pma -- curl -I localhost | grep 200 | grep OK

# Should have databases that work correctly
lando ssh -s database -c "mysql -umariadb -pmariadb database -e quit"
lando ssh -s database2 -c "mysql -umariadb -pmariadb database -e quit"
lando exec database -- mysql -umariadb -pmariadb database -e quit
lando exec database2 -- mysql -umariadb -pmariadb database -e quit

# Should have our databases hooked up to PMA
lando ssh -s pma -c "env | grep PMA_HOSTS=database,database2"
lando exec pma -- env | grep PMA_HOSTS=database,database2

# Should have set a custom config file if specified
lando ssh -s pma -c "cat /etc/phpmyadmin/config.user.inc.php" | grep ThemeDefault | grep pmaterial
lando exec pma -- cat /etc/phpmyadmin/config.user.inc.php | grep ThemeDefault | grep pmaterial
```

Destroy tests
Expand Down
11 changes: 6 additions & 5 deletions examples/4.x/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/4.x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@lando/mariadb": "^1.0.0"
"@lando/mariadb": "^1.8.0"
}
}
5 changes: 3 additions & 2 deletions examples/5.x/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ services:
- chmod +x /app/.lando/pma-theme.sh
- /app/.lando/pma-theme.sh
database:
type: mariadb
type: mariadb:11.4
database2:
type: mariadb
type: mysql:8.0

# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
plugins:
"@lando/phpmyadmin": ./../../
"@lando/mariadb": ./node_modules/@lando/mariadb
"@lando/mysql": ./node_modules/@lando/mysql
10 changes: 8 additions & 2 deletions examples/5.x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,21 @@ lando exec defaults -- curl -I localhost | grep 200 | grep OK
lando exec pma -- curl -I localhost | grep 200 | grep OK
lando exec pma_theme -- curl -I localhost | grep 200 | grep OK

# Should have databases that work correctly
# Should have mariadb database that works correctly
lando exec database -- mysql -umariadb -pmariadb database -e quit
lando exec database2 -- mysql -umariadb -pmariadb database -e quit

# Should have mysql database that works correctly
lando exec database2 -- mysql -umysql -pmysql database -e quit

# Should have our databases hooked up to PMA
lando exec defaults -- env | grep PMA_HOSTS=database,database2
lando exec pma -- env | grep PMA_HOSTS=database,database2
lando exec pma_theme -- env | grep PMA_HOSTS=database,database2

# Should be able to connect to both database hosts from PMA
lando exec pma -- php -r "require '/etc/phpmyadmin/config.inc.php'; echo \$cfg['Servers'][1]['host'];" | grep -q "database"
lando exec pma -- php -r "require '/etc/phpmyadmin/config.inc.php'; echo \$cfg['Servers'][2]['host'];" | grep -q "database2"

# Should be version 5.1.x
lando exec defaults -- curl -s localhost | grep -oP '<span class="version">\K[^<]+' | tee >(cat 1>&2) | grep -q '5.1.'

Expand Down
33 changes: 27 additions & 6 deletions examples/5.x/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion examples/5.x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@lando/mariadb": "^1.6.3"
"@lando/mariadb": "^1.8.0",
"@lando/mysql": "^1.6.0"
}
}
1 change: 1 addition & 0 deletions examples/mysql/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
14 changes: 14 additions & 0 deletions examples/mysql/.lando.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: lando-pma-mysql
services:
pma:
type: phpmyadmin:5.2
hosts:
- database
database:
type: mysql:8.4

# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
plugins:
"@lando/phpmyadmin": ./../../
"@lando/mysql": ./node_modules/@lando/mysql
52 changes: 52 additions & 0 deletions examples/mysql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
PhpMyAdmin MySQL Example
========================

This example exists primarily to test phpMyAdmin with MySQL specifically:

* [PhpMyAdmin Service](https://docs.devwithlando.io/tutorials/phpmyadmin.html)

Start up tests
--------------

Run the following commands to get up and running with this example.

```bash
# Should install Lando plugin dependency.
npm ci
```

```bash
# Should start up successfully
lando poweroff
lando start
```

Verification commands
---------------------

Run the following commands to validate things are rolling as they should.

```bash
# Should return 200 for the pma admin site
lando exec pma -- curl -I localhost | grep 200 | grep OK

# Should have mysql database that works correctly
lando exec database -- mysql -umysql -pmysql database -e quit

# Should have our database hooked up to PMA
lando exec pma -- env | grep PMA_HOSTS=database

# Should be version 5.2.x
lando exec pma -- curl -s localhost | grep -oP '<span class="version">\K[^<]+' | tee >(cat 1>&2) | grep -q '5.2.'
```

Destroy tests
-------------

Run the following commands to trash this app like nothing ever happened.

```bash
# Should be destroyed with success
lando destroy -y
lando poweroff
```
Loading
Loading