Skip to content

Fix missing route name on operations attributes #994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 1.12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Api/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final class Delete extends HttpOperation implements DeleteOperationInterface, Ap
{
public function __construct(
?string $path = null,
?string $routeName = null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm considering releasing this in a patch because it could potentially be a BC break and could affect the end application 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want me to move it at the end of the constructor? Normally, lot of people is using name parameter but you're right. I don't remember if theses classes are marked as ecperimental.

?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand All @@ -50,6 +51,7 @@ public function __construct(
parent::__construct(
methods: ['DELETE'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'delete',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Api/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final class Get extends HttpOperation implements ShowOperationInterface, ApiOper
{
public function __construct(
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand All @@ -50,6 +51,7 @@ public function __construct(
parent::__construct(
methods: ['GET'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'get',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Api/GetCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final class GetCollection extends HttpOperation implements CollectionOperationIn
{
public function __construct(
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand All @@ -50,6 +51,7 @@ public function __construct(
parent::__construct(
methods: ['GET'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'get_collection',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Api/Patch.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final class Patch extends HttpOperation implements UpdateOperationInterface, Api
{
public function __construct(
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand All @@ -50,6 +51,7 @@ public function __construct(
parent::__construct(
methods: ['PATCH'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'patch',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Api/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final class Post extends HttpOperation implements CreateOperationInterface, ApiO
{
public function __construct(
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand All @@ -50,6 +51,7 @@ public function __construct(
parent::__construct(
methods: ['POST'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'post',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Api/Put.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final class Put extends HttpOperation implements UpdateOperationInterface, ApiOp
{
public function __construct(
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand All @@ -50,6 +51,7 @@ public function __construct(
parent::__construct(
methods: ['PUT'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'put',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/ApplyStateMachineTransition.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class ApplyStateMachineTransition extends HttpOperation implements UpdateO
public function __construct(
?array $methods = null,
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand All @@ -44,6 +45,7 @@ public function __construct(
parent::__construct(
methods: $methods ?? ['PUT', 'PATCH', 'POST'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? $stateMachineTransition ?? 'apply_state_machine_transition',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/BulkDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class BulkDelete extends HttpOperation implements DeleteOperationInterface
public function __construct(
?array $methods = null,
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand All @@ -44,6 +45,7 @@ public function __construct(
parent::__construct(
methods: $methods ?? ['DELETE', 'POST'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'bulk_delete',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/BulkUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class BulkUpdate extends HttpOperation implements UpdateOperationInterface
public function __construct(
?array $methods = null,
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand Down Expand Up @@ -51,6 +52,7 @@ public function __construct(
parent::__construct(
methods: $methods ?? ['PUT', 'PATCH'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'bulk_update',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ final class Create extends HttpOperation implements CreateOperationInterface, St
public function __construct(
?array $methods = null,
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand Down Expand Up @@ -58,6 +59,7 @@ public function __construct(
parent::__construct(
methods: $methods ?? ['GET', 'POST'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'create',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class Delete extends HttpOperation implements DeleteOperationInterface
public function __construct(
?array $methods = null,
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand Down Expand Up @@ -49,6 +50,7 @@ public function __construct(
parent::__construct(
methods: $methods ?? ['DELETE', 'POST'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'delete',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class Index extends HttpOperation implements CollectionOperationInterface,
public function __construct(
?array $methods = null,
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand Down Expand Up @@ -49,6 +50,7 @@ public function __construct(
parent::__construct(
methods: $methods ?? ['GET'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'index',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Show.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class Show extends HttpOperation implements ShowOperationInterface
public function __construct(
?array $methods = null,
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand All @@ -48,6 +49,7 @@ public function __construct(
parent::__construct(
methods: $methods ?? ['GET'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'show',
Expand Down
2 changes: 2 additions & 0 deletions src/Component/src/Metadata/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class Update extends HttpOperation implements UpdateOperationInterface, St
public function __construct(
?array $methods = null,
?string $path = null,
?string $routeName = null,
?string $routePrefix = null,
?string $template = null,
?string $shortName = null,
Expand Down Expand Up @@ -52,6 +53,7 @@ public function __construct(
parent::__construct(
methods: $methods ?? ['GET', 'PUT', 'POST'],
path: $path,
routeName: $routeName,
routePrefix: $routePrefix,
template: $template,
shortName: $shortName ?? 'update',
Expand Down