Skip to content

Commit a94d06f

Browse files
authored
Merge pull request #27 from Jeckel-Lab/feature/enable-php8-compatibility
Update all deps and config
2 parents 920c5d7 + 8d429db commit a94d06f

File tree

4 files changed

+50
-10
lines changed

4 files changed

+50
-10
lines changed

.github/codecov.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
ci:
4+
- "travis.org"
5+
coverage:
6+
precision: 2
7+
round: down
8+
range: "70...100"
9+
10+
parsers:
11+
gcov:
12+
branch_detection:
13+
conditional: yes
14+
loop: yes
15+
method: no
16+
macro: no
17+
18+
comment:
19+
layout: "reach,diff,flags,files,footer"
20+
behavior: default
21+
require_changes: no

.travis.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,34 @@ php:
33
- '7.2'
44
- '7.3'
55
- '7.4'
6+
- '8.0'
7+
8+
cache:
9+
directories:
10+
- $HOME/.composer/cache/files
11+
12+
matrix:
13+
fast_finish: true
14+
include:
15+
- php: 7.2
16+
env: COMPOSER_FLAGS="--prefer-lowest"
617

718
before_script:
819
- travis_retry composer self-update
9-
- travis_retry composer install --no-interaction --prefer-source --dev
20+
- travis_retry composer update $COMPOSER_FLAGS --no-interaction --prefer-dist --dev
21+
- phpenv config-rm xdebug.ini
22+
- if [ "$TRAVIS_PHP_VERSION" == "7.3" ]; then
23+
pecl install xdebug-2.9.8;
24+
echo "zend_extension=xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
25+
echo "XDEBUG_MODE=coverage" > xdebug.ini;
26+
phpenv config-add xdebug.ini;
27+
fi
1028

1129
script:
12-
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
1330
- ./vendor/bin/phpmd src text ./ruleset.xml
1431
- ./vendor/bin/phpcs
1532
- ./vendor/bin/psalm
33+
- if [ "$TRAVIS_PHP_VERSION" == "7.3" ]; then ./vendor/bin/phpunit --coverage-clover coverage.xml; else ./vendor/bin/phpunit; fi
1634

1735
after_success:
18-
- bash <(curl -s https://codecov.io/bash)
36+
- if [ "$TRAVIS_PHP_VERSION" == "7.3" ]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
}
2121
},
2222
"require": {
23-
"php": "^7.2",
23+
"php": "^7.2 || ^8.0",
2424
"psr/event-dispatcher": "^1.0",
2525
"psr/container": "^1.0",
26-
"jeckel-lab/contract": ">=0.1.2"
26+
"jeckel-lab/contract": ">=1.1.1"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^8.4",
30-
"phpmd/phpmd": "^2.7",
29+
"phpunit/phpunit": "^8.5 || ^9.5",
30+
"phpmd/phpmd": "^2.9",
3131
"squizlabs/php_codesniffer": "^3.5",
32-
"vimeo/psalm": "^3.8 || ^4.0",
33-
"phpro/grumphp": "^0.19.0"
32+
"vimeo/psalm": "^4.3.1",
33+
"phpro/grumphp": "^0.19 || ^1.2.0"
3434
}
3535
}

src/Resolver/CommandHandlerResolver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ public function resolve(Command $command): CommandHandler
5454
assert($instance instanceof CommandHandler, 'Handler should be an instance of CommandHandler');
5555
return $instance;
5656
}
57-
57+
// @codeCoverageIgnoreStart
5858
throw new HandlerNotFoundException(sprintf(
5959
'No command handler instance for %s found in container for %s',
6060
$handler,
6161
get_class($command)
6262
));
63+
// @codeCoverageIgnoreEnd
6364
}
6465

6566
/**

0 commit comments

Comments
 (0)