Search code examples
phprediscontinuous-integrationtravis-cipecl

How to set or skip a package configuration on PECL?


I'm running pecl install redis on Travis, but its hanging on:

enable igbinary serializer support? [no] : 

How can I set or skip this configuration?


Solution

  • m6w6's answer will respond "yes" (or "no") to every configuration option.

    If this isn't what you want, you should use the --configureoptions flag of pecl install.

    You'll want to find the package.xml for your package to see the configurable options and their defaults. For redis, you'd go here:

    https://github.com/phpredis/phpredis/blob/develop/package.xml

    Search for the <configureoption> tags, which in this case are:

    <configureoption name="enable-redis-igbinary" prompt="enable igbinary serializer support?" default="no"/>
    <configureoption name="enable-redis-lzf" prompt="enable lzf compression support?" default="no"/>
    <configureoption name="enable-redis-zstd" prompt="enable zstd compression support?" default="no"/>
    

    You can then pass these options along to the install command like so:

    pecl install --configureoptions 'enable-redis-igbinary="yes" enable-redis-lzf="no" enable-redis-zstd="no"' redis