Skip to content

Commit 50c68bd

Browse files
committed
release PHP 7.2 downgraded 1.2.3
1 parent 3ec89de commit 50c68bd

File tree

551 files changed

+1125
-12128
lines changed

Some content is hidden

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

551 files changed

+1125
-12128
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 & 51 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 & 10 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,17 @@
44
"license": "MIT",
55
"description": "Rector upgrades rules for Laravel Framework",
66
"require": {
7-
"php": ">=8.2",
8-
"rector/rector": "^1.2.5"
9-
},
10-
"require-dev": {
11-
"nikic/php-parser": "^4.18",
12-
"phpstan/extension-installer": "^1.3",
13-
"phpstan/phpstan": "^1.10",
14-
"phpstan/phpstan-strict-rules": "^1.5",
15-
"phpstan/phpstan-webmozart-assert": "^1.2",
16-
"phpunit/phpunit": "^10.5",
17-
"symplify/phpstan-extensions": "^11.4",
18-
"symplify/phpstan-rules": "^12.4",
19-
"symplify/rule-doc-generator": "^12.1",
20-
"tightenco/duster": "^2.7"
7+
"php": "^7.2 || ^8.0",
8+
"rector/rector": "^1.0"
219
},
2210
"autoload": {
2311
"psr-4": {
2412
"RectorLaravel\\": "src"
2513
}
2614
},
2715
"autoload-dev": {
28-
"psr-4": {
29-
"RectorLaravel\\Tests\\": "tests"
30-
},
3116
"classmap": ["stubs"]
3217
},
33-
"scripts": {
34-
"phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify",
35-
"check-cs": "vendor/bin/duster lint",
36-
"fix-cs": "vendor/bin/duster fix",
37-
"lint": "vendor/bin/duster lint",
38-
"fix": "vendor/bin/duster fix",
39-
"rector-dry-run": "vendor/bin/rector process --dry-run --ansi",
40-
"rector": "vendor/bin/rector process --ansi",
41-
"docs": "vendor/bin/rule-doc-generator generate src --output-file docs/rector_rules_overview.md --ansi"
42-
},
4318
"minimum-stability": "dev",
44-
"prefer-stable": true,
45-
"config": {
46-
"allow-plugins": {
47-
"rector/extension-installer": true,
48-
"phpstan/extension-installer": true,
49-
"cweagans/composer-patches": false
50-
}
51-
}
19+
"prefer-stable": true
5220
}

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: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,12 @@
99
return static function (RectorConfig $rectorConfig): void {
1010
$rectorConfig->import(__DIR__ . '/../config.php');
1111

12-
$rectorConfig
13-
->ruleWithConfiguration(
14-
ArrayDimFetchToMethodCallRector::class,
15-
[
16-
new ArrayDimFetchToMethodCall(
17-
new ObjectType('Illuminate\Foundation\Application'),
18-
'make',
19-
),
20-
new ArrayDimFetchToMethodCall(
21-
new ObjectType('Illuminate\Contracts\Foundation\Application'),
22-
'make',
23-
),
24-
new ArrayDimFetchToMethodCall(
25-
new ObjectType('Illuminate\Config\Repository'),
26-
'get',
27-
),
28-
new ArrayDimFetchToMethodCall(
29-
new ObjectType('Illuminate\Contracts\Config\Repository'),
30-
'make',
31-
),
32-
new ArrayDimFetchToMethodCall(
33-
new ObjectType('Illuminate\Contracts\Container\Container\Application'),
34-
'make',
35-
),
36-
new ArrayDimFetchToMethodCall(
37-
new ObjectType('Illuminate\Contracts\Container\Container'),
38-
'make',
39-
),
40-
],
41-
);
12+
$rectorConfig->ruleWithConfiguration(ArrayDimFetchToMethodCallRector::class, [
13+
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Foundation\Application'), 'make'),
14+
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Contracts\Foundation\Application'), 'make'),
15+
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Config\Repository'), 'get'),
16+
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Contracts\Config\Repository'), 'make'),
17+
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Contracts\Container\Container\Application'), 'make'),
18+
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Contracts\Container\Container'), 'make'),
19+
]);
4220
};

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,15 @@
6363
'command.tinker' => 'Laravel\Tinker\Console\TinkerCommand',
6464
];
6565

66-
$ruleConfig = array_map(
67-
fn (string $service, string $interface) => new ReplaceServiceContainerCallArg(
66+
$ruleConfig = array_map(function (string $service, string $interface) {
67+
return new ReplaceServiceContainerCallArg(
6868
$service,
6969
new ClassConstFetch(
7070
new FullyQualified($interface),
7171
'class'
7272
)
73-
),
74-
array_keys($servicesMap),
75-
$servicesMap,
76-
);
73+
);
74+
}, array_keys($servicesMap), $servicesMap);
7775

7876
$rectorConfig->ruleWithConfiguration(
7977
ReplaceServiceContainerCallArgRector::class,

config/sets/laravel90.php

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,17 @@
2020

2121
// https://github.com/laravel/framework/commit/8f9ddea4481717943ed4ecff96d86b703c81a87d
2222
$rectorConfig
23-
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdder(
24-
'Illuminate\Contracts\Foundation\Application',
25-
'storagePath',
26-
0,
27-
'path',
28-
'',
29-
null,
30-
ArgumentAddingScope::SCOPE_CLASS_METHOD,
31-
),
23+
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdder('Illuminate\Contracts\Foundation\Application', 'storagePath', 0, 'path', '', null, ArgumentAddingScope::SCOPE_CLASS_METHOD),
3224
]);
3325

3426
// https://github.com/laravel/framework/commit/e6c8aaea886d35cc55bd3469f1a95ad56d53e474
3527
$rectorConfig
36-
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdder(
37-
'Illuminate\Foundation\Application',
38-
'langPath',
39-
0,
40-
'path',
41-
'',
42-
null,
43-
ArgumentAddingScope::SCOPE_CLASS_METHOD,
44-
),
28+
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdder('Illuminate\Foundation\Application', 'langPath', 0, 'path', '', null, ArgumentAddingScope::SCOPE_CLASS_METHOD),
4529
]);
4630

4731
// https://github.com/laravel/framework/commit/e095ac0e928b5620f33c9b60816fde5ece867d32
4832
$rectorConfig
49-
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdder(
50-
'Illuminate\Database\Eloquent\Model',
51-
'touch',
52-
0,
53-
'attribute',
54-
null,
55-
null,
56-
ArgumentAddingScope::SCOPE_CLASS_METHOD,
57-
),
33+
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdder('Illuminate\Database\Eloquent\Model', 'touch', 0, 'attribute', null, null, ArgumentAddingScope::SCOPE_CLASS_METHOD),
5834
]);
5935

6036
// https://github.com/laravel/framework/commit/84c78b9f5f3dad58f92161069e6482f7267ffdb6

phpstan.neon

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

phpunit.xml

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

0 commit comments

Comments
 (0)