-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a 2-step update process to install requirements
The mongodb-adapter has to be installed while ignoring platform reqs, then it can be ignored again, see https://github.com/alcaeus/mongo-php-adapter
- Loading branch information
Showing
2 changed files
with
15 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
#!/usr/bin/env sh | ||
set -ev | ||
|
||
PHP_INI_DIR="$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/" | ||
TRAVIS_INI_FILE="$PHP_INI_DIR/travis.ini" | ||
if [ "$DOCTRINE_ODM" != "" ] | ||
then | ||
composer require "doctrine/mongodb-odm:$DOCTRINE_ODM" --no-update | ||
echo "extension=mongodb.so" >> "$TRAVIS_INI_FILE" | ||
fi | ||
|
||
if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then | ||
PHP_INI_DIR="$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/" | ||
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 | ||
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; fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters