Skip to content

Commit 68c23d1

Browse files
committed
release PHP 7.4 downgraded 2.0.4
1 parent ed0cb99 commit 68c23d1

File tree

694 files changed

+1605
-15696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

694 files changed

+1605
-15696
lines changed

.github/workflows/code_analysis.yaml

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

.github/workflows/downgraded_release.yaml

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

.github/workflows/tests.yaml

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

build/composer-php-74.json

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

build/rector-downgrade-php-74.php

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

composer.json

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,17 @@
44
"license": "MIT",
55
"description": "Rector upgrades rules for Laravel Framework",
66
"require": {
7-
"php": ">=8.3",
8-
"rector/rector": "^2.0.0",
9-
"webmozart/assert": "^1.11",
10-
"symplify/rule-doc-generator-contracts": "^11.2"
11-
},
12-
"require-dev": {
13-
"nikic/php-parser": "^5.3",
14-
"phpstan/extension-installer": "^1.3",
15-
"phpstan/phpstan": "^2.0",
16-
"phpstan/phpstan-deprecation-rules": "^2.0",
17-
"phpstan/phpstan-strict-rules": "^2.0",
18-
"phpstan/phpstan-webmozart-assert": "^2.0",
19-
"phpunit/phpunit": "^10.5",
20-
"symplify/rule-doc-generator": "^12.2",
21-
"tightenco/duster": "^3.1",
22-
"nette/utils": "^4.0"
7+
"php": "^7.4 || ^8.0",
8+
"rector/rector": "^2.0"
239
},
2410
"autoload": {
2511
"psr-4": {
2612
"RectorLaravel\\": "src"
2713
}
2814
},
2915
"autoload-dev": {
30-
"psr-4": {
31-
"RectorLaravel\\Tests\\": "tests",
32-
"RectorLaravel\\Commands\\": "commands"
33-
},
3416
"classmap": ["stubs"]
3517
},
36-
"scripts": {
37-
"phpstan": "vendor/bin/phpstan analyse --ansi",
38-
"test": "vendor/bin/phpunit tests",
39-
"lint": "vendor/bin/duster lint",
40-
"fix": "vendor/bin/duster fix",
41-
"rector-dry-run": "vendor/bin/rector process --dry-run --ansi",
42-
"rector": "vendor/bin/rector process --ansi",
43-
"docs": "vendor/bin/rule-doc-generator generate src --output-file docs/rector_rules_overview.md --ansi",
44-
"make:rule": "php commands/make-rule.php"
45-
},
4618
"minimum-stability": "dev",
47-
"prefer-stable": true,
48-
"config": {
49-
"allow-plugins": {
50-
"rector/extension-installer": true,
51-
"phpstan/extension-installer": true,
52-
"cweagans/composer-patches": false
53-
}
54-
}
19+
"prefer-stable": true
5520
}

phpstan.neon

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

phpunit.xml

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

src/NodeAnalyzer/ApplicationAnalyzer.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,28 @@
77

88
class ApplicationAnalyzer
99
{
10+
private string $applicationClass = 'Illuminate\Foundation\Application';
1011
private ?string $version = null;
1112

12-
public function __construct(
13-
private string $applicationClass = 'Illuminate\Foundation\Application',
14-
) {}
13+
public function __construct(string $applicationClass = 'Illuminate\Foundation\Application')
14+
{
15+
$this->applicationClass = $applicationClass;
16+
}
1517

16-
public function setVersion(?string $version): static
18+
/**
19+
* @return static
20+
*/
21+
public function setVersion(?string $version)
1722
{
1823
$this->version = $version;
1924

2025
return $this;
2126
}
2227

23-
public function setApplicationClass(string $applicationClass): static
28+
/**
29+
* @return static
30+
*/
31+
public function setApplicationClass(string $applicationClass)
2432
{
2533
$this->applicationClass = $applicationClass;
2634

src/NodeAnalyzer/ExpectedClassMethodAnalyzer.php

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,26 @@
1515
use Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser;
1616
use RectorLaravel\ValueObject\ExpectedClassMethodMethodCalls;
1717

18-
final readonly class ExpectedClassMethodAnalyzer
18+
final class ExpectedClassMethodAnalyzer
1919
{
20-
public function __construct(
21-
private SimpleCallableNodeTraverser $simpleCallableNodeTraverser,
22-
private NodeNameResolver $nodeNameResolver,
23-
private NodeTypeResolver $nodeTypeResolver,
24-
) {}
20+
/**
21+
* @readonly
22+
*/
23+
private SimpleCallableNodeTraverser $simpleCallableNodeTraverser;
24+
/**
25+
* @readonly
26+
*/
27+
private NodeNameResolver $nodeNameResolver;
28+
/**
29+
* @readonly
30+
*/
31+
private NodeTypeResolver $nodeTypeResolver;
32+
public function __construct(SimpleCallableNodeTraverser $simpleCallableNodeTraverser, NodeNameResolver $nodeNameResolver, NodeTypeResolver $nodeTypeResolver)
33+
{
34+
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
35+
$this->nodeNameResolver = $nodeNameResolver;
36+
$this->nodeTypeResolver = $nodeTypeResolver;
37+
}
2538

2639
public function findExpectedJobCallsWithClassMethod(ClassMethod $classMethod): ?ExpectedClassMethodMethodCalls
2740
{
@@ -34,8 +47,8 @@ public function findExpectedJobCallsWithClassMethod(ClassMethod $classMethod): ?
3447
$this->simpleCallableNodeTraverser->traverseNodesWithCallable($classMethod, function (Node $node) use (
3548
&$expectedMethodCalls,
3649
&$notExpectedMethodCalls,
37-
&$reasonsToNotContinue,
38-
): array|int|Node|null {
50+
&$reasonsToNotContinue
51+
) {
3952
if (! $node instanceof MethodCall) {
4053
return null;
4154
}
@@ -90,8 +103,8 @@ public function findExpectedEventCallsWithClassMethod(ClassMethod $classMethod):
90103
$this->simpleCallableNodeTraverser->traverseNodesWithCallable($classMethod, function (Node $node) use (
91104
&$expectedMethodCalls,
92105
&$notExpectedMethodCalls,
93-
&$reasonsToNotContinue,
94-
): array|int|Node|null {
106+
&$reasonsToNotContinue
107+
) {
95108
if (! $node instanceof MethodCall) {
96109
return null;
97110
}

0 commit comments

Comments
 (0)