Skip to content

Commit

Permalink
release PHP 7.2 downgraded 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 30, 2024
1 parent 58b57ee commit 849fe4e
Show file tree
Hide file tree
Showing 508 changed files with 1,086 additions and 11,108 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/code_analysis.yaml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/downgraded_release.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/tests.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions build/composer-php-72.json

This file was deleted.

10 changes: 0 additions & 10 deletions build/rector-downgrade-php-72.php

This file was deleted.

40 changes: 3 additions & 37 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,17 @@
"license": "MIT",
"description": "Rector upgrades rules for Laravel Framework",
"require": {
"php": ">=8.2",
"rector/rector": "^1.2"
},
"require-dev": {
"nikic/php-parser": "^4.18",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-strict-rules": "^1.5",
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^10.5",
"symplify/phpstan-extensions": "^11.4",
"symplify/phpstan-rules": "^12.4",
"symplify/rule-doc-generator": "^12.1",
"tightenco/duster": "^2.7"
"php": "^7.2 || ^8.0",
"rector/rector": "^1.0"
},
"autoload": {
"psr-4": {
"RectorLaravel\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"RectorLaravel\\Tests\\": "tests"
},
"classmap": ["stubs"]
},
"scripts": {
"phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify",
"check-cs": "vendor/bin/duster lint",
"fix-cs": "vendor/bin/duster fix",
"lint": "vendor/bin/duster lint",
"fix": "vendor/bin/duster fix",
"rector-dry-run": "vendor/bin/rector process --dry-run --ansi",
"rector": "vendor/bin/rector process --ansi",
"docs": [
"vendor/bin/rule-doc-generator generate src --output-file docs/rector_rules_overview.md --ansi"
]
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"rector/extension-installer": true,
"phpstan/extension-installer": true,
"cweagans/composer-patches": false
}
}
"prefer-stable": true
}
4 changes: 3 additions & 1 deletion config/sets/laravel-array-str-functions-to-static-call.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
new FuncCallToStaticCall('studly_case', 'Illuminate\Support\Str', 'studly'),
new FuncCallToStaticCall('title_case', 'Illuminate\Support\Str', 'title'),
],
fn ($function) => ! in_array($function->getOldFuncName(), $internalFunctions, true)
function ($function) use ($internalFunctions) {
return ! in_array($function->getOldFuncName(), $internalFunctions, true);
}
)
);
};
38 changes: 8 additions & 30 deletions config/sets/laravel-arrayaccess-to-method-call.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,12 @@
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->import(__DIR__ . '/../config.php');

$rectorConfig
->ruleWithConfiguration(
ArrayDimFetchToMethodCallRector::class,
[
new ArrayDimFetchToMethodCall(
new ObjectType('Illuminate\Foundation\Application'),
'make',
),
new ArrayDimFetchToMethodCall(
new ObjectType('Illuminate\Contracts\Foundation\Application'),
'make',
),
new ArrayDimFetchToMethodCall(
new ObjectType('Illuminate\Config\Repository'),
'get',
),
new ArrayDimFetchToMethodCall(
new ObjectType('Illuminate\Contracts\Config\Repository'),
'make',
),
new ArrayDimFetchToMethodCall(
new ObjectType('Illuminate\Contracts\Container\Container\Application'),
'make',
),
new ArrayDimFetchToMethodCall(
new ObjectType('Illuminate\Contracts\Container\Container'),
'make',
),
],
);
$rectorConfig->ruleWithConfiguration(ArrayDimFetchToMethodCallRector::class, [
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Foundation\Application'), 'make'),
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Contracts\Foundation\Application'), 'make'),
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Config\Repository'), 'get'),
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Contracts\Config\Repository'), 'make'),
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Contracts\Container\Container\Application'), 'make'),
new ArrayDimFetchToMethodCall(new ObjectType('Illuminate\Contracts\Container\Container'), 'make'),
]);
};
10 changes: 4 additions & 6 deletions config/sets/laravel-container-string-to-fully-qualified-name.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,15 @@
'command.tinker' => 'Laravel\Tinker\Console\TinkerCommand',
];

$ruleConfig = array_map(
fn (string $service, string $interface) => new ReplaceServiceContainerCallArg(
$ruleConfig = array_map(function (string $service, string $interface) {
return new ReplaceServiceContainerCallArg(
$service,
new ClassConstFetch(
new FullyQualified($interface),
'class'
)
),
array_keys($servicesMap),
$servicesMap,
);
);
}, array_keys($servicesMap), $servicesMap);

$rectorConfig->ruleWithConfiguration(
ReplaceServiceContainerCallArgRector::class,
Expand Down
28 changes: 4 additions & 24 deletions config/sets/laravel90.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,22 @@

// https://github.com/laravel/framework/commit/8f9ddea4481717943ed4ecff96d86b703c81a87d
$rectorConfig
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdderWithoutDefaultValue(
'Illuminate\Contracts\Foundation\Application',
'storagePath',
0,
'path',
),
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdderWithoutDefaultValue('Illuminate\Contracts\Foundation\Application', 'storagePath', 0, 'path'),
]);

// https://github.com/laravel/framework/commit/e6c8aaea886d35cc55bd3469f1a95ad56d53e474
$rectorConfig
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdderWithoutDefaultValue(
'Illuminate\Foundation\Application',
'langPath',
0,
'path',
),
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdderWithoutDefaultValue('Illuminate\Foundation\Application', 'langPath', 0, 'path'),
]);

// https://github.com/laravel/framework/commit/e095ac0e928b5620f33c9b60816fde5ece867d32
$rectorConfig
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdderWithoutDefaultValue(
'Illuminate\Database\Eloquent\Model',
'touch',
0,
'attribute',
),
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdderWithoutDefaultValue('Illuminate\Database\Eloquent\Model', 'touch', 0, 'attribute'),
]);

// https://github.com/laravel/framework/commit/6daecf43dd931dc503e410645ff4a7d611e3371f
$rectorConfig
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdderWithoutDefaultValue(
'Illuminate\Queue\Failed\FailedJobProviderInterface',
'flush',
0,
'hours',
),
->ruleWithConfiguration(ArgumentAdderRector::class, [new ArgumentAdderWithoutDefaultValue('Illuminate\Queue\Failed\FailedJobProviderInterface', 'flush', 0, 'hours'),
]);

// https://github.com/laravel/framework/commit/84c78b9f5f3dad58f92161069e6482f7267ffdb6
Expand Down
31 changes: 0 additions & 31 deletions phpstan.neon

This file was deleted.

15 changes: 0 additions & 15 deletions phpunit.xml

This file was deleted.

Loading

0 comments on commit 849fe4e

Please sign in to comment.