File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,16 @@ COPY --from=composer ["/usr/bin/composer", "/usr/bin/composer"]
107
107
# the mysql tests a separate machine running mysql server 5.6 is required.
108
108
RUN docker-php-ext-install pdo pdo_mysql
109
109
110
- # redis
111
- RUN pecl install redis && docker-php-ext-enable redis
110
+ # install redis extension required by test_redis:
111
+ RUN \
112
+ php_cmp=$(php -r "echo version_compare(PHP_VERSION, '7.4.0', '>=');" ); \
113
+ if [ "$php_cmp" = 1 ]; then \
114
+ # install latest redis for PHPs >= 7.4
115
+ echo 'no' | pecl install redis; \
116
+ else \
117
+ # install redis-4.3.0 - last one with support for php 7.2
118
+ echo 'no' | pecl install redis-4.3.0; \
119
+ fi && docker-php-ext-enable redis
112
120
113
121
# memcache
114
122
# Pre 8.0 requires 4.0.5.2
You can’t perform that action at this time.
0 commit comments