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.

Fixes #182
  • Loading branch information
stronk7 committed Nov 17, 2023
1 parent 1e760c4 commit 97cf6f7
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 @@ -59,11 +59,15 @@ docker-php-ext-install -j$(nproc) ldap

# APCu, igbinary, Memcached, PCov, Redis, Solr, timezonedb, uuid
# Note: Missing as of 2023-06-17: solr
pecl install apcu igbinary memcached pcov redis timezonedb uuid
docker-php-ext-enable apcu igbinary memcached pcov redis timezonedb uuid
pecl install apcu igbinary memcached pcov timezonedb uuid
docker-php-ext-enable apcu igbinary memcached pcov timezonedb uuid

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 @@ -40,6 +40,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 97cf6f7

Please sign in to comment.