Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
ddev_version: [stable, HEAD]
# The "release" tests only run on schedule and workflow_dispatch.
bats_tag: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
&& fromJSON('["php82-php83", "php84", "php85", "release"]')
|| fromJSON('["php82-php83", "php84", "php85"]') }}
&& fromJSON('["php82-php83", "php84", "php85", "php86", "release"]')
|| fromJSON('["php82-php83", "php84", "php85", "php86"]') }}
fail-fast: false

runs-on: ${{ matrix.os }}
Expand Down
10 changes: 10 additions & 0 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,14 @@ pre_install_actions:
exit 2
fi

post_install_actions:
- |
#ddev-description:Removing PHP extensions not available for PHP 8.6
# TODO: Remove when memcached and redis are available for PHP 8.6
config_file="${DDEV_APPROOT}/.ddev/config.frankenphp.yaml"
if [ "${DDEV_PHP_VERSION}" = "8.6" ] && grep -q '#ddev-generated' "${config_file}"; then
sed -i.bak '/php-zts-memcached/d; /php-zts-redis/d' "${config_file}"
rm -f "${config_file}.bak"
fi

ddev_version_constraint: '>= v1.24.10'
21 changes: 21 additions & 0 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,17 @@ health_checks() {
extensions+=(example_pie_extension)
fi

local excluded_extensions=()
# TODO: Remove when these extensions work with PHP 8.6
if [[ "${php_version}" == "8.6" ]]; then
excluded_extensions=(memcached redis blackfire)
fi

run ddev php -m
assert_success
refute_php_warnings
for extension in "${extensions[@]}"; do
[[ " ${excluded_extensions[*]} " == *" ${extension} "* ]] && continue
assert_line "${extension}"
done
if [[ "${FRANKENPHP_CUSTOM_EXTENSION}" != "true" ]]; then
Expand All @@ -259,11 +266,13 @@ health_checks() {
run curl -sf https://${PROJNAME}.ddev.site/server-info.php
assert_success
for extension in "${extensions[@]}"; do
[[ " ${excluded_extensions[*]} " == *" ${extension} "* ]] && continue
assert_line "extension=${extension}"
done

# The extensions must be enabled both in the CLI and in FrankenPHP
for extension in xdebug xhprof blackfire; do
[[ " ${excluded_extensions[*]} " == *" ${extension} "* ]] && continue
run ddev "${extension}" on
assert_success

Expand Down Expand Up @@ -384,6 +393,18 @@ teardown() {
install_from_directory 8.5
}

# bats test_tags=php86
@test "install from directory PHP 8.6" {
set -eu -o pipefail

# TODO: Remove after the next DDEV release
if [[ "$(ddev --version)" == "ddev version v1.25.4" ]]; then
skip "PHP 8.6 is not supported in DDEV v1.25.4"
fi

install_from_directory 8.6
}

# bats test_tags=release
@test "install from release" {
set -eu -o pipefail
Expand Down
15 changes: 14 additions & 1 deletion web-build/pre.Dockerfile.frankenphp
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
#ddev-generated
# Add PHP ZTS repository https://debs.henderkes.com/
RUN curl -fsSL https://files.henderkes.com/install.sh | sh -s "${DDEV_PHP_VERSION}"
RUN <<EOF
set -eu -o pipefail

PHP_ZTS_VERSION="${DDEV_PHP_VERSION//./}"
mkdir -p /etc/apt/keyrings
curl -fsSL "https://pkg.henderkes.com/api/packages/${PHP_ZTS_VERSION}/debian/repository.key" -o /etc/apt/keyrings/php-zts.asc
cat > /etc/apt/sources.list.d/php-zts.sources <<SOURCES
Types: deb
URIs: https://pkg.henderkes.com/api/packages/${PHP_ZTS_VERSION}/debian
Suites: php-zts
Components: main
Signed-By: /etc/apt/keyrings/php-zts.asc
SOURCES
EOF