Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PHP 8.0+ #74

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- 'master'

env:
CONSISTENCE_PHP_VERSION: '7.3'
CONSISTENCE_PHP_VERSION: '8.0'

jobs:
composer-validate:
Expand Down Expand Up @@ -45,9 +45,9 @@ jobs:
fail-fast: false
matrix:
php-version:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'

steps:
-
Expand Down Expand Up @@ -108,9 +108,9 @@ jobs:
fail-fast: false
matrix:
php-version:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
composer-dependencies:
- 'highest'
- 'lowest'
Expand Down
3 changes: 1 addition & 2 deletions Consistence/Sniffs/Exceptions/ExceptionDeclarationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class ExceptionDeclarationSniff implements \PHP_CodeSniffer\Sniffs\Sniff
public const CODE_NOT_CHAINABLE = 'NotChainable';
public const CODE_INCORRECT_EXCEPTION_DIRECTORY = 'IncorrectExceptionDirectory';

/** @var string */
public $exceptionsDirectoryName = 'exceptions';
public string $exceptionsDirectoryName = 'exceptions';

/**
* @return int[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ValidVariableNameSniff extends \PHP_CodeSniffer\Sniffs\AbstractVariableSni
public const CODE_CAMEL_CAPS = 'NotCamelCaps';

/** @var string[] */
private static $phpReservedVariables = [
private static array $phpReservedVariables = [
'_SERVER',
'_GET',
'_POST',
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
}
],
"require": {
"php": "~7.2",
"squizlabs/php_codesniffer": "~3.5.5",
"php": "~8.0",
"squizlabs/php_codesniffer": "~3.7",
"slevomat/coding-standard": "~6.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion tests/Sniffs/Exceptions/ExceptionDeclarationSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public function testExceptionIsPlacedInCorrectDirectory(): void
public function testExceptionIsPlacedInCorrectDirectoryOnWindows(): void
{
// PHP_CodeSniffer detects the path with backslashes on Windows
$resultFile = $this->checkFile(__DIR__ . '\data\ValidNameException.php', [
$resultFile = $this->checkFile(__DIR__ . '/data/ValidNameException.php', [
'exceptionsDirectoryName' => 'data',
]);

Expand Down