Skip to content

Commit

Permalink
Drop PHP 7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Dec 14, 2021
1 parent f16080e commit 1a64ba6
Show file tree
Hide file tree
Showing 8 changed files with 323 additions and 342 deletions.
25 changes: 12 additions & 13 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ branches:
enforce_admins: false
required_status_checks:
contexts:
- "Coding Standards (7.4)"
- "Static Code Analysis (7.4)"
- "Test (PHP 7.3, symfony 4.4, lowest)"
- "Test (PHP 7.3, symfony 5.1, lowest)"
- "Test (PHP 7.3, symfony 4.4, highest)"
- "Test (PHP 7.3, symfony 5.1, highest)"
- "Test (PHP 7.4, symfony 4.4, lowest)"
- "Test (PHP 7.4, symfony 5.1, lowest)"
- "Test (PHP 7.4, symfony 4.4, highest)"
- "Test (PHP 7.4, symfony 5.1, highest)"
- "Code Coverage (7.4)"
- "Mutation Tests (7.4)"
- "Mutation Tests (7.4)"
- "Coding Standards (8.1)"
- "Static Code Analysis (8.1)"
- "Test (PHP 8.0, symfony 4.4, lowest)"
- "Test (PHP 8.0, symfony 5.1, lowest)"
- "Test (PHP 8.0, symfony 4.4, highest)"
- "Test (PHP 8.0, symfony 5.1, highest)"
- "Test (PHP 8.1, symfony 4.4, lowest)"
- "Test (PHP 8.1, symfony 5.1, lowest)"
- "Test (PHP 8.1, symfony 4.4, highest)"
- "Test (PHP 8.1, symfony 5.1, highest)"
- "Code Coverage (8.1)"
- "Mutation Tests (8.1)"
strict: true

required_pull_request_reviews: null
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
php-version:
- 7.4
- 8.1

steps:
- name: "Checkout"
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
strategy:
matrix:
php-version:
- 7.4
- 8.1

steps:
- name: "Checkout"
Expand Down Expand Up @@ -110,9 +110,8 @@ jobs:
strategy:
matrix:
php-version:
- 7.3
- 7.4
- 8.0
- 8.1

dependencies:
- lowest
Expand Down Expand Up @@ -167,7 +166,7 @@ jobs:
strategy:
matrix:
php-version:
- 7.4
- 8.1

steps:
- name: "Checkout"
Expand Down Expand Up @@ -207,7 +206,7 @@ jobs:
strategy:
matrix:
php-version:
- 7.4
- 8.1

steps:
- name: "Checkout"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"homepage": "https://nucleos.rocks",
"require": {
"php": "^7.3 || ^8.0",
"php": "^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"doctrine/collections": "^1.6",
Expand Down
2 changes: 2 additions & 0 deletions src/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
/**
* @phpstan-template GroupTemplate of \Nucleos\UserBundle\Model\GroupInterface
* @phpstan-implements \Nucleos\UserBundle\Model\GroupableInterface<GroupTemplate>
*
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
*/
abstract class User implements UserInterface, GroupableInterface, LocaleAwareInterface
{
Expand Down
8 changes: 7 additions & 1 deletion src/Util/Canonicalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ public function canonicalize(?string $string): string
return '';
}

$encoding = mb_detect_encoding($string, mb_detect_order(), true);
$encodings = mb_detect_order();

if (!\is_array($encodings)) {
return $string;
}

$encoding = mb_detect_encoding($string, $encodings, true);

if (false !== $encoding) {
return mb_convert_case($string, MB_CASE_LOWER, $encoding);
Expand Down
2 changes: 1 addition & 1 deletion src/Validator/Constraints/PatternValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ private function countMatches(string $pattern, string $text): int
{
$result = preg_match_all($pattern, $text);

return false === $result ? 0 : $result;
return \is_int($result) ? $result : 0;
}
}
2 changes: 1 addition & 1 deletion vendor-bin/tools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"config": {
"bin-dir": "../../vendor/bin",
"platform": {
"php": "7.4"
"php": "8.0.2"
}
}
}
Loading

0 comments on commit 1a64ba6

Please sign in to comment.