From 64f788d5491f005bcbf88ace46ffa796f9fa2ebd Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Thu, 27 Jul 2017 18:07:55 +0300 Subject: [PATCH 1/3] [composer] Add extensions to platform config. --- composer.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 49c274e6d..bbc95e5a0 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,12 @@ } }, "config": { - "bin-dir": "bin" + "bin-dir": "bin", + "platform": { + "ext-amqp": "1.7", + "ext-gearman": "1.1", + "ext-rdkafka": "3.3" + } }, "repositories": [ { From e9a0c257555a1d61d65c3c3c58593731d103cbd7 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Thu, 27 Jul 2017 18:14:13 +0300 Subject: [PATCH 2/3] [travis] remove platforms req option. now it takes php ver into account --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 095fb584a..d80e9e708 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ install: - rm $HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; - echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - composer require symfony/symfony:${SYMFONY_VERSION} --no-update - - composer install --ignore-platform-reqs # ext-amqp is not installed + - composer install - if [ "$FUNCTIONAL_TESTS" = true ]; then docker --version; fi - if [ "$FUNCTIONAL_TESTS" = true ]; then docker-compose --version; fi - if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -b; fi From dccd58b1333aed53632f1879f64afc6702b92bda Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Thu, 27 Jul 2017 18:19:29 +0300 Subject: [PATCH 3/3] require php stan only when it is needed. --- .travis.yml | 2 +- composer.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d80e9e708..d10e9a3fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ install: - if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -b; fi script: - - if [ "$PHPSTAN" = true ]; then php -d memory_limit=512M bin/phpstan analyse -l 1 -c phpstan.neon pkg/amqp-ext pkg/async-event-dispatcher pkg/dbal pkg/enqueue pkg/enqueue-bundle pkg/fs pkg/gearman pkg/job-queue pkg/null pkg/pheanstalk pkg/redis pkg/simple-client pkg/sqs pkg/stomp pkg/test pkg/rdkafka; fi + - if [ "$PHPSTAN" = true ]; then composer require "phpstan/phpstan:0.7.0" ; php -d memory_limit=512M bin/phpstan analyse -l 1 -c phpstan.neon pkg/amqp-ext pkg/async-event-dispatcher pkg/dbal pkg/enqueue pkg/enqueue-bundle pkg/fs pkg/gearman pkg/job-queue pkg/null pkg/pheanstalk pkg/redis pkg/simple-client pkg/sqs pkg/stomp pkg/test pkg/rdkafka; fi - if [ "$PHP_CS_FIXER" = true ]; then IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS; fi - if [ "$PHP_CS_FIXER" = true ]; then ./bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"; fi - if [ "$UNIT_TESTS" = true ]; then bin/phpunit --exclude-group=functional; fi diff --git a/composer.json b/composer.json index bbc95e5a0..5b1aea2ef 100644 --- a/composer.json +++ b/composer.json @@ -35,8 +35,7 @@ "symfony/event-dispatcher": "^2.8|^3", "symfony/console": "^2.8|^3", "friendsofphp/php-cs-fixer": "^2", - "empi89/php-amqp-stubs": "*@dev", - "phpstan/phpstan": "^0.7.0" + "empi89/php-amqp-stubs": "*@dev" }, "autoload": { "files": [