Skip to content

Commit 900fed5

Browse files
committed
Enable igbinary serializer for redis
It comes disabled by default and Moodle does support to use it as alternative serializer. Covered with test.
1 parent f46595d commit 900fed5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

root/tmp/setup/php-extensions.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,15 @@ docker-php-ext-configure ldap
5858
docker-php-ext-install -j$(nproc) ldap
5959

6060
# APCu, igbinary, Memcached, MongoDB, PCov, Redis, Solr, timezonedb, uuid, XMLRPC (beta)
61-
pecl install apcu igbinary memcached mongodb pcov redis solr timezonedb uuid xmlrpc-beta
62-
docker-php-ext-enable apcu igbinary memcached mongodb pcov redis solr timezonedb uuid xmlrpc
61+
pecl install apcu igbinary memcached mongodb pcov solr timezonedb uuid xmlrpc-beta
62+
docker-php-ext-enable apcu igbinary memcached mongodb pcov solr timezonedb uuid xmlrpc
6363

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

66+
# Install the redis extension enabling igbinary support.
67+
pecl install --configureoptions 'enable-redis-igbinary="yes"' redis
68+
docker-php-ext-enable redis
69+
6670
# Install, but do not enable, xdebug and xhprof.
6771
pecl install xdebug xhprof
6872

tests/fixtures/test.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
}
4343
setlocale(LC_TIME, 'en_AU.UTF-8');
4444

45+
if (!defined('\Redis::SERIALIZER_IGBINARY')) {
46+
$missing[] = 'redis support for igbinary serializer';
47+
}
48+
4549
if (php_sapi_name() === 'cli') {
4650
if (empty($missing)) {
4751
echo "OK\n";

0 commit comments

Comments
 (0)