Skip to content

Commit d2ca305

Browse files
committed
replace static property $defaultName in commands with command attributes of tag "console.command"
1 parent 6dcf986 commit d2ca305

File tree

6 files changed

+5
-15
lines changed

6 files changed

+5
-15
lines changed

src/Command/ClearExpiredTokensCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
final class ClearExpiredTokensCommand extends Command
1717
{
18-
protected static $defaultName = 'league:oauth2-server:clear-expired-tokens';
19-
2018
/**
2119
* @var AccessTokenManagerInterface
2220
*/

src/Command/CreateClientCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
final class CreateClientCommand extends Command
2020
{
21-
protected static $defaultName = 'league:oauth2-server:create-client';
22-
2321
/**
2422
* @var ClientManagerInterface
2523
*/

src/Command/DeleteClientCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
final class DeleteClientCommand extends Command
1515
{
16-
protected static $defaultName = 'league:oauth2-server:delete-client';
17-
1816
/**
1917
* @var ClientManagerInterface
2018
*/

src/Command/ListClientsCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ final class ListClientsCommand extends Command
2020
{
2121
private const ALLOWED_COLUMNS = ['name', 'identifier', 'secret', 'scope', 'redirect uri', 'grant type'];
2222

23-
protected static $defaultName = 'league:oauth2-server:list-clients';
24-
2523
/**
2624
* @var ClientManagerInterface
2725
*/

src/Command/UpdateClientCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
final class UpdateClientCommand extends Command
1919
{
20-
protected static $defaultName = 'league:oauth2-server:update-client';
21-
2220
/**
2321
* @var ClientManagerInterface
2422
*/

src/Resources/config/services.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,28 +235,28 @@
235235
service(ClientManagerInterface::class),
236236
null,
237237
])
238-
->tag('console.command')
238+
->tag('console.command', ['command' => 'league:oauth2-server:create-client'])
239239
->alias(CreateClientCommand::class, 'league.oauth2_server.command.create_client')
240240

241241
->set('league.oauth2_server.command.update_client', UpdateClientCommand::class)
242242
->args([
243243
service(ClientManagerInterface::class),
244244
])
245-
->tag('console.command')
245+
->tag('console.command', ['command' => 'league:oauth2-server:update-client'])
246246
->alias(UpdateClientCommand::class, 'league.oauth2_server.command.update_client')
247247

248248
->set('league.oauth2_server.command.delete_client', DeleteClientCommand::class)
249249
->args([
250250
service(ClientManagerInterface::class),
251251
])
252-
->tag('console.command')
252+
->tag('console.command', ['command' => 'league:oauth2-server:delete-client'])
253253
->alias(DeleteClientCommand::class, 'league.oauth2_server.command.delete_client')
254254

255255
->set('league.oauth2_server.command.list_clients', ListClientsCommand::class)
256256
->args([
257257
service(ClientManagerInterface::class),
258258
])
259-
->tag('console.command')
259+
->tag('console.command', ['command' => 'league:oauth2-server:list-clients'])
260260
->alias(ListClientsCommand::class, 'league.oauth2_server.command.list_clients')
261261

262262
->set('league.oauth2_server.command.clear_expired_tokens', ClearExpiredTokensCommand::class)
@@ -265,7 +265,7 @@
265265
service(RefreshTokenManagerInterface::class),
266266
service(AuthorizationCodeManagerInterface::class),
267267
])
268-
->tag('console.command')
268+
->tag('console.command', ['command' => 'league:oauth2-server:clear-expired-tokens'])
269269
->alias(ClearExpiredTokensCommand::class, 'league.oauth2_server.command.clear_expired_tokens')
270270

271271
// Utility services

0 commit comments

Comments
 (0)