Skip to content

Commit 837066b

Browse files
committed
release PHP 7.2 downgraded 2.0.3
1 parent 1785e16 commit 837066b

File tree

701 files changed

+1902
-15713
lines changed

Some content is hidden

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

701 files changed

+1902
-15713
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-72.json

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

build/rector-downgrade-php-72.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.2 || ^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
}

config/sets/laravel-array-str-functions-to-static-call.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@
6262
new FuncCallToStaticCall('studly_case', 'Illuminate\Support\Str', 'studly'),
6363
new FuncCallToStaticCall('title_case', 'Illuminate\Support\Str', 'title'),
6464
],
65-
fn ($function) => ! in_array($function->getOldFuncName(), $internalFunctions, true)
65+
function ($function) use ($internalFunctions) {
66+
return ! in_array($function->getOldFuncName(), $internalFunctions, true);
67+
}
6668
)
6769
);
6870
};

config/sets/laravel-arrayaccess-to-method-call.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,28 @@
1515
[
1616
new ArrayDimFetchToMethodCall(
1717
new ObjectType('Illuminate\Foundation\Application'),
18-
'make',
18+
'make'
1919
),
2020
new ArrayDimFetchToMethodCall(
2121
new ObjectType('Illuminate\Contracts\Foundation\Application'),
22-
'make',
22+
'make'
2323
),
2424
new ArrayDimFetchToMethodCall(
2525
new ObjectType('Illuminate\Config\Repository'),
26-
'get',
26+
'get'
2727
),
2828
new ArrayDimFetchToMethodCall(
2929
new ObjectType('Illuminate\Contracts\Config\Repository'),
30-
'make',
30+
'make'
3131
),
3232
new ArrayDimFetchToMethodCall(
3333
new ObjectType('Illuminate\Contracts\Container\Container\Application'),
34-
'make',
34+
'make'
3535
),
3636
new ArrayDimFetchToMethodCall(
3737
new ObjectType('Illuminate\Contracts\Container\Container'),
38-
'make',
38+
'make'
3939
),
40-
],
40+
]
4141
);
4242
};

config/sets/laravel-container-string-to-fully-qualified-name.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,17 @@
5454
];
5555

5656
$ruleConfig = array_map(
57-
fn (string $service, string $interface) => new ReplaceServiceContainerCallArg(
58-
$service,
59-
new ClassConstFetch(
60-
new FullyQualified($interface),
61-
'class'
62-
)
63-
),
57+
function (string $service, string $interface) {
58+
return new ReplaceServiceContainerCallArg(
59+
$service,
60+
new ClassConstFetch(
61+
new FullyQualified($interface),
62+
'class'
63+
)
64+
);
65+
},
6466
array_keys($servicesMap),
65-
$servicesMap,
67+
$servicesMap
6668
);
6769

6870
$rectorConfig->ruleWithConfiguration(

config/sets/laravel90.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
'path',
2929
'',
3030
null,
31-
ArgumentAddingScope::SCOPE_CLASS_METHOD,
31+
ArgumentAddingScope::SCOPE_CLASS_METHOD
3232
),
3333
]);
3434

@@ -41,7 +41,7 @@
4141
'path',
4242
'',
4343
null,
44-
ArgumentAddingScope::SCOPE_CLASS_METHOD,
44+
ArgumentAddingScope::SCOPE_CLASS_METHOD
4545
),
4646
]);
4747

@@ -54,7 +54,7 @@
5454
'attribute',
5555
null,
5656
null,
57-
ArgumentAddingScope::SCOPE_CLASS_METHOD,
57+
ArgumentAddingScope::SCOPE_CLASS_METHOD
5858
),
5959
]);
6060

phpstan.neon

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

phpunit.xml

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

0 commit comments

Comments
 (0)