Skip to content
Open
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: 4 additions & 0 deletions .ci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ ifneq ($(PHP_VERSION), 7.2)
SEL_DISTRO := bullseye
endif

ifeq ($(PHP_VERSION), 8.5)
SEL_DISTRO := bookworm
endif


CONAN_USER_HOME:=/tmp/conan_user_home
MAP_CONAN_HOME_TO_DOCKER_HOST_CMD_LINE_ARG:=
Expand Down
3 changes: 2 additions & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ php:8.1-fpm
php:8.2-fpm
php:8.3-fpm
php:8.4-fpm
php:8.5-fpm
ruby:2.7.1-alpine3.12
ubuntu:20.04
"
Expand All @@ -27,7 +28,7 @@ if [ -x "$(command -v docker)" ]; then

# Make sure list of PHP versions supported by the Elastic APM PHP Agent is in sync.
# See the comment in .ci/shared.sh
for version in 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
for version in 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 8.5
do
PHP_VERSION=${version} make -f .ci/Makefile prepare || true
DOCKERFILE=Dockerfile.alpine PHP_VERSION=${version} make -f .ci/Makefile prepare || true
Expand Down
2 changes: 1 addition & 1 deletion .ci/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -e
# *) docker-compose.yml in packaging/test

#
export ELASTIC_APM_PHP_TESTS_SUPPORTED_PHP_VERSIONS=(7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4)
export ELASTIC_APM_PHP_TESTS_SUPPORTED_PHP_VERSIONS=(7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 8.5)

export ELASTIC_APM_PHP_TESTS_SUPPORTED_LINUX_NATIVE_PACKAGE_TYPES=(apk deb rpm)
export ELASTIC_APM_PHP_TESTS_SUPPORTED_LINUX_PACKAGE_TYPES=("${ELASTIC_APM_PHP_TESTS_SUPPORTED_LINUX_NATIVE_PACKAGE_TYPES[@]}" tar)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/loop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
dockerfile:
- "Dockerfile"
- "Dockerfile.alpine"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/phpt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
steps:
# - uses: actions/checkout@v6
# - name: Fetch and extract latest release of apm-agent-php
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
data: ${{ fromJson(needs.setup-build-matrix.outputs.matrix-combinations).include }}
env:
PHP_VERSION: ${{ matrix.php-version }}
Expand Down Expand Up @@ -92,6 +93,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
dockerfile:
- "Dockerfile"
- "Dockerfile.alpine"
Expand Down
32 changes: 19 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ RUN if [ ${PHP_VERSION} = 7.2 ] && [ ${SEL_DISTRO} = buster ]; then \

RUN apt-get -qq update \
&& apt-get -qq -y --no-install-recommends install \
procps \
rsyslog \
curl \
unzip \
wget \
&& rm -rf /var/lib/apt/lists/*

RUN docker-php-ext-install \
mysqli \
pcntl \
pdo_mysql \
opcache
procps \
rsyslog \
curl \
unzip \
wget \
&& rm -rf /var/lib/apt/lists/*

RUN MODULES="mysqli pcntl pdo_mysql"; \
case "${PHP_VERSION}" in \
8.5*) ;; \
*) MODULES="$MODULES opcache" ;; \
esac; \
docker-php-ext-install $MODULES

COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

Expand All @@ -38,4 +39,9 @@ ENV TEST_PHP_JUNIT=/app/build/junit.xml
ENV ELASTIC_APM_ENABLED=false

# Create a link to extensions directory to make it easier accessible (paths are different between php releases)
RUN ln -s `find /usr/local/lib/php/extensions/ -name opcache.so | head -n1 | xargs dirname` /tmp/extensions
RUN OPCACHE_PATH=$(find /usr/local/lib/php/extensions/ -name opcache.so -o -name opcache.a | head -n1); \
if [ -z "$OPCACHE_PATH" ]; then \
ln -s $(find /usr/local/lib/php/extensions/ -type d | head -n1) /tmp/extensions; \
else \
ln -s $(dirname "$OPCACHE_PATH") /tmp/extensions; \
fi
20 changes: 13 additions & 7 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG PHP_VERSION=7.2
FROM php:${PHP_VERSION}-fpm-alpine

RUN apk update \
&& apk add \
&& apk add \
bash \
logrotate \
procps \
Expand All @@ -12,11 +12,12 @@ RUN apk update \
git \
unzip

RUN docker-php-ext-install \
mysqli \
pcntl \
pdo_mysql \
opcache
RUN MODULES="mysqli pcntl pdo_mysql"; \
case "${PHP_VERSION}" in \
8.5*) ;; \
*) MODULES="$MODULES opcache" ;; \
esac; \
docker-php-ext-install $MODULES

COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

Expand All @@ -31,4 +32,9 @@ ENV TEST_PHP_JUNIT=/app/build/junit.xml
ENV ELASTIC_APM_ENABLED=false

# Create a link to extensions directory to make it easier accessible (paths are different between php releases)
RUN ln -s `find /usr/local/lib/php/extensions/ -name opcache.so | head -n1 | xargs dirname` /tmp/extensions
RUN OPCACHE_PATH=$(find /usr/local/lib/php/extensions/ -name opcache.so -o -name opcache.a | head -n1); \
if [ -z "$OPCACHE_PATH" ]; then \
ln -s $(find /usr/local/lib/php/extensions/ -type d | head -n1) /tmp/extensions; \
else \
ln -s $(dirname "$OPCACHE_PATH") /tmp/extensions; \
fi
Loading