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

Support PHP 8.3 #18

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
tag: << parameters.version >>
parameters:
version:
default: "8.2"
default: "8.3"
description: The `cimg/php` Docker image version tag.
type: string
install-flags:
Expand All @@ -154,7 +154,7 @@ jobs:
- when:
condition:
and:
- equal: [ "8.2", <<parameters.version>> ]
- equal: [ "8.3", <<parameters.version>> ]
- equal: [ "", <<parameters.install-flags>> ]
steps:
- run-phpunit-tests:
Expand All @@ -164,7 +164,7 @@ jobs:
condition:
not:
and:
- equal: [ "8.2", <<parameters.version>> ]
- equal: [ "8.3", <<parameters.version>> ]
- equal: [ "", <<parameters.install-flags>> ]
steps:
- run-phpunit-tests:
Expand All @@ -176,5 +176,5 @@ workflows:
- matrix-conditions:
matrix:
parameters:
version: ["7.4", "8.0", "8.1", "8.2"]
version: ["7.4", "8.0", "8.1", "8.2", "8.3"]
install-flags: ["", "--prefer-lowest"]
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# @see http://editorconfig.org/

# This is the top-most .editorconfig file; do not search in parent directories.
root = true

# All files.
[*]
end_of_line = LF
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
6 changes: 2 additions & 4 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;
Expand All @@ -13,20 +12,18 @@

return static function (RectorConfig $rectorConfig): void {

$rectorConfig->phpVersion(PhpVersion::PHP_74);

$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/test',
__DIR__ . '/rector.php',
]);

$rectorConfig->sets([
SetList::PHP_74,
// Please no dead code or unneeded variables.
SetList::DEAD_CODE,
// Try to figure out type hints.
SetList::TYPE_DECLARATION,
SetList::PHP_82,
]);

$rectorConfig->skip([
Expand All @@ -39,6 +36,7 @@
RemoveUselessVarTagRector::class,
]);

$rectorConfig->removeUnusedImports();
$rectorConfig->importNames();
$rectorConfig->importShortClasses(false);
};
2 changes: 1 addition & 1 deletion src/RootedJsonData.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static function validate(string $json, string $schema): ValidationResult
*
* @return string
*/
public function __toString()
public function __toString(): string
{
return $this->data->getJson();
}
Expand Down