Skip to content

Commit c6f4910

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 8d74230 commit c6f4910

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, PCov, Redis, Solr, timezonedb, uuid, XMLRPC (beta)
61-
pecl install apcu igbinary memcached pcov redis solr timezonedb uuid xmlrpc-beta
62-
docker-php-ext-enable apcu igbinary memcached pcov redis solr timezonedb uuid xmlrpc
61+
pecl install apcu igbinary memcached pcov solr timezonedb uuid xmlrpc-beta
62+
docker-php-ext-enable apcu igbinary memcached 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
@@ -41,6 +41,10 @@
4141
}
4242
setlocale(LC_TIME, 'en_AU.UTF-8');
4343

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

0 commit comments

Comments
 (0)