Skip to content

Commit de43101

Browse files
authored
Merge pull request #882 from robfrawley/feature-mongo-php7-and-composer-cleanup
[Travis] Enable mongo unit tests on PHP7 using "mongo" => "mongodb" extension adapter and cleanup composer.json
2 parents 7767b32 + 7be24b8 commit de43101

File tree

2 files changed

+32
-26
lines changed

2 files changed

+32
-26
lines changed

.travis.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ matrix:
4545
env: SYMFONY_VERSION=dev-master
4646

4747
before_install:
48-
- composer self-update
49-
- if [ "${TRAVIS_PHP_VERSION}" == "5.3" ]; then composer remove --no-update --dev satooshi/php-coveralls; fi;
5048
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
51-
- if [ "${SYMFONY_VERSION:0:3}" == "2.3" ]; then composer remove --dev friendsofphp/php-cs-fixer --no-update; fi;
52-
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION}" != "5.3" ]; then composer require --dev league/flysystem:~1.0 --no-update; fi;
53-
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION:0:1}" != "7" ]; then composer require --dev doctrine/mongodb-odm:~1.0 --no-update; yes "" | pecl -q install -f mongo; fi;
54-
- if [ "${SYMFONY_VERSION:-x}" != "x" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
5549
- cp ./.composer/config.json ~/.composer; composer global require "hirak/prestissimo:^0.3"
50+
- if [ "${TRAVIS_PHP_VERSION}" == "5.3" ]; then composer remove --no-update --dev satooshi/php-coveralls; fi;
51+
- if [ "${SYMFONY_VERSION:0:3}" == "2.3" ]; then composer remove --no-update --dev friendsofphp/php-cs-fixer; fi;
52+
- if [ "${SYMFONY_VERSION:-x}" != "x" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
53+
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION:0:3}" != "5.3" ]; then composer require --no-update --dev league/flysystem:~1.0; fi;
54+
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION:0:1}" != "7" ]; then yes "" | pecl -q install -f mongo; composer require --no-update --dev doctrine/mongodb-odm:~1.0; fi;
55+
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION:0:1}" == "7" ]; then yes "" | pecl -q install -f mongodb; travis_retry composer require --dev alcaeus/mongo-php-adapter:~1.0; composer require --no-update --dev doctrine/mongodb-odm:~1.0; fi
5656

5757
install:
58-
- composer update $COMPOSER_FLAGS
58+
- travis_retry composer update $COMPOSER_FLAGS
5959

6060
script:
6161
- SYMFONY_DEPRECATIONS_HELPER=weak ./bin/phpunit -vvv

composer.json

+25-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
22
"name": "liip/imagine-bundle",
33
"type": "symfony-bundle",
4-
"description": "This Bundle assists in imagine manipulation using the imagine library",
5-
"keywords": ["imagine", "image"],
4+
"description": "This bundle provides an image manipulation abstraction toolkit for Symfony-based projects.",
5+
"keywords": [ "imagine", "image", "manipulation", "pictures", "photos", "transformation", "bundle", "symfony", "liip" ],
66
"homepage": "http://liip.ch",
77
"license": "MIT",
8-
"minimum-stability": "dev",
98
"authors": [
109
{
1110
"name": "Liip and other contributors",
1211
"homepage": "https://github.com/liip/LiipImagineBundle/contributors"
1312
}
1413
],
15-
"archive": {
16-
"exclude": ["/Tests"]
14+
"autoload": {
15+
"psr-4": {
16+
"Liip\\ImagineBundle\\": ""
17+
},
18+
"exclude-from-classmap": [ "/Tests/" ]
1719
},
1820
"require": {
1921
"php": "^5.3.9|^7.0",
@@ -28,11 +30,11 @@
2830
"symfony/translation": "~2.3|~3.0"
2931
},
3032
"require-dev": {
31-
"ext-gd": "*",
3233
"amazonwebservices/aws-sdk-for-php": "~1.0",
3334
"aws/aws-sdk-php": "~2.4",
3435
"doctrine/cache": "~1.1",
3536
"doctrine/orm": "~2.3",
37+
"ext-gd": "*",
3638
"friendsofphp/php-cs-fixer": "~2.0",
3739
"phpunit/phpunit": "~4.3",
3840
"psr/log": "~1.0",
@@ -43,25 +45,29 @@
4345
"symfony/dependency-injection": "~2.3|~3.0",
4446
"symfony/form": "~2.3|~3.0",
4547
"symfony/phpunit-bridge": "~2.3|~3.0",
46-
"symfony/yaml": "~2.3|~3.0",
4748
"symfony/validator": "~2.3|~3.0",
48-
"twig/twig": "~1.12"
49+
"symfony/yaml": "~2.3|~3.0",
50+
"twig/twig": "~1.12|~2.0"
4951
},
5052
"suggest": {
51-
"amazonwebservices/aws-sdk-for-php": "Required to use AWS version 1 cache resolver.",
52-
"aws/aws-sdk-php": "Required to use AWS version 2/3 cache resolver.",
53-
"ext-exif": "Required to read metadata from Exif information",
54-
"league/flysystem": "Required to use FlySystem data loader or cache resolver.",
55-
"monolog/monolog": "A psr/log compatible logger is required to enable logging.",
56-
"twig/twig": "Required to use the provided Twig extension. Version 1.12 or greater needed."
57-
},
58-
"autoload": {
59-
"psr-4": { "Liip\\ImagineBundle\\": "" },
60-
"exclude-from-classmap": ["/Tests/"]
53+
"alcaeus/mongo-php-adapter": "required on PHP >= 7.0 to use mongo components with mongodb extension",
54+
"amazonwebservices/aws-sdk-for-php": "required to use AWS version 1 cache resolver",
55+
"aws/aws-sdk-php": "required to use AWS version 2/3 cache resolver",
56+
"doctrine/mongodb-odm": "required to use mongodb-backed doctrine components",
57+
"ext-exif": "required to read EXIF metadata from images",
58+
"ext-gd": "required to use gd driver",
59+
"ext-gmagick": "required to use gmagick driver",
60+
"ext-imagick": "required to use imagick driver",
61+
"ext-mongo": "required for mongodb components on PHP <7.0",
62+
"ext-mongodb": "required for mongodb components on PHP >=7.0",
63+
"league/flysystem": "required to use FlySystem data loader or cache resolver",
64+
"monolog/monolog": "A psr/log compatible logger is required to enable logging",
65+
"twig/twig": "required to use the provided Twig extension. Version 1.12 or greater needed"
6166
},
67+
"minimum-stability": "dev",
6268
"config": {
6369
"bin-dir": "bin",
64-
"sort-packages" : true
70+
"sort-packages": true
6571
},
6672
"extra": {
6773
"branch-alias": {

0 commit comments

Comments
 (0)