Skip to content

Commit 48d0c51

Browse files
committed
newer php
1 parent 4e827e4 commit 48d0c51

File tree

13 files changed

+58
-136
lines changed

13 files changed

+58
-136
lines changed

.github/workflows/code_analysis.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515

1616
-
1717
name: 'Bare Run'
18-
run: bin/console
18+
run: bin/dump-nodes.php
1919

2020
-
2121
name: 'ECS'
22-
run: composer check-cs
22+
run: vendor/bin/ecs
2323

2424
-
2525
name: 'PHPStan'
26-
run: composer phpstan
26+
run: vendor/bin/phpstan
2727

2828
name: ${{ matrix.actions.name }}
2929
runs-on: ubuntu-latest
@@ -34,7 +34,7 @@ jobs:
3434
-
3535
uses: shivammathur/setup-php@v2
3636
with:
37-
php-version: 8.1
37+
php-version: 8.3
3838
coverage: none
3939

4040
- uses: "ramsey/composer-install@v1"

bin/console

Lines changed: 0 additions & 4 deletions
This file was deleted.

bin/console.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

bin/dump-nodes.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpParser\PrettyPrinter\Standard;
6+
use Rector\PhpParserNodesDocs\Finder\PhpFilesFinder;
7+
use Rector\PhpParserNodesDocs\NodeCodeSampleProvider;
8+
use Rector\PhpParserNodesDocs\NodeInfosFactory;
9+
use Rector\PhpParserNodesDocs\Printer\MarkdownNodeInfosPrinter;
10+
use Rector\PhpParserNodesDocs\Sorter\NodeInfoSorter;
11+
12+
require_once __DIR__ . '/../vendor/autoload.php';
13+
14+
$markdownNodeInfosPrinter = new MarkdownNodeInfosPrinter();
15+
$nodeInfosFactory = new NodeInfosFactory(
16+
new NodeCodeSampleProvider(new Standard(), new PhpFilesFinder()),
17+
new NodeInfoSorter()
18+
);
19+
20+
$nodeInfos = $nodeInfosFactory->create();
21+
$printedContent = $markdownNodeInfosPrinter->print($nodeInfos);
22+
23+
file_put_contents(getcwd() . '/README.md', $printedContent);
24+
25+
echo sprintf('<info>Documentation for %d nodes was generated to README.md</info>' . PHP_EOL, count($nodeInfos));
26+
27+
// success
28+
exit(0);

composer.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@
77
"bin/console.php"
88
],
99
"require": {
10-
"php": "^8.2",
11-
"symfony/console": "^6.4",
10+
"php": "^8.3",
1211
"nikic/php-parser": "^5.6",
13-
"illuminate/container": "^12.33",
1412
"webmozart/assert": "^1.11"
1513
},
1614
"require-dev": {
17-
"phpecs/phpecs": "^2.2",
15+
"symplify/easy-coding-standard": "^12.6",
1816
"phpstan/phpstan": "^2.1",
19-
"phpunit/phpunit": "^11.5",
20-
"rector/rector": "^2.2"
17+
"phpunit/phpunit": "^12.4",
18+
"rector/rector": "^2.2.2"
2119
},
2220
"autoload": {
2321
"psr-4": {

ecs.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,11 @@
33
declare(strict_types=1);
44

55
use Symplify\EasyCodingStandard\Config\ECSConfig;
6-
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
76

87
return ECSConfig::configure()
9-
->with
10-
return static function (ECSConfig $ecsConfig): void {
11-
$ecsConfig->paths([
8+
->withPaths([
9+
__DIR__ . '/bin',
1210
__DIR__ . '/src',
1311
__DIR__ . '/tests',
14-
]);
15-
16-
$ecsConfig->sets([
17-
SetList::STRICT,
18-
SetList::COMMON,
19-
SetList::PSR_12,
20-
]);
21-
};
12+
])
13+
->withPreparedSets(symplify: true, common: true, psr12: true);

snippet/nullable_type.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
declare(strict_types=1);
44

5+
use PhpParser\Node\Name;
56
use PhpParser\Node\NullableType;
67

7-
return new NullableType(new \PhpParser\Node\Name('SomeType'));
8+
return new NullableType(new Name('SomeType'));

snippet/php_74/property_typed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types=1);
44

5-
use PhpParser\Node\Stmt\Class_;
5+
use PhpParser\Modifiers;
66
use PhpParser\Node\Stmt\Property;
77
use PhpParser\Node\Stmt\PropertyProperty;
88
use PhpParser\Node\VarLikeIdentifier;
99

1010
$propertyProperty = new PropertyProperty(new VarLikeIdentifier('propertyName'));
1111

12-
return new Property(\PhpParser\Modifiers::PUBLIC, [$propertyProperty], [], new \PhpParser\Node\Identifier('string'));
12+
return new Property(Modifiers::PUBLIC, [$propertyProperty], [], new \PhpParser\Node\Identifier('string'));

src/Command/DumpNodesCommand.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/DependencyInjection/ContainerFactory.php

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)