Skip to content

Commit

Permalink
Enable both mongo.so and mongodb.so
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Nov 8, 2017
1 parent 3d6e5c6 commit 0cc46e8
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .travis/before_install_test.sh
Expand Up @@ -6,22 +6,18 @@ if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then
TRAVIS_INI_FILE="$PHP_INI_DIR/travis.ini"
echo "memory_limit=3072M" >> "$TRAVIS_INI_FILE"


if [ "$TRAVIS_PHP_VERSION" '<' '7.0' ]; then
echo "extension=mongo.so" >> "$TRAVIS_INI_FILE"
else
echo "extension=mongodb.so" >> "$TRAVIS_INI_FILE"

# Backwards compatibility with old mongo extension
composer require "alcaeus/mongo-php-adapter" --no-update
fi
fi
echo "extension=mongo.so" >> "$TRAVIS_INI_FILE"
echo "extension=mongodb.so" >> "$TRAVIS_INI_FILE"

# Backwards compatibility with old mongo extension
composer require "alcaeus/mongo-php-adapter" --no-update
fi

sed --in-place "s/\"dev-master\":/\"dev-${TRAVIS_COMMIT}\":/" composer.json

if [ "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
if [ "$DOCTRINE_ODM" != "" ]
then
composer require "doctrine/mongodb-odm:$DOCTRINE_ODM" --no-update
pecl install -f mongodb-stable
fi

0 comments on commit 0cc46e8

Please sign in to comment.