Skip to content

Commit

Permalink
Merge pull request #72 from VBoss/upgrade-nette
Browse files Browse the repository at this point in the history
Upgrade nette
  • Loading branch information
Spamercz authored Jun 11, 2021
2 parents e8dab30 + ab4634a commit 6501297
Show file tree
Hide file tree
Showing 50 changed files with 1,515 additions and 1,557 deletions.
55 changes: 27 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,54 @@ sudo: false
cache:
directories:
- $HOME/.composer/cache
- $HOME/phpcs-cache

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

services:
- rabbitmq
addons:
apt:
packages:
- rabbitmq-server

env:
matrix:
- NETTE=nette-2.4-dev
- NETTE=nette-2.4
- RUN_TESTS=1 # dev
- RUN_TESTS=1 COMPOSER_EXTRA_ARGS="--prefer-stable"
- RUN_TESTS=1 COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"

matrix:
fast_finish: true
include:
- php: 5.6
env: NETTE=nette-2.4 COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
- php: 7.0
env: NETTE=nette-2.4 COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg"
- php: 7.3
env: COMPOSER_EXTRA_ARGS="" COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg"
- php: 7.3
env: COMPOSER_EXTRA_ARGS="" PHPSTAN=1 RUN_TESTS=0
- php: 7.3
env: COMPOSER_EXTRA_ARGS="" CODING_STANDARD=1 RUN_TESTS=0
exclude:
- php: 7.1
env: NETTE=nette-2.4-dev
- php: 7.1
env: NETTE=nette-2.4
- php: 7.2
env: NETTE=nette-2.4-dev
- php: 7.2
env: NETTE=nette-2.4
- php: 7.3
env: COMPOSER_EXTRA_ARGS=""
allow_failures:
- env: RUN_TESTS=1

before_install:
- travis_retry composer self-update
- wget -O /tmp/composer-nette https://raw.githubusercontent.com/Kdyby/TesterExtras/master/bin/composer-nette.php
- php /tmp/composer-nette

install:
- travis_retry composer update --no-interaction --prefer-dist $COMPOSER_EXTRA_ARGS
- travis_retry composer create-project --no-interaction jakub-onderka/php-parallel-lint /tmp/php-parallel-lint
- travis_retry composer create-project --no-interaction kdyby/code-checker /tmp/code-checker
- travis_retry wget -O /tmp/coveralls.phar https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
- travis_retry composer update --no-interaction --no-suggest --no-progress --prefer-dist $COMPOSER_EXTRA_ARGS # update because we may need --prefer-lowest option

script:
- vendor/bin/tester $COVERAGE -s -p ${TESTER_RUNTIME:-php} -c ./tests/php.ini-unix ./tests/KdybyTests/
- php /tmp/php-parallel-lint/parallel-lint.php -e php,phpt --exclude vendor .
- php /tmp/code-checker/src/code-checker.php --short-arrays
- if [ "$PHPSTAN" = "1" ]; then vendor/bin/phpstan analyse -l 2 -c phpstan.neon src tests/KdybyTests; fi
- if [ "$CODING_STANDARD" = "1" ]; then php vendor/bin/phpcs --standard=ruleset.xml --cache=$HOME/phpcs-cache/.phpcs-cache --encoding=utf-8 -sp src tests/KdybyTests; fi
- if [ "$CODING_STANDARD" = "1" ]; then vendor/bin/parallel-lint -e php,phpt --exclude vendor .; fi
- if [ "$RUN_TESTS" = "1" ]; then vendor/bin/tester $COVERAGE -s -p ${TESTER_RUNTIME:-php} -c ./tests/php.ini-unix ./tests/KdybyTests/; fi

after_script:
- if [ "$COVERAGE" != "" ]; then php /tmp/coveralls.phar --verbose --config tests/.coveralls.yml || true; fi
- if [ "$COVERAGE" != "" ]; then vendor/bin/php-coveralls --verbose --config tests/.coveralls.yml || true; fi

after_failure:
- 'for i in $(find ./tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done'
64 changes: 30 additions & 34 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,54 +16,50 @@
}
],
"require": {
"php": ">=5.4",
"nette/di": "~2.4@dev",
"nette/utils": "~2.4@dev",
"php": "^7.1",
"nette/di": "~2.4.10 || ^3.0",
"nette/utils": "^3.0",

"php-amqplib/php-amqplib": "~2.6.2"
},
"require-dev": {
"nette/application": "~2.4@dev",
"nette/bootstrap": "~2.4@dev",
"nette/caching": "~2.4@dev",
"nette/component-model": "~2.3@dev",
"nette/database": "~2.4@dev",
"nette/deprecated": "~2.3@dev",
"nette/di": "~2.4@dev",
"nette/finder": "~2.4@dev",
"nette/forms": "~2.4@dev",
"nette/http": "~2.4@dev",
"nette/mail": "~2.4@dev",
"nette/neon": "~2.4@dev",
"nette/php-generator": "~2.4@dev",
"nette/reflection": "~2.4@dev",
"nette/robot-loader": "~2.4@dev",
"nette/safe-stream": "~2.3@dev",
"nette/security": "~2.4@dev",
"nette/tokenizer": "~2.3@dev",
"nette/utils": "~2.4@dev",
"latte/latte": "~2.4@dev",
"tracy/tracy": "~2.4@dev",
"kdyby/console": "~2.8",

"nette/tester": "~1.3@rc",
"mockery/mockery": "~0.9.1",
"kdyby/console": "~2.5@dev"
"nette/bootstrap": "~2.4 || ~3.0",
"latte/latte": "~2.4",
"tracy/tracy": "~2.4",
"phpstan/phpstan-shim": "^0.11.4",
"kdyby/coding-standard": "dev-master",
"php-coveralls/php-coveralls": "^2.1",
"nette/tester": "^2.3.2",
"mockery/mockery": "~1.3.0",
"jakub-onderka/php-parallel-lint": "^1.0",
"typo3/class-alias-loader": "^1.0",
"nette/caching": "^3.0"
},
"support": {
"email": "[email protected]",
"issues": "https://github.com/Kdyby/RabbitMq/issues"
},
"autoload": {
"psr-0": {
"Kdyby\\RabbitMq\\": "src/"
},
"classmap": [
"src/Kdyby/RabbitMq/exceptions.php"
]
"psr-4": {
"Kdyby\\RabbitMq\\": "src/Kdyby/RabbitMq"
}
},
"autoload-dev": {
"psr-4": {
"KdybyTests\\RabbitMq\\": "tests/KdybyTests/RabbitMq"
}
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "1.3-dev"
},
"typo3/class-alias-loader": {
"class-alias-maps": [
"src/Kdyby/RabbitMq/DI/ClassAliasMap.php"
]
}
}
}
8 changes: 8 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
parameters:
ignoreErrors:
- '#Parameter \$callback of method KdybyTests\\RabbitMq\\Mock\\ChannelMock\:\:basic_consume\(\) has invalid typehint type PhpAmqpLib\\Channel\\callback.#'

excludes_analyse:
- *src/Kdyby/RabbitMq/DI/ClassAliasMap.php


4 changes: 4 additions & 0 deletions ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<ruleset name="Kdyby/Console">
<rule ref="vendor/kdyby/coding-standard/ruleset.xml"/>
</ruleset>
Loading

0 comments on commit 6501297

Please sign in to comment.