File tree Expand file tree Collapse file tree 4 files changed +55
-3
lines changed Expand file tree Collapse file tree 4 files changed +55
-3
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,14 @@ COPY mods-available/sqlsrv.ini /etc/php/7.3/mods-available/sqlsrv.ini
140
140
COPY mods-available/sqlsrv.ini /etc/php/7.4/mods-available/sqlsrv.ini
141
141
COPY mods-available/sqlsrv.ini /etc/php/8.0/mods-available/sqlsrv.ini
142
142
143
+ # Install swoole modules for PHP 7.3 - 8.0
144
+ # (we don't need to support earlier than that in mezzio-swoole)
145
+ COPY mods-available/swoole.ini /etc/php/7.3/mods-available/swoole.ini
146
+ COPY mods-available/swoole.ini /etc/php/7.4/mods-available/swoole.ini
147
+ COPY mods-available/swoole.ini /etc/php/8.0/mods-available/swoole.ini
148
+ COPY scripts/install_swoole.sh /tmp/install_swoole.sh
149
+ RUN /tmp/install_swoole.sh && rm /tmp/install_swoole.sh
150
+
143
151
RUN mkdir -p /etc/laminas-ci/problem-matcher \
144
152
&& cd /etc/laminas-ci/problem-matcher \
145
153
&& wget https://raw.githubusercontent.com/shivammathur/setup-php/master/src/configs/phpunit.json \
Original file line number Diff line number Diff line change @@ -156,16 +156,31 @@ if [[ "${EXTENSIONS}" != "" ]];then
156
156
else
157
157
ENABLE_SQLSRV=true
158
158
fi
159
- EXTENSIONS=$( echo ${EXTENSIONS} | sed -E -e ' s/php[0-9.]+-(pdo[_-]){0,1}sqlsrv/ /g' | sed -E -e ' s/\s{2,}/ /g' )
159
+ EXTENSIONS=$( echo " ${EXTENSIONS} " | sed -E -e ' s/php[0-9.]+-(pdo[_-]){0,1}sqlsrv/ /g' | sed -E -e ' s/\s{2,}/ /g' )
160
+ fi
161
+
162
+ ENABLE_SWOOLE=false
163
+ if [[ " ${EXTENSIONS} " =~ swoole ]]; then
164
+ if [[ ! ${PHP} =~ (7.3| 7.4| 8.0) ]]; then
165
+ echo " Skipping enabling of swoole extension; not supported on PHP < 7.3"
166
+ else
167
+ ENABLE_SWOOLE=true
168
+ fi
169
+ EXTENSIONS=$( echo " ${EXTENSIONS} " | sed -E -e ' s/php[0-9.]+-swoole/ /g' | sed -E -e ' s/\s{2,}/ /g' )
160
170
fi
161
171
162
172
echo " Installing extensions: ${EXTENSIONS} "
163
173
apt update
164
- apt install -y ${EXTENSIONS}
174
+ apt install -y " ${EXTENSIONS} "
165
175
166
176
if [[ " ${ENABLE_SQLSRV} " == " true" ]]; then
167
177
echo " Enabling sqlsrv extensions"
168
- phpenmod -v ${PHP} -s ALL sqlsrv
178
+ phpenmod -v " ${PHP} " -s ALL sqlsrv
179
+ fi
180
+
181
+ if [[ " ${ENABLE_SWOOLE} " == " true" ]]; then
182
+ echo " Enabling swoole extensions"
183
+ phpenmod -v " ${PHP} " -s ALL swoole
169
184
fi
170
185
fi
171
186
Original file line number Diff line number Diff line change
1
+ ; configuration for php swoole module
2
+ ; priority=20
3
+ extension =swoole.so
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ SWOOLE_VERSION=4.6.7
6
+
7
+ # Get swoole package ONCE
8
+ cd /tmp
9
+ wget https://pecl.php.net/get/swoole-${SWOOLE_VERSION} .tgz
10
+ tar xzf swoole-${SWOOLE_VERSION} .tgz
11
+
12
+ # We only need to support currently supported PHP versions
13
+ for PHP_VERSION in 7.3 7.4 8.0; do
14
+ cd /tmp/swoole-${SWOOLE_VERSION}
15
+ if [ -f Makefile ]; then
16
+ make clean
17
+ fi
18
+ phpize${PHP_VERSION}
19
+ ./configure --enable-swoole --enable-sockets --with-php-config=php-config${PHP_VERSION}
20
+ make
21
+ make install
22
+ done
23
+
24
+ # Cleanup
25
+ rm -rf /tmp/swoole-${SWOOLE_VERSION}
26
+ rm /tmp/swoole-${SWOOLE_VERSION} .tgz
You can’t perform that action at this time.
0 commit comments