Skip to content

Commit 9da722e

Browse files
authored
Support PHP 8.3 (#21)
1 parent 1adc0b3 commit 9da722e

File tree

3 files changed

+10
-30
lines changed

3 files changed

+10
-30
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
tag: << parameters.version >>
142142
parameters:
143143
version:
144-
default: "7.4"
144+
default: "8.3"
145145
description: The `cimg/php` Docker image version tag.
146146
type: string
147147
install-flags:
@@ -154,7 +154,7 @@ jobs:
154154
- when:
155155
condition:
156156
and:
157-
- equal: [ "8.1", <<parameters.version>> ]
157+
- equal: [ "8.3", <<parameters.version>> ]
158158
- equal: [ "", <<parameters.install-flags>> ]
159159
steps:
160160
- run-phpunit-tests:
@@ -164,7 +164,7 @@ jobs:
164164
condition:
165165
not:
166166
and:
167-
- equal: [ "8.1", <<parameters.version>> ]
167+
- equal: [ "8.3", <<parameters.version>> ]
168168
- equal: [ "", <<parameters.install-flags>> ]
169169
steps:
170170
- run-phpunit-tests:
@@ -176,5 +176,5 @@ workflows:
176176
- matrix-conditions:
177177
matrix:
178178
parameters:
179-
version: ["8.2", "8.1", "8.0", "7.4"]
179+
version: ["8.3", "8.2", "8.1", "8.0", "7.4"]
180180
install-flags: ["", "--prefer-lowest"]

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"php": ">=7.4",
1313
"ext-json": "*",
1414
"fmizzell/maquina": "^1.1.1",
15-
"getdkan/contracts": "^1.1.2"
15+
"getdkan/contracts": "^1.1.3"
1616
},
1717
"require-dev": {
1818
"phpunit/phpunit": "^9.6",

rector.php

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,24 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6-
use Rector\Core\ValueObject\PhpVersion;
7-
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
8-
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
9-
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;
10-
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
116
use Rector\Set\ValueObject\SetList;
12-
use Rector\TypeDeclaration\Rector\ClassMethod\ArrayShapeFromConstantArrayReturnRector;
13-
use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;
147

158
return static function (RectorConfig $rectorConfig): void {
169
$rectorConfig->paths([
17-
__DIR__ . '/src',
18-
__DIR__ . '/test',
10+
__DIR__ . '/src',
11+
__DIR__ . '/test',
12+
__DIR__ . '/rector.php',
1913
]);
2014

21-
// Our base version of PHP.
22-
$rectorConfig->phpVersion(PhpVersion::PHP_74);
23-
2415
$rectorConfig->sets([
25-
SetList::PHP_82,
16+
SetList::PHP_74,
2617
// Please no dead code or unneeded variables.
2718
SetList::DEAD_CODE,
2819
// Try to figure out type hints.
2920
SetList::TYPE_DECLARATION,
3021
]);
3122

32-
$rectorConfig->skip([
33-
// Don't throw errors on JSON parse problems. Yet.
34-
// @todo Throw errors and deal with them appropriately.
35-
JsonThrowOnErrorRector::class,
36-
// We like our tags. Please don't remove them.
37-
RemoveUselessParamTagRector::class,
38-
RemoveUselessReturnTagRector::class,
39-
RemoveUselessVarTagRector::class,
40-
ArrayShapeFromConstantArrayReturnRector::class,
41-
AddMethodCallBasedStrictParamTypeRector::class,
42-
]);
43-
23+
$rectorConfig->removeUnusedImports();
4424
$rectorConfig->importNames();
4525
$rectorConfig->importShortClasses(false);
4626
};

0 commit comments

Comments
 (0)