diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8cd24bc..190c662 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 }} diff --git a/install.yaml b/install.yaml index 7e5e40e..161a4d9 100644 --- a/install.yaml +++ b/install.yaml @@ -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' diff --git a/tests/test.bats b/tests/test.bats index 02be80e..ebb505f 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -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 @@ -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 @@ -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 diff --git a/web-build/pre.Dockerfile.frankenphp b/web-build/pre.Dockerfile.frankenphp index 8426631..bcf51ba 100644 --- a/web-build/pre.Dockerfile.frankenphp +++ b/web-build/pre.Dockerfile.frankenphp @@ -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 < /etc/apt/sources.list.d/php-zts.sources <