Skip to content

Commit 6501297

Browse files
authored
Merge pull request #72 from VBoss/upgrade-nette
Upgrade nette
2 parents e8dab30 + ab4634a commit 6501297

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1515
-1557
lines changed

.travis.yml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,54 @@ sudo: false
55
cache:
66
directories:
77
- $HOME/.composer/cache
8+
- $HOME/phpcs-cache
89

910
php:
10-
- 5.6
11-
- 7.0
1211
- 7.1
1312
- 7.2
13+
- 7.3
14+
- 7.4
1415

15-
services:
16-
- rabbitmq
16+
addons:
17+
apt:
18+
packages:
19+
- rabbitmq-server
1720

1821
env:
1922
matrix:
20-
- NETTE=nette-2.4-dev
21-
- NETTE=nette-2.4
23+
- RUN_TESTS=1 # dev
24+
- RUN_TESTS=1 COMPOSER_EXTRA_ARGS="--prefer-stable"
25+
- RUN_TESTS=1 COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
2226

2327
matrix:
28+
fast_finish: true
2429
include:
25-
- php: 5.6
26-
env: NETTE=nette-2.4 COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
27-
- php: 7.0
28-
env: NETTE=nette-2.4 COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg"
30+
- php: 7.3
31+
env: COMPOSER_EXTRA_ARGS="" COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg"
32+
- php: 7.3
33+
env: COMPOSER_EXTRA_ARGS="" PHPSTAN=1 RUN_TESTS=0
34+
- php: 7.3
35+
env: COMPOSER_EXTRA_ARGS="" CODING_STANDARD=1 RUN_TESTS=0
2936
exclude:
30-
- php: 7.1
31-
env: NETTE=nette-2.4-dev
32-
- php: 7.1
33-
env: NETTE=nette-2.4
34-
- php: 7.2
35-
env: NETTE=nette-2.4-dev
36-
- php: 7.2
37-
env: NETTE=nette-2.4
37+
- php: 7.3
38+
env: COMPOSER_EXTRA_ARGS=""
39+
allow_failures:
40+
- env: RUN_TESTS=1
3841

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

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

5048
script:
51-
- vendor/bin/tester $COVERAGE -s -p ${TESTER_RUNTIME:-php} -c ./tests/php.ini-unix ./tests/KdybyTests/
52-
- php /tmp/php-parallel-lint/parallel-lint.php -e php,phpt --exclude vendor .
53-
- php /tmp/code-checker/src/code-checker.php --short-arrays
49+
- if [ "$PHPSTAN" = "1" ]; then vendor/bin/phpstan analyse -l 2 -c phpstan.neon src tests/KdybyTests; fi
50+
- 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
51+
- if [ "$CODING_STANDARD" = "1" ]; then vendor/bin/parallel-lint -e php,phpt --exclude vendor .; fi
52+
- if [ "$RUN_TESTS" = "1" ]; then vendor/bin/tester $COVERAGE -s -p ${TESTER_RUNTIME:-php} -c ./tests/php.ini-unix ./tests/KdybyTests/; fi
5453

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

5857
after_failure:
5958
- 'for i in $(find ./tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done'

composer.json

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,54 +16,50 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=5.4",
20-
"nette/di": "~2.4@dev",
21-
"nette/utils": "~2.4@dev",
19+
"php": "^7.1",
20+
"nette/di": "~2.4.10 || ^3.0",
21+
"nette/utils": "^3.0",
2222

2323
"php-amqplib/php-amqplib": "~2.6.2"
2424
},
2525
"require-dev": {
26-
"nette/application": "~2.4@dev",
27-
"nette/bootstrap": "~2.4@dev",
28-
"nette/caching": "~2.4@dev",
29-
"nette/component-model": "~2.3@dev",
30-
"nette/database": "~2.4@dev",
31-
"nette/deprecated": "~2.3@dev",
32-
"nette/di": "~2.4@dev",
33-
"nette/finder": "~2.4@dev",
34-
"nette/forms": "~2.4@dev",
35-
"nette/http": "~2.4@dev",
36-
"nette/mail": "~2.4@dev",
37-
"nette/neon": "~2.4@dev",
38-
"nette/php-generator": "~2.4@dev",
39-
"nette/reflection": "~2.4@dev",
40-
"nette/robot-loader": "~2.4@dev",
41-
"nette/safe-stream": "~2.3@dev",
42-
"nette/security": "~2.4@dev",
43-
"nette/tokenizer": "~2.3@dev",
44-
"nette/utils": "~2.4@dev",
45-
"latte/latte": "~2.4@dev",
46-
"tracy/tracy": "~2.4@dev",
26+
"kdyby/console": "~2.8",
4727

48-
"nette/tester": "~1.3@rc",
49-
"mockery/mockery": "~0.9.1",
50-
"kdyby/console": "~2.5@dev"
28+
"nette/bootstrap": "~2.4 || ~3.0",
29+
"latte/latte": "~2.4",
30+
"tracy/tracy": "~2.4",
31+
"phpstan/phpstan-shim": "^0.11.4",
32+
"kdyby/coding-standard": "dev-master",
33+
"php-coveralls/php-coveralls": "^2.1",
34+
"nette/tester": "^2.3.2",
35+
"mockery/mockery": "~1.3.0",
36+
"jakub-onderka/php-parallel-lint": "^1.0",
37+
"typo3/class-alias-loader": "^1.0",
38+
"nette/caching": "^3.0"
5139
},
5240
"support": {
5341
"email": "filip@prochazka.su",
5442
"issues": "https://github.com/Kdyby/RabbitMq/issues"
5543
},
5644
"autoload": {
57-
"psr-0": {
58-
"Kdyby\\RabbitMq\\": "src/"
59-
},
60-
"classmap": [
61-
"src/Kdyby/RabbitMq/exceptions.php"
62-
]
45+
"psr-4": {
46+
"Kdyby\\RabbitMq\\": "src/Kdyby/RabbitMq"
47+
}
6348
},
49+
"autoload-dev": {
50+
"psr-4": {
51+
"KdybyTests\\RabbitMq\\": "tests/KdybyTests/RabbitMq"
52+
}
53+
},
54+
"minimum-stability": "dev",
6455
"extra": {
6556
"branch-alias": {
66-
"dev-master": "1.0-dev"
57+
"dev-master": "1.3-dev"
58+
},
59+
"typo3/class-alias-loader": {
60+
"class-alias-maps": [
61+
"src/Kdyby/RabbitMq/DI/ClassAliasMap.php"
62+
]
6763
}
6864
}
6965
}

phpstan.neon

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
parameters:
2+
ignoreErrors:
3+
- '#Parameter \$callback of method KdybyTests\\RabbitMq\\Mock\\ChannelMock\:\:basic_consume\(\) has invalid typehint type PhpAmqpLib\\Channel\\callback.#'
4+
5+
excludes_analyse:
6+
- *src/Kdyby/RabbitMq/DI/ClassAliasMap.php
7+
8+

ruleset.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Kdyby/Console">
3+
<rule ref="vendor/kdyby/coding-standard/ruleset.xml"/>
4+
</ruleset>

0 commit comments

Comments
 (0)