From 423660ad6e9786b58d95e129b9d07fec0dcc53b6 Mon Sep 17 00:00:00 2001 From: Michael Deck Date: Mon, 12 May 2025 12:59:25 -0400 Subject: [PATCH] Add PHP 8.4 support --- al/x86_64/standard/5.0/Dockerfile | 5 ++++- al/x86_64/standard/5.0/runtimes.yml | 6 +++++- .../5.0/tools/runtime_configs/php/8.4.7 | 20 +++++++++++++++++++ ubuntu/standard/7.0/Dockerfile | 5 ++++- ubuntu/standard/7.0/runtimes.yml | 6 +++++- .../7.0/tools/runtime_configs/php/8.4.7 | 20 +++++++++++++++++++ 6 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 al/x86_64/standard/5.0/tools/runtime_configs/php/8.4.7 create mode 100644 ubuntu/standard/7.0/tools/runtime_configs/php/8.4.7 diff --git a/al/x86_64/standard/5.0/Dockerfile b/al/x86_64/standard/5.0/Dockerfile index 8cf5116d..5cdbed29 100644 --- a/al/x86_64/standard/5.0/Dockerfile +++ b/al/x86_64/standard/5.0/Dockerfile @@ -468,7 +468,8 @@ RUN set -ex \ RUN curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer | bash ENV PATH="/root/.phpenv/shims:/root/.phpenv/bin:$PATH" -ENV PHP_83_VERSION="8.3.13" \ +ENV PHP_84_VERSION="8.4.7" \ + PHP_83_VERSION="8.3.13" \ PHP_82_VERSION="8.2.25" # Set environment variables for PHP configure options ENV PHP_BUILD_CONFIGURE_OPTS="--with-curl --with-password-argon2 --with-pdo-pgsql --with-libedit" @@ -476,10 +477,12 @@ ENV PHP_BUILD_CONFIGURE_OPTS="--with-curl --with-password-argon2 --with-pdo-pgsq ENV PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j4" RUN phpenv update \ + && phpenv install $PHP_84_VERSION \ && phpenv install $PHP_83_VERSION \ && phpenv install $PHP_82_VERSION \ && phpenv global $PHP_82_VERSION \ && php -v \ + && echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_84_VERSION/etc/conf.d/memory.ini" \ && echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_83_VERSION/etc/conf.d/memory.ini" \ && echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_82_VERSION/etc/conf.d/memory.ini" \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \ diff --git a/al/x86_64/standard/5.0/runtimes.yml b/al/x86_64/standard/5.0/runtimes.yml index 11f6f674..91155478 100644 --- a/al/x86_64/standard/5.0/runtimes.yml +++ b/al/x86_64/standard/5.0/runtimes.yml @@ -131,6 +131,10 @@ runtimes: - pyenv global $VERSION php: versions: + 8.4: + commands: + - echo "Installing PHP version 8.4 ..." + - phpenv global $PHP_84_VERSION 8.3: commands: - echo "Installing PHP version 8.3 ..." @@ -199,4 +203,4 @@ runtimes: commands: - echo "Installing custom .Net version $VERSION ..." - /usr/local/bin/dotnet-install.sh -v $VERSION && rm -rf /tmp/* - - test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $VERSION --roll-forward feature \ No newline at end of file + - test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $VERSION --roll-forward feature diff --git a/al/x86_64/standard/5.0/tools/runtime_configs/php/8.4.7 b/al/x86_64/standard/5.0/tools/runtime_configs/php/8.4.7 new file mode 100644 index 00000000..86fc6d70 --- /dev/null +++ b/al/x86_64/standard/5.0/tools/runtime_configs/php/8.4.7 @@ -0,0 +1,20 @@ +configure_option "--with-curl" +configure_option "--with-password-argon2" +configure_option "--with-pdo-pgsql" +configure_option "--with-libedit" + +PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j4" + +#https://github.com/php-build/php-build/blob/master/share/php-build/definitions/8.4.7 +#Don't change beyond this line + +configure_option "--enable-gd" +configure_option "--with-jpeg" +configure_option "--with-zip" +configure_option "--with-mhash" + +configure_option -D "--with-xmlrpc" + +install_package "https://www.php.net/distributions/php-8.4.7.tar.bz2" +install_xdebug "3.4.2" +enable_builtin_opcache diff --git a/ubuntu/standard/7.0/Dockerfile b/ubuntu/standard/7.0/Dockerfile index d1b77295..cf4b805d 100644 --- a/ubuntu/standard/7.0/Dockerfile +++ b/ubuntu/standard/7.0/Dockerfile @@ -445,7 +445,8 @@ RUN set -ex \ RUN curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer | bash ENV PATH="/root/.phpenv/shims:/root/.phpenv/bin:$PATH" -ENV PHP_83_VERSION="8.3.13" \ +ENV PHP_84_VERSION="8.4.7" \ + PHP_83_VERSION="8.3.13" \ PHP_82_VERSION="8.2.25" # Set environment variables for PHP configure options ENV PHP_BUILD_CONFIGURE_OPTS="--with-curl --with-password-argon2 --with-pdo-pgsql --with-libedit" @@ -453,10 +454,12 @@ ENV PHP_BUILD_CONFIGURE_OPTS="--with-curl --with-password-argon2 --with-pdo-pgsq ENV PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j4" RUN phpenv update \ + && phpenv install $PHP_84_VERSION \ && phpenv install $PHP_83_VERSION \ && phpenv install $PHP_82_VERSION \ && phpenv global $PHP_82_VERSION \ && php -v \ + && echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_84_VERSION/etc/conf.d/memory.ini" \ && echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_83_VERSION/etc/conf.d/memory.ini" \ && echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_82_VERSION/etc/conf.d/memory.ini" \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \ diff --git a/ubuntu/standard/7.0/runtimes.yml b/ubuntu/standard/7.0/runtimes.yml index 1aee642e..c4cb796f 100644 --- a/ubuntu/standard/7.0/runtimes.yml +++ b/ubuntu/standard/7.0/runtimes.yml @@ -137,6 +137,10 @@ runtimes: - pyenv global $VERSION php: versions: + 8.4: + commands: + - echo "Installing PHP version 8.4 ..." + - phpenv global $PHP_84_VERSION 8.3: commands: - echo "Installing PHP version 8.3 ..." @@ -205,4 +209,4 @@ runtimes: commands: - echo "Installing custom .Net version $VERSION ..." - /usr/local/bin/dotnet-install.sh -v $VERSION && rm -rf /tmp/* - - test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $VERSION --roll-forward feature \ No newline at end of file + - test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $VERSION --roll-forward feature diff --git a/ubuntu/standard/7.0/tools/runtime_configs/php/8.4.7 b/ubuntu/standard/7.0/tools/runtime_configs/php/8.4.7 new file mode 100644 index 00000000..86fc6d70 --- /dev/null +++ b/ubuntu/standard/7.0/tools/runtime_configs/php/8.4.7 @@ -0,0 +1,20 @@ +configure_option "--with-curl" +configure_option "--with-password-argon2" +configure_option "--with-pdo-pgsql" +configure_option "--with-libedit" + +PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j4" + +#https://github.com/php-build/php-build/blob/master/share/php-build/definitions/8.4.7 +#Don't change beyond this line + +configure_option "--enable-gd" +configure_option "--with-jpeg" +configure_option "--with-zip" +configure_option "--with-mhash" + +configure_option -D "--with-xmlrpc" + +install_package "https://www.php.net/distributions/php-8.4.7.tar.bz2" +install_xdebug "3.4.2" +enable_builtin_opcache