Skip to content

Commit d2fb4a7

Browse files
[9.x] Handle Symfony defaultName deprecation (#41555)
* Handle Symfony defaultName deprecation * Apply fixes from StyleCI * wip * wip Co-authored-by: StyleCI Bot <[email protected]>
1 parent 66bfbd5 commit d2fb4a7

File tree

74 files changed

+296
-0
lines changed

Some content is hidden

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

74 files changed

+296
-0
lines changed

src/Illuminate/Auth/Console/ClearResetsCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
namespace Illuminate\Auth\Console;
44

55
use Illuminate\Console\Command;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67

8+
#[AsCommand(name: 'auth:clear-resets')]
79
class ClearResetsCommand extends Command
810
{
911
/**
@@ -19,6 +21,8 @@ class ClearResetsCommand extends Command
1921
* This name is used to identify the command during lazy loading.
2022
*
2123
* @var string|null
24+
*
25+
* @deprecated
2226
*/
2327
protected static $defaultName = 'auth:clear-resets';
2428

src/Illuminate/Cache/Console/CacheTableCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
use Illuminate\Console\Command;
66
use Illuminate\Filesystem\Filesystem;
77
use Illuminate\Support\Composer;
8+
use Symfony\Component\Console\Attribute\AsCommand;
89

10+
#[AsCommand(name: 'cache:table')]
911
class CacheTableCommand extends Command
1012
{
1113
/**
@@ -21,6 +23,8 @@ class CacheTableCommand extends Command
2123
* This name is used to identify the command during lazy loading.
2224
*
2325
* @var string|null
26+
*
27+
* @deprecated
2428
*/
2529
protected static $defaultName = 'cache:table';
2630

src/Illuminate/Cache/Console/ClearCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
use Illuminate\Cache\CacheManager;
66
use Illuminate\Console\Command;
77
use Illuminate\Filesystem\Filesystem;
8+
use Symfony\Component\Console\Attribute\AsCommand;
89
use Symfony\Component\Console\Input\InputArgument;
910
use Symfony\Component\Console\Input\InputOption;
1011

12+
#[AsCommand(name: 'cache:clear')]
1113
class ClearCommand extends Command
1214
{
1315
/**
@@ -23,6 +25,8 @@ class ClearCommand extends Command
2325
* This name is used to identify the command during lazy loading.
2426
*
2527
* @var string|null
28+
*
29+
* @deprecated
2630
*/
2731
protected static $defaultName = 'cache:clear';
2832

src/Illuminate/Cache/Console/ForgetCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
use Illuminate\Cache\CacheManager;
66
use Illuminate\Console\Command;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78

9+
#[AsCommand(name: 'cache:forget')]
810
class ForgetCommand extends Command
911
{
1012
/**
@@ -20,6 +22,8 @@ class ForgetCommand extends Command
2022
* This name is used to identify the command during lazy loading.
2123
*
2224
* @var string|null
25+
*
26+
* @deprecated
2327
*/
2428
protected static $defaultName = 'cache:forget';
2529

src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
use Illuminate\Console\Command;
66
use Illuminate\Console\Events\ScheduledBackgroundTaskFinished;
77
use Illuminate\Contracts\Events\Dispatcher;
8+
use Symfony\Component\Console\Attribute\AsCommand;
89

10+
#[AsCommand(name: 'schedule:finish')]
911
class ScheduleFinishCommand extends Command
1012
{
1113
/**
@@ -21,6 +23,8 @@ class ScheduleFinishCommand extends Command
2123
* This name is used to identify the command during lazy loading.
2224
*
2325
* @var string|null
26+
*
27+
* @deprecated
2428
*/
2529
protected static $defaultName = 'schedule:finish';
2630

src/Illuminate/Console/Scheduling/ScheduleRunCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
use Illuminate\Contracts\Debug\ExceptionHandler;
1111
use Illuminate\Contracts\Events\Dispatcher;
1212
use Illuminate\Support\Facades\Date;
13+
use Symfony\Component\Console\Attribute\AsCommand;
1314
use Throwable;
1415

16+
#[AsCommand(name: 'schedule:run')]
1517
class ScheduleRunCommand extends Command
1618
{
1719
/**
@@ -27,6 +29,8 @@ class ScheduleRunCommand extends Command
2729
* This name is used to identify the command during lazy loading.
2830
*
2931
* @var string|null
32+
*
33+
* @deprecated
3034
*/
3135
protected static $defaultName = 'schedule:run';
3236

src/Illuminate/Console/Scheduling/ScheduleTestCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
use Illuminate\Console\Command;
66
use Illuminate\Support\Str;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78

9+
#[AsCommand(name: 'schedule:test')]
810
class ScheduleTestCommand extends Command
911
{
1012
/**
@@ -20,6 +22,8 @@ class ScheduleTestCommand extends Command
2022
* This name is used to identify the command during lazy loading.
2123
*
2224
* @var string|null
25+
*
26+
* @deprecated
2327
*/
2428
protected static $defaultName = 'schedule:test';
2529

src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
use Illuminate\Console\Command;
66
use Illuminate\Support\Carbon;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78
use Symfony\Component\Process\Process;
89

10+
#[AsCommand(name: 'schedule:work')]
911
class ScheduleWorkCommand extends Command
1012
{
1113
/**
@@ -21,6 +23,8 @@ class ScheduleWorkCommand extends Command
2123
* This name is used to identify the command during lazy loading.
2224
*
2325
* @var string|null
26+
*
27+
* @deprecated
2428
*/
2529
protected static $defaultName = 'schedule:work';
2630

src/Illuminate/Database/Console/DumpCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
use Illuminate\Database\Events\SchemaDumped;
1010
use Illuminate\Filesystem\Filesystem;
1111
use Illuminate\Support\Facades\Config;
12+
use Symfony\Component\Console\Attribute\AsCommand;
1213

14+
#[AsCommand(name: 'schema:dump')]
1315
class DumpCommand extends Command
1416
{
1517
/**
@@ -28,6 +30,8 @@ class DumpCommand extends Command
2830
* This name is used to identify the command during lazy loading.
2931
*
3032
* @var string|null
33+
*
34+
* @deprecated
3135
*/
3236
protected static $defaultName = 'schema:dump';
3337

src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
use Illuminate\Console\GeneratorCommand;
66
use Illuminate\Support\Str;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78
use Symfony\Component\Console\Input\InputOption;
89

10+
#[AsCommand(name: 'make:factory')]
911
class FactoryMakeCommand extends GeneratorCommand
1012
{
1113
/**
@@ -21,6 +23,8 @@ class FactoryMakeCommand extends GeneratorCommand
2123
* This name is used to identify the command during lazy loading.
2224
*
2325
* @var string|null
26+
*
27+
* @deprecated
2428
*/
2529
protected static $defaultName = 'make:factory';
2630

0 commit comments

Comments
 (0)