Skip to content

Commit c555cdd

Browse files
committed
Reconcile master with 8.0-buster
and set PHP 7.2 EOL
1 parent eb6ae89 commit c555cdd

File tree

6 files changed

+36
-14
lines changed

6 files changed

+36
-14
lines changed

Dockerfile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4-apache-buster
1+
FROM php:8.0-apache-buster
22

33
ADD root/ /
44
# Fix the original permissions of /tmp, the PHP default upload tmp dir.
@@ -9,6 +9,20 @@ RUN apt-get update && apt-get install -y \
99
git \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12+
# Install pickle as an easier alternative to PECL, that is not
13+
# available any more for PHP 8 and up. Some alternatives searched were:
14+
# - https://olvlvl.com/2019-06-docker-pecl-without-pecl
15+
# - https://github.com/FriendsOfPHP/pickle
16+
# - manually "curl https://pecl.php.net/get/xxxx && tar && docker-php-ext-install xxx"
17+
# Of course, if the images end using some alternative, we'll switch to it. Just right now
18+
# there isn't such an alternative.a
19+
#
20+
# Update 20201126: Finally, see https://github.com/docker-library/php/issues/1087 it seems that pear/pecl
21+
# continues being availbale with php8, so we are going to continue using it. The previous comments as
22+
# left in case we need to find an alternative way to install PECL stuff and there isn't any official.
23+
# For an example of php80-rc5 near complete, using pickle instead of pear/pecl, look to:
24+
# https://github.com/stronk7/moodle-php-apache/tree/8.0-buster-pickle-version
25+
1226
# Setup the required extensions.
1327
ARG DEBIAN_FRONTEND=noninteractive
1428
RUN /tmp/setup/php-extensions.sh

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ A Moodle PHP environment configured for Moodle development based on [Official PH
66

77
| PHP Version | Variant | Tags | Status | Notes |
88
|--------------|---------|------------------|--------|-------|
9+
| PHP 8.0 | Buster | 8.0, 8.0-buster | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=8.0-buster)](https://travis-ci.com/moodlehq/moodle-php-apache)|
910
| PHP 7.4 | Buster | 7.4, 7.4-buster | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.4-buster)](https://travis-ci.com/moodlehq/moodle-php-apache)|
1011
| PHP 7.3 | Buster | 7.3, 7.3-buster | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.3-buster)](https://travis-ci.com/moodlehq/moodle-php-apache)|
11-
| PHP 7.2 | Buster | 7.2, 7.2-buster | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.2-buster)](https://travis-ci.com/moodlehq/moodle-php-apache)|
12+
| PHP 7.2 | Buster | 7.2, 7.2-buster | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.2-buster)](https://travis-ci.com/moodlehq/moodle-php-apache)|PHP 7.2 EOL|
1213
| PHP 7.1 | Buster | 7.1, 7.1-buster | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.1-buster)](https://travis-ci.com/moodlehq/moodle-php-apache)|PHP 7.1 EOL|
1314
| PHP 7.3 | Stretch | 7.3-stretch | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.3-stretch)](https://travis-ci.com/moodlehq/moodle-php-apache)|Stretch EOL|
14-
| PHP 7.2 | Stretch | 7.2-stretch | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.2-stretch)](https://travis-ci.com/moodlehq/moodle-php-apache)|Stretch EOL|
15+
| PHP 7.2 | Stretch | 7.2-stretch | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.2-stretch)](https://travis-ci.com/moodlehq/moodle-php-apache)|Stretch and PHP 7.2 EOL|
1516
| PHP 7.1 | Stretch | 7.1-stretch | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.1-stretch)](https://travis-ci.com/moodlehq/moodle-php-apache)|Stretch and PHP 7.1 EOL|
1617
| PHP 7.0 | Stretch | 7.0, 7.0-stretch | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=7.0-stretch)](https://travis-ci.com/moodlehq/moodle-php-apache)|Stretch and PHP 7.0 EOL|
1718
| PHP 5.6 | Stretch | 5.6, 5.6-stretch | [![Build Status](https://travis-ci.com/moodlehq/moodle-php-apache.svg?branch=5.6-stretch)](https://travis-ci.com/moodlehq/moodle-php-apache)|Stretch and PHP 5.6 EOL|

root/tmp/setup/oci8-extension.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ rm /tmp/instantclient-sqlplus-linux.x64-19.6.0.0.0dbru.zip
2020
ln -s /usr/local/instantclient_19_6 /usr/local/instantclient
2121
ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus
2222

23-
echo 'instantclient,/usr/local/instantclient' | pecl install oci8 && docker-php-ext-enable oci8
23+
echo 'instantclient,/usr/local/instantclient' | pecl install oci8
24+
docker-php-ext-enable oci8
2425
echo 'oci8.statement_cache_size = 0' >> /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini

root/tmp/setup/php-extensions.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ echo 'en_AU.UTF-8 UTF-8' >> /etc/locale.gen
4141
locale-gen
4242

4343
echo "Installing php extensions"
44+
45+
# ZIP
46+
docker-php-ext-configure zip --with-zip
47+
docker-php-ext-install zip
48+
4449
docker-php-ext-install -j$(nproc) \
4550
intl \
4651
mysqli \
4752
opcache \
4853
pgsql \
4954
soap \
50-
xsl \
51-
xmlrpc
55+
xsl
5256

5357
# GD.
5458
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
@@ -58,13 +62,14 @@ docker-php-ext-install -j$(nproc) gd
5862
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/
5963
docker-php-ext-install -j$(nproc) ldap
6064

61-
# Memcached, MongoDB, Redis, APCu, igbinary, solr, uuid
65+
# Memcached, MongoDB, Redis, APCu, igbinary, solr, uuid.
6266
pecl install memcached mongodb redis apcu igbinary solr uuid
6367
docker-php-ext-enable memcached mongodb redis apcu igbinary solr uuid
6468

65-
# ZIP
66-
docker-php-ext-configure zip --with-zip
67-
docker-php-ext-install zip
69+
# xmlrpc -- not existing as of 8.0.0 release (not yet @ PECL, https://php.watch/versions/ 8.0#xmlrpc)
70+
# (once available add it to the previous pecl command)
71+
#pecl install xmlrpc
72+
#docker-php-ext-enable xmlrpc
6873

6974
echo 'apc.enable_cli = On' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
7075

root/tmp/setup/sqlsrv-extension.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ ACCEPT_EULA=Y apt-get install -y msodbcsql17
1515

1616
ln -fsv /opt/mssql-tools/bin/* /usr/bin
1717

18-
# Need 5.7.0preview (or later) for PHP 7.4 support
19-
pecl install sqlsrv-5.8.1
18+
# Need 5.9.0preview1 (or later) for PHP 8.0 support
19+
pecl install sqlsrv-5.9.0preview1
2020
docker-php-ext-enable sqlsrv

tests/fixtures/test.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
'oci8',
1313
'pgsql',
1414
'redis',
15-
'solr',
1615
'soap',
16+
'sodium',
17+
'solr',
1718
'sqlsrv',
1819
'xsl',
19-
'xmlrpc',
20+
// 'xmlrpc', -- not existing as of 8.0.0 release (not yet @ PECL, https://php.watch/versions/8.0#xmlrpc)
2021
'zip',
2122
'uuid'
2223
];

0 commit comments

Comments
 (0)