Skip to content

Commit

Permalink
Enable igbinary serializer for redis
Browse files Browse the repository at this point in the history
It comes disabled by default and Moodle does support
to use it as alternative serializer. Covered with test.
  • Loading branch information
stronk7 committed Nov 17, 2023
1 parent 8d74230 commit c6f4910
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions root/tmp/setup/php-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ docker-php-ext-configure ldap
docker-php-ext-install -j$(nproc) ldap

# APCu, igbinary, Memcached, PCov, Redis, Solr, timezonedb, uuid, XMLRPC (beta)
pecl install apcu igbinary memcached pcov redis solr timezonedb uuid xmlrpc-beta
docker-php-ext-enable apcu igbinary memcached pcov redis solr timezonedb uuid xmlrpc
pecl install apcu igbinary memcached pcov solr timezonedb uuid xmlrpc-beta
docker-php-ext-enable apcu igbinary memcached pcov solr timezonedb uuid xmlrpc

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

# Install the redis extension enabling igbinary support.
pecl install --configureoptions 'enable-redis-igbinary="yes"' redis
docker-php-ext-enable redis

# Install, but do not enable, xdebug and xhprof.
pecl install xdebug xhprof

Expand Down
4 changes: 4 additions & 0 deletions tests/fixtures/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
}
setlocale(LC_TIME, 'en_AU.UTF-8');

if (!defined('\Redis::SERIALIZER_IGBINARY')) {
$missing[] = 'redis support for igbinary serializer';
}

if (php_sapi_name() === 'cli') {
if (empty($missing)) {
echo "OK\n";
Expand Down

0 comments on commit c6f4910

Please sign in to comment.