Skip to content

Commit 7de906a

Browse files
committed
release PHP 7.2 downgraded 2.0.0
1 parent 44674a8 commit 7de906a

File tree

608 files changed

+1205
-13410
lines changed

Some content is hidden

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

608 files changed

+1205
-13410
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 & 7 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,17 @@
44
"license": "MIT",
55
"description": "Rector upgrades rules for Laravel Framework",
66
"require": {
7-
"php": ">=8.2",
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"
7+
"php": "^7.2 || ^8.0",
8+
"rector/rector": "^2.0"
229
},
2310
"autoload": {
2411
"psr-4": {
2512
"RectorLaravel\\": "src"
2613
}
2714
},
2815
"autoload-dev": {
29-
"psr-4": {
30-
"RectorLaravel\\Tests\\": "tests"
31-
},
3216
"classmap": ["stubs"]
3317
},
34-
"scripts": {
35-
"phpstan": "vendor/bin/phpstan analyse --ansi",
36-
"lint": "vendor/bin/duster lint",
37-
"fix": "vendor/bin/duster fix",
38-
"rector-dry-run": "vendor/bin/rector process --dry-run --ansi",
39-
"rector": "vendor/bin/rector process --ansi",
40-
"docs": "vendor/bin/rule-doc-generator generate src --output-file docs/rector_rules_overview.md --ansi"
41-
},
4218
"minimum-stability": "dev",
43-
"prefer-stable": true,
44-
"config": {
45-
"allow-plugins": {
46-
"rector/extension-installer": true,
47-
"phpstan/extension-installer": true,
48-
"cweagans/composer-patches": false
49-
}
50-
}
19+
"prefer-stable": true
5120
}

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
@@ -64,15 +64,17 @@
6464
];
6565

6666
$ruleConfig = array_map(
67-
fn (string $service, string $interface) => new ReplaceServiceContainerCallArg(
68-
$service,
69-
new ClassConstFetch(
70-
new FullyQualified($interface),
71-
'class'
72-
)
73-
),
67+
function (string $service, string $interface) {
68+
return new ReplaceServiceContainerCallArg(
69+
$service,
70+
new ClassConstFetch(
71+
new FullyQualified($interface),
72+
'class'
73+
)
74+
);
75+
},
7476
array_keys($servicesMap),
75-
$servicesMap,
77+
$servicesMap
7678
);
7779

7880
$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)