Skip to content

Commit d0d1fa9

Browse files
authored
Make "two PHP per Drupal" more explicit (#300)
This embeds that constraint directly in the `jq` code, which also simplifies current and future conditionals to be simply "which versions support (or do not support) this PHP" and the "limit to two" is done by the code instead.
1 parent 8527ca0 commit d0d1fa9

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

versions.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,25 @@ for version in "${versions[@]}"; do
110110
# TODO adjust this in a way that is easier to manage over time (semi-automatic variant combinations, for example, based on availability/supported status of upstream PHP images)
111111
phpVersions: (
112112
# https://www.drupal.org/docs/system-requirements/php-requirements
113-
[
113+
[ limit(2;
114+
# we support up to two PHP versions per Drupal version
115+
114116
# Drupal 11.3+ supports PHP 8.5
115117
if env.version | IN("10.5", "10.6", "11.2") then empty else
116118
"8.5"
117119
end,
120+
118121
# Drupal 11.1+ and 10.4+ support PHP 8.4
119122
"8.4",
123+
120124
# Drupal 11.3+ and 10.6+ recommend PHP 8.4; keep 8.3 for 'existing' builds
121125
# https://github.com/docker-library/drupal/pull/299
122126
# https://www.drupal.org/project/drupal/releases/10.6.0#platform
123127
# https://www.drupal.org/project/drupal/releases/11.3.0#platform
124-
if env.version | IN("10.5", "10.6", "11.2") then
125-
"8.3"
126-
else empty end
127-
]
128+
"8.3",
129+
130+
empty
131+
) ]
128132
),
129133
variants: [
130134
"trixie",

0 commit comments

Comments
 (0)