Skip to content

Messenger component does not work with PUT, DELETE, GET #3082

Description

@mxkh

Hi! I want to use Message component with PUT\PATCH, DELETE and GET but as I understand the message component work only with POST method, am I right? For example

/**
 * @ApiResource(
 *     shortName="Club",
 *     routePrefix="crm",
 *     messenger="input",
 *     collectionOperations={
 *          "get",
 *          "post"={"path"="/clubs", "input"=CreateClubCommand::class},
 *     },
 *     itemOperations={
 *          "get"={"path"="/clubs/{id}", "input"=FindClubByNameQueryItem::class},
 *          "put"={"path"="/clubs/{id}", "input"=UpdateClubCommand::class}
 *     },
 *     normalizationContext={"groups"={"club_item", "club_list"}},
 *     denormalizationContext={"groups"={"club_write"}}
 * )
 */
final class ClubResource

In this case, I expect that all input DTO's (commands\queries) will be passed to their handlers as in POST case. Is it possible to do without custom code? How do you see it's better to use message component for other request methods e.g. GET, PUT, DELETE to implement CQS or CQRS?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions