diff --git a/.github/workflows/features-global.yml b/.github/workflows/features-global.yml index ecebd707..bee4cf19 100644 --- a/.github/workflows/features-global.yml +++ b/.github/workflows/features-global.yml @@ -25,9 +25,11 @@ jobs: - php81-alpine-base - php82-alpine-base - php83-alpine-base + - php84-alpine-base - php81-ubuntu-base - php82-ubuntu-base - php83-ubuntu-base + - php84-ubuntu-base steps: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/features-scenarios.yml b/.github/workflows/features-scenarios.yml index adf30309..08c41f64 100644 --- a/.github/workflows/features-scenarios.yml +++ b/.github/workflows/features-scenarios.yml @@ -48,6 +48,8 @@ jobs: filter: '82' - feature: php filter: '83' + - feature: php + filter: '84' - feature: phpmyadmin - feature: playwright - feature: ssh diff --git a/features/src/php/install.sh b/features/src/php/install.sh index 352ffcf9..f5f3b54b 100755 --- a/features/src/php/install.sh +++ b/features/src/php/install.sh @@ -157,6 +157,7 @@ setup_php83_alpine() { EXTENSIONS= fi + # shellcheck disable=SC2086 apk add --no-cache \ icu-data-full ghostscript \ php83 php83-fpm php83-pear \ @@ -196,7 +197,7 @@ setup_php83_alpine() { php83-xml \ php83-xmlreader \ php83-xmlwriter \ - php83-zip + php83-zip ${EXTENSIONS} if [ "${SKIP_GMAGICK}" != 'true' ]; then apk add --no-cache php83-dev gcc make libc-dev graphicsmagick-dev libtool graphicsmagick libgomp @@ -219,6 +220,77 @@ setup_php83_alpine() { true } +setup_php84_alpine() { + if [ "${LITE_INSTALL}" != 'true' ]; then + # missing: php84-pecl-mcrypt php84-pecl-timezonedb + EXTENSIONS="icu-data-full ghostscript php84-bcmath php84-ftp php84-intl php84-soap php84-pecl-igbinary php84-pecl-ssh2" + else + EXTENSIONS= + fi + + # shellcheck disable=SC2086 + apk add --no-cache \ + icu-data-full ghostscript \ + php84 php84-fpm php84-pear \ + php84-pecl-apcu \ + php84-calendar \ + php84-ctype \ + php84-curl \ + php84-dom \ + php84-exif \ + php84-fileinfo \ + php84-ftp \ + php84-gd \ + php84-gmp \ + php84-iconv \ + php84-mbstring \ + php84-pecl-memcache \ + php84-pecl-memcached \ + php84-mysqli \ + php84-mysqlnd \ + php84-opcache \ + php84-openssl \ + php84-pcntl \ + php84-pdo \ + php84-pdo_mysql \ + php84-pdo_sqlite \ + php84-phar \ + php84-posix \ + php84-session \ + php84-shmop \ + php84-simplexml \ + php84-sockets \ + php84-sodium \ + php84-sqlite3 \ + php84-sysvsem \ + php84-sysvshm \ + php84-tokenizer \ + php84-xml \ + php84-xmlreader \ + php84-xmlwriter \ + php84-zip ${EXTENSIONS} -X https://dl-cdn.alpinelinux.org/alpine/edge/testing + + if [ "${SKIP_GMAGICK}" != 'true' ]; then + apk add --no-cache php84-dev gcc make libc-dev graphicsmagick-dev libtool graphicsmagick libgomp -X https://dl-cdn.alpinelinux.org/alpine/edge/testing + pecl84 channel-update pecl.php.net + pecl84 install channel://pecl.php.net/gmagick-2.0.6RC1 < /dev/null || true + echo "extension=gmagick.so" > /etc/php84/conf.d/40_gmagick.ini + apk del --no-cache php84-dev gcc make libc-dev graphicsmagick-dev libtool + fi + + # Alpine Edge: this symlink is broken + rm -f /usr/bin/phar.phar + + [ ! -f /usr/bin/pear ] && ln -s /usr/bin/pear84 /usr/bin/pear + [ ! -f /usr/bin/peardev ] && ln -s /usr/bin/peardev84 /usr/bin/peardev + [ ! -f /usr/bin/pecl ] && ln -s /usr/bin/pecl84 /usr/bin/pecl + [ ! -f /usr/bin/phar.phar ] && ln -s /usr/bin/phar.phar84 /usr/bin/phar.phar + [ ! -f /usr/bin/phar ] && ln -s /usr/bin/phar84 /usr/bin/phar + [ ! -f /usr/bin/php ] && ln -s /usr/bin/php84 /usr/bin/php + [ ! -f /usr/sbin/php-fpm ] && ln -s /usr/sbin/php-fpm84 /usr/sbin/php-fpm + true +} + setup_php81_deb() { if [ "${LITE_INSTALL}" != 'true' ]; then EXTENSIONS="ghostscript php8.1-bcmath php8.1-igbinary php8.1-intl php8.1-mcrypt php8.1-soap php8.1-ssh2" @@ -520,6 +592,11 @@ case "${ID_LIKE}" in setup_php83_alpine ;; + "8.4") + PHP_INI_DIR=/etc/php84 + setup_php84_alpine + ;; + *) echo "(!) PHP version ${PHP_VERSION} is not supported." exit 1 diff --git a/features/test/_global/php84-alpine-base.sh b/features/test/_global/php84-alpine-base.sh new file mode 120000 index 00000000..2564aa1b --- /dev/null +++ b/features/test/_global/php84-alpine-base.sh @@ -0,0 +1 @@ +php81-alpine-base.sh \ No newline at end of file diff --git a/features/test/_global/scenarios.json b/features/test/_global/scenarios.json index a303d157..5d40e008 100644 --- a/features/test/_global/scenarios.json +++ b/features/test/_global/scenarios.json @@ -257,6 +257,92 @@ "./dev-tools" ] }, + "php84-alpine-base": { + "image": "ghcr.io/automattic/vip-codespaces/alpine-base:latest", + "overrideCommand": false, + "features": { + "base": {}, + "nginx": { + "mediaRedirectURL": "" + }, + "php": { + "version": "8.4", + "composer": true + }, + "mariadb": { + "installDatabaseToWorkspaces": true + }, + "wordpress": { + "version": "latest", + "moveUploadsToWorkspaces": true, + "multisite": true, + "multisiteStyle": "subdirectory" + }, + "wp-cli": { + "nightly": false + }, + "vip-go-mu-plugins": { + "enabled": true, + "development_mode": false + }, + "dev-tools": {}, + "elasticsearch": { + "enabled": true, + "installDataToWorkspaces": true + }, + "memcached": { + "enabled": true + }, + "vip-cli": { + "enabled": true + }, + "mailpit": { + "enabled": true + }, + "phpmyadmin": { + "enabled": true + }, + "xdebug": { + "enabled": true, + "mode": "debug,develop" + }, + "mc": { + "enabled": true + }, + "photon": { + "enabled": true, + "disable_optimizations": false + }, + "cron": { + "enabled": true, + "run_wp_cron": true, + "wp_cron_schedule": "*/15 * * * *" + }, + "wptl": { + "enabled": true, + "version": "latest" + } + }, + "overrideFeatureInstallOrder": [ + "./base", + "./wp-cli", + "./mariadb", + "./mc", + "./nginx", + "./php", + "./vip-cli", + "./wordpress", + "./cron", + "./elasticsearch", + "./mailpit", + "./memcached", + "./photon", + "./phpmyadmin", + "./vip-go-mu-plugins", + "./xdebug", + "./dev-tools" + ] + }, "php81-ubuntu-base": { "image": "ghcr.io/automattic/vip-codespaces/ubuntu-base:latest", diff --git a/features/test/php/alpine-84-mcr.sh b/features/test/php/alpine-84-mcr.sh new file mode 120000 index 00000000..81058609 --- /dev/null +++ b/features/test/php/alpine-84-mcr.sh @@ -0,0 +1 @@ +alpine-81.sh \ No newline at end of file diff --git a/features/test/php/alpine-84.sh b/features/test/php/alpine-84.sh new file mode 120000 index 00000000..81058609 --- /dev/null +++ b/features/test/php/alpine-84.sh @@ -0,0 +1 @@ +alpine-81.sh \ No newline at end of file diff --git a/features/test/php/scenarios.json b/features/test/php/scenarios.json index b1437948..738641fb 100644 --- a/features/test/php/scenarios.json +++ b/features/test/php/scenarios.json @@ -56,6 +56,25 @@ "./vip-cli" ] }, + "alpine-84": { + "image": "ghcr.io/automattic/vip-codespaces/alpine-base:latest", + "overrideCommand": false, + "features": { + "php": { + "version": "8.4", + "composer": true + }, + "mailpit": {}, + "vip-cli": {}, + "xdebug": {} + }, + "overrideFeatureInstallOrder": [ + "./php", + "./xdebug", + "./mailpit", + "./vip-cli" + ] + }, "ubuntu-81": { "image": "ghcr.io/automattic/vip-codespaces/ubuntu-base:latest", @@ -120,6 +139,27 @@ "./vip-cli" ] }, + "ubuntu-84": { + "image": "ghcr.io/automattic/vip-codespaces/ubuntu-base:latest", + "overrideCommand": false, + "features": { + "base": {}, + "php": { + "version": "8.4", + "composer": true + }, + "mailpit": {}, + "vip-cli": {}, + "xdebug": {} + }, + "overrideFeatureInstallOrder": [ + "./base", + "./php", + "./xdebug", + "./mailpit", + "./vip-cli" + ] + }, "ubuntu-81-mcr": { "image": "mcr.microsoft.com/devcontainers/base:ubuntu", @@ -199,6 +239,32 @@ "./vip-cli" ] }, + "ubuntu-84-mcr": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "base": {}, + "entrypoints": {}, + "php": { + "version": "8.3", + "composer": true, + "install-runit-service": false, + "lite-install": true + }, + "mailpit": { + "install-runit-service": false + }, + "vip-cli": {}, + "xdebug": {} + }, + "overrideFeatureInstallOrder": [ + "./base", + "./entrypoints", + "./php", + "./xdebug", + "./mailpit", + "./vip-cli" + ] + }, "alpine-81-mcr": { "image": "mcr.microsoft.com/devcontainers/base:alpine", @@ -274,5 +340,30 @@ "./mailpit", "./vip-cli" ] + }, + "alpine-84-mcr": { + "image": "mcr.microsoft.com/devcontainers/base:alpine", + "features": { + "entrypoints": {}, + "php": { + "version": "8.4", + "composer": true, + "install-runit-service": false, + "lite-install": true, + "skip-gmagick": true + }, + "mailpit": { + "install-runit-service": false + }, + "vip-cli": {}, + "xdebug": {} + }, + "overrideFeatureInstallOrder": [ + "./entrypoints", + "./php", + "./xdebug", + "./mailpit", + "./vip-cli" + ] } } diff --git a/features/test/php/ubuntu-84-mcr.sh b/features/test/php/ubuntu-84-mcr.sh new file mode 120000 index 00000000..ab5a3ce6 --- /dev/null +++ b/features/test/php/ubuntu-84-mcr.sh @@ -0,0 +1 @@ +ubuntu-81.sh \ No newline at end of file diff --git a/features/test/php/ubuntu-84.sh b/features/test/php/ubuntu-84.sh new file mode 120000 index 00000000..ab5a3ce6 --- /dev/null +++ b/features/test/php/ubuntu-84.sh @@ -0,0 +1 @@ +ubuntu-81.sh \ No newline at end of file