Skip to content

Commit 18c5ecf

Browse files
bump min php version to php 7.4
1 parent e162c85 commit 18c5ecf

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=7.2
1+
ARG PHP_VERSION=7.4
22

33
FROM php:${PHP_VERSION}-cli-alpine AS php_build
44

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ You can add parameters when you launch the tool. At the moment you can add these
464464
phparkitect check --config=/project/yourConfigFile.php
465465
```
466466
* `--target-php-version`: With this parameter, you can specify which PHP version should use the parser. This can be useful to debug problems and to understand if there are problems with a different PHP version.
467-
Supported PHP versions are: 7.2, 7.3, 7.4, 8.0, 8.1, 8.2
467+
Supported PHP versions are: 7.4, 8.0, 8.1, 8.2 8.3
468468
* `--stop-on-failure`: With this option the process will end immediately after the first violation.
469469

470470
## Run only a specific rule

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^7.2|^8",
26+
"php": "^7.4|^8",
2727
"symfony/finder": "^3.0|^4.0|^5.0|^6.0|^7.0",
2828
"symfony/event-dispatcher": "^3.0|^4.0|^5.0|^6.0|^7.0",
2929
"symfony/console": "^3.0|^4.0|^5.0|^6.0|^7.0",

src/CLI/TargetPhpVersion.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
class TargetPhpVersion
1010
{
1111
public const VALID_PHP_VERSIONS = [
12-
'7.2',
13-
'7.3',
1412
'7.4',
1513
'8.0',
1614
'8.1',

tests/Unit/Analyzer/FileVisitorTest.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Cat implements AnInterface
4040
EOF;
4141

4242
/** @var FileParser $fp */
43-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
43+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
4444
$fp->parse($code, 'relativePathName');
4545
$cd = $fp->getClassDescriptions();
4646

@@ -85,7 +85,7 @@ class Cat implements AnInterface
8585
EOF;
8686

8787
/** @var FileParser $fp */
88-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
88+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
8989
$fp->parse($code, 'relativePathName');
9090
$cd = $fp->getClassDescriptions();
9191

@@ -121,7 +121,7 @@ class Cat extends Animal
121121
EOF;
122122

123123
/** @var FileParser $fp */
124-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
124+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
125125
$fp->parse($code, 'relativePathName');
126126

127127
$cd = $fp->getClassDescriptions()[1];
@@ -150,7 +150,7 @@ public function methodWithAnonymous(): void
150150
EOF;
151151

152152
/** @var FileParser $fp */
153-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
153+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
154154
$fp->parse($code, 'relativePathName');
155155

156156
$cd = $fp->getClassDescriptions()[1];
@@ -178,7 +178,7 @@ public function __construct(Request $request)
178178
EOF;
179179

180180
/** @var FileParser $fp */
181-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
181+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
182182
$fp->parse($code, 'relativePathName');
183183
$cd = $fp->getClassDescriptions();
184184

@@ -213,7 +213,7 @@ public function __construct(Request $request, ?Nullable $nullable)
213213
EOF;
214214

215215
/** @var FileParser $fp */
216-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
216+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
217217
$fp->parse($code, 'relativePathName');
218218
$cd = $fp->getClassDescriptions();
219219

@@ -848,7 +848,7 @@ public function getRequest(): Request //the violations is reported here
848848
EOF;
849849

850850
/** @var FileParser $fp */
851-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
851+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
852852
$fp->parse($code, 'relativePathName');
853853
$cd = $fp->getClassDescriptions();
854854

@@ -936,7 +936,7 @@ class MyClass
936936
EOF;
937937

938938
/** @noinspection PhpUnhandledExceptionInspection */
939-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
939+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
940940
$fp->parse($code, 'relativePathName');
941941
$cd = $fp->getClassDescriptions();
942942

@@ -966,7 +966,7 @@ class MyClass
966966
EOF;
967967

968968
/** @noinspection PhpUnhandledExceptionInspection */
969-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
969+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
970970
$fp->parse($code, 'relativePathName');
971971
$cd = $fp->getClassDescriptions();
972972

@@ -996,7 +996,7 @@ class MyClass
996996
EOF;
997997

998998
/** @noinspection PhpUnhandledExceptionInspection */
999-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
999+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
10001000
$fp->parse($code, 'relativePathName');
10011001
$cd = $fp->getClassDescriptions();
10021002

@@ -1028,7 +1028,7 @@ public function __construct(array $dtoList)
10281028
EOF;
10291029

10301030
/** @noinspection PhpUnhandledExceptionInspection */
1031-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
1031+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
10321032
$fp->parse($code, 'relativePathName');
10331033
$cd = $fp->getClassDescriptions();
10341034

@@ -1060,7 +1060,7 @@ public function __construct(array $dtoList)
10601060
EOF;
10611061

10621062
/** @noinspection PhpUnhandledExceptionInspection */
1063-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
1063+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
10641064
$fp->parse($code, 'relativePathName');
10651065
$cd = $fp->getClassDescriptions();
10661066

@@ -1092,7 +1092,7 @@ public function __construct(array $dtoList)
10921092
EOF;
10931093

10941094
/** @noinspection PhpUnhandledExceptionInspection */
1095-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
1095+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
10961096
$fp->parse($code, 'relativePathName');
10971097
$cd = $fp->getClassDescriptions();
10981098

@@ -1127,7 +1127,7 @@ public function __construct(string $var1, array $dtoList, $var2, array $voList)
11271127
EOF;
11281128

11291129
/** @noinspection PhpUnhandledExceptionInspection */
1130-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
1130+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
11311131
$fp->parse($code, 'relativePathName');
11321132
$cd = $fp->getClassDescriptions();
11331133

@@ -1160,7 +1160,7 @@ public function getList(): array
11601160
EOF;
11611161

11621162
/** @noinspection PhpUnhandledExceptionInspection */
1163-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
1163+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
11641164
$fp->parse($code, 'relativePathName');
11651165
$cd = $fp->getClassDescriptions();
11661166

@@ -1193,7 +1193,7 @@ public function getList(): array
11931193
EOF;
11941194

11951195
/** @noinspection PhpUnhandledExceptionInspection */
1196-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
1196+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
11971197
$fp->parse($code, 'relativePathName');
11981198
$cd = $fp->getClassDescriptions();
11991199

@@ -1226,7 +1226,7 @@ public function getList(): array
12261226
EOF;
12271227

12281228
/** @noinspection PhpUnhandledExceptionInspection */
1229-
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
1229+
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.4'));
12301230
$fp->parse($code, 'relativePathName');
12311231
$cd = $fp->getClassDescriptions();
12321232

0 commit comments

Comments
 (0)