Skip to content

Commit

Permalink
Merge pull request #27 from Jeckel-Lab/feature/enable-php8-compatibility
Browse files Browse the repository at this point in the history
Update all deps and config
  • Loading branch information
jeckel authored Dec 11, 2020
2 parents 920c5d7 + 8d429db commit a94d06f
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 10 deletions.
21 changes: 21 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
codecov:
require_ci_to_pass: yes
ci:
- "travis.org"
coverage:
precision: 2
round: down
range: "70...100"

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: no
24 changes: 21 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,34 @@ php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'

cache:
directories:
- $HOME/.composer/cache/files

matrix:
fast_finish: true
include:
- php: 7.2
env: COMPOSER_FLAGS="--prefer-lowest"

before_script:
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-source --dev
- travis_retry composer update $COMPOSER_FLAGS --no-interaction --prefer-dist --dev
- phpenv config-rm xdebug.ini
- if [ "$TRAVIS_PHP_VERSION" == "7.3" ]; then
pecl install xdebug-2.9.8;
echo "zend_extension=xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
echo "XDEBUG_MODE=coverage" > xdebug.ini;
phpenv config-add xdebug.ini;
fi

script:
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
- ./vendor/bin/phpmd src text ./ruleset.xml
- ./vendor/bin/phpcs
- ./vendor/bin/psalm
- if [ "$TRAVIS_PHP_VERSION" == "7.3" ]; then ./vendor/bin/phpunit --coverage-clover coverage.xml; else ./vendor/bin/phpunit; fi

after_success:
- bash <(curl -s https://codecov.io/bash)
- if [ "$TRAVIS_PHP_VERSION" == "7.3" ]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
}
},
"require": {
"php": "^7.2",
"php": "^7.2 || ^8.0",
"psr/event-dispatcher": "^1.0",
"psr/container": "^1.0",
"jeckel-lab/contract": ">=0.1.2"
"jeckel-lab/contract": ">=1.1.1"
},
"require-dev": {
"phpunit/phpunit": "^8.4",
"phpmd/phpmd": "^2.7",
"phpunit/phpunit": "^8.5 || ^9.5",
"phpmd/phpmd": "^2.9",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^3.8 || ^4.0",
"phpro/grumphp": "^0.19.0"
"vimeo/psalm": "^4.3.1",
"phpro/grumphp": "^0.19 || ^1.2.0"
}
}
3 changes: 2 additions & 1 deletion src/Resolver/CommandHandlerResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ public function resolve(Command $command): CommandHandler
assert($instance instanceof CommandHandler, 'Handler should be an instance of CommandHandler');
return $instance;
}

// @codeCoverageIgnoreStart
throw new HandlerNotFoundException(sprintf(
'No command handler instance for %s found in container for %s',
$handler,
get_class($command)
));
// @codeCoverageIgnoreEnd
}

/**
Expand Down

0 comments on commit a94d06f

Please sign in to comment.