Skip to content

Commit

Permalink
appsec inttests: support building 8.4 images
Browse files Browse the repository at this point in the history
  • Loading branch information
cataphract committed Nov 8, 2024
1 parent 48f24e1 commit e8009f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions appsec/tests/integration/gradle/images.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def phpVersions = [
'8.1': '8.1.26',
'8.2': '8.2.13',
'8.3': '8.3.0',
'8.4': '8.4.0',
]

def arch = System.getProperty('os.arch')
Expand Down
5 changes: 5 additions & 0 deletions appsec/tests/integration/src/docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ ARG VARIANT

ENV NO_APX_WRAPPER=1

# PHP 8.4 checks if /usr/sbin/apache2 exists
RUN touch /usr/sbin/apache2
RUN chmod +x /usr/sbin/apache2
RUN USER=root /build/php/build_dev_php.sh "$PHP_VERSION" "$VARIANT"
RUN rm /usr/sbin/apache2

ADD php.ini /root/php/php.ini
ENV PHPRC=/root/php/php.ini

Expand Down
8 changes: 5 additions & 3 deletions appsec/tests/integration/src/docker/php/build_dev_php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ function download_php {
local download_url
if [[ $version_id -lt 50400 ]]; then
download_url="http://museum.php.net/php5/php-${version}.tar.gz"
elif [[ $version_id -ge 80400 ]]; then
download_url="https://downloads.php.net/~saki/php-8.4.0RC3.tar.gz"
else
download_url="https://www.php.net/distributions/php-${version}.tar.gz"
fi
Expand Down Expand Up @@ -85,10 +87,10 @@ function get_xdebug_version {
echo '2.8.1'
elif [[ $version_id -lt 80000 ]]; then
echo '2.9.8'
elif [[ $version_id -ge 80300 ]]; then
elif [[ $version_id -lt 80400 ]]; then
echo '3.3.1'
else
echo '3.2.2'
elif [[ $version_id -ge 80400 ]]; then
echo '3.4.0beta1'
fi
}

Expand Down

0 comments on commit e8009f4

Please sign in to comment.