Skip to content

Commit 8816b93

Browse files
Merge pull request #16 from sugarcrm/BR-12229
BR-12229: Make basedir compatible with PHP84
2 parents e8e9ebc + 56ea394 commit 8816b93

File tree

3 files changed

+39
-21
lines changed

3 files changed

+39
-21
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Basedir Extension Build & Test
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Build and test PHP extension
17+
run: |
18+
docker build -t php-basedir-extension . --progress=plain

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ env:
66
- PHPVER="7.3.14"
77
- PHPVER="7.4.2"
88
- PHPVER="8.0.0"
9+
- PHPVER="8.4.1"
910

1011
# This replaces the travis supplied phpbuild which defaults to ZTS enabled
1112
# builds. Since we are replacing using the same config, we don't have to add

Dockerfile

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
1-
FROM amazonlinux:2
1+
FROM rockylinux:9
22

33
ARG PHP_BUILD_DIR=/var/task
44
ARG PHP_CONF_DIR=/etc/php.d
55
ARG PHP_EXT_DIR=/usr/lib64/php/modules
66

7-
RUN yum clean all && \
8-
yum -y upgrade && \
9-
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
10-
https://rpms.remirepo.net/enterprise/remi-release-7.rpm \
11-
re2c \
12-
yum-utils && \
13-
yum-config-manager --disable remi-safe && \
14-
yum-config-manager --enable remi-php80 && \
15-
yum-config-manager --setopt=remi-php80.priority=10 --save && \
16-
yum -y install php-cli php-common php-devel && \
17-
yum clean all
7+
RUN dnf -y update && \
8+
dnf -y install dnf-plugins-core && \
9+
dnf config-manager --set-enabled crb && \
10+
dnf -y install curl wget tar gcc make libxml2-devel \
11+
bzip2 bzip2-devel libpng-devel libjpeg-devel \
12+
freetype-devel oniguruma-devel libzip-devel zlib-devel \
13+
--allowerasing
1814

19-
#Extension install
20-
RUN mkdir -p ${PHP_EXT_DIR} && mkdir -p ${PHP_CONF_DIR}
15+
RUN dnf -y install https://rpms.remirepo.net/enterprise/remi-release-9.rpm && \
16+
dnf module reset php -y && \
17+
dnf module enable php:remi-8.4 -y && \
18+
dnf -y install php php-cli php-devel php-pear
19+
20+
RUN mkdir -p ${PHP_EXT_DIR} ${PHP_CONF_DIR}
2121

22-
#basedir
2322
RUN mkdir -p ${PHP_BUILD_DIR}
2423
RUN cd ${PHP_BUILD_DIR} && \
2524
mkdir basedir
26-
COPY basedir.c basedir/
27-
COPY cache.php basedir/
28-
COPY config.m4 basedir/
29-
COPY php_basedir.h basedir/
30-
COPY tests basedir/
31-
RUN cd basedir && \
25+
COPY basedir.c ${PHP_BUILD_DIR}/basedir/
26+
COPY cache.php ${PHP_BUILD_DIR}/basedir/
27+
COPY config.m4 ${PHP_BUILD_DIR}/basedir/
28+
COPY php_basedir.h ${PHP_BUILD_DIR}/basedir/
29+
COPY tests ${PHP_BUILD_DIR}/basedir/
30+
RUN cd ${PHP_BUILD_DIR}/basedir && \
3231
phpize && \
3332
./configure && \
3433
make && \

0 commit comments

Comments
 (0)