Skip to content

Commit

Permalink
Update CI to check against PHP 8.1 (#4)
Browse files Browse the repository at this point in the history
* Update CI to check against PHP 8.1

* Fixed PHPStan
  • Loading branch information
ecourtial authored Mar 6, 2022
1 parent 249e64f commit 0837ffa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
24 changes: 23 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ executors:
- image: php:8.0-cli
working_directory: ~/repo

php81:
docker:
- image: php:8.1-cli
working_directory: ~/repo

## COMMANDS
commands:

Expand Down Expand Up @@ -144,6 +149,17 @@ jobs:
- restore-composer-cache
- phpunit

composer81:
executor: php81
steps:
- store-composer-cache

phpunit81:
executor: php81
steps:
- restore-composer-cache
- phpunit

## WORKFLOWS
workflows:
Code quality PHP 7.4:
Expand All @@ -166,4 +182,10 @@ workflows:
- composer80
- phpunit80:
requires:
- composer80
- composer80
Code quality PHP 8.1:
jobs:
- composer81
- phpunit81:
requires:
- composer81
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^0.12.71",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12.6",
"phpstan/phpstan-phpunit": "^0.12.17",
"phpstan/phpstan-strict-rules": "^0.12.9",
Expand Down
2 changes: 1 addition & 1 deletion src/Core/PhpCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function strSplit(string $string, int $length, string $what, string $extr
$data = false;
}

if (false === is_array($data) || 0 === count($data)) {
if (false === $data) {
$error = "Impossible to splint the given string of type: '$what'";
$error = $extra === '' ? $error : $error . ' at ' . $extra;
$error .= " $msg";
Expand Down

0 comments on commit 0837ffa

Please sign in to comment.