Skip to content

Feat: Add One Stone to UninstallCommand#191

Open
RafaMelazzo wants to merge 9 commits intodevelopfrom
feat/add-one-stone-to-uninstall-command-ECPJ-481
Open

Feat: Add One Stone to UninstallCommand#191
RafaMelazzo wants to merge 9 commits intodevelopfrom
feat/add-one-stone-to-uninstall-command-ECPJ-481

Conversation

@RafaMelazzo
Copy link
Contributor

@RafaMelazzo RafaMelazzo commented Mar 6, 2026

David Bowie Labyrinth Dancing and Kicking Gobling

Important

Certifique-se de criar o PR para a branch develop.

Tarefa: ECPJ-481

Qual o tipo de PR é esse? (marque todos os aplicáveis)

  • Refatoração
  • Adição de funcionalidade
  • Correção de bug
  • Otimização
  • Atualização de documentação

Descrição

Foi atualizado o UninstallCommand para processar paymentProfileId e poiType.

Cenários testados

A classe UninstallCommand não possuía testes unitários. Criei testes para o cenário de One Stone, além de outros para aumentar a cobertura:

image

@RafaMelazzo RafaMelazzo requested a review from Copilot March 6, 2026 13:05
@backstage-catalog-validator
Copy link

⚠️ Este repositório ainda não está catalogado no Backstage. ⚠️

Por favor, catalogue-o seguindo as instruções nesta documentação. [Via VPN].

💁 Qualquer problema ou dúvida, estamos no Slack, basta abrir um ticket no canal #help-foundation-platform.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends Hub command handling to include paymentProfileId and poiType, ensures uninstall clears these (and related identifiers) from persisted configuration, and expands unit test coverage around command factory behavior and uninstall flows.

Changes:

  • Populate paymentProfileId / poiType in HubCommandFactory and make some IDs optional when absent in payloads.
  • Clear accountId, merchantId, paymentProfileId, and poiType during UninstallCommand::execute().
  • Add/expand PHPUnit coverage for command factory creation/population and uninstall behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Hub/Factories/HubCommandFactory.php Populates new fields (paymentProfileId, poiType) and makes account_id / merchant_id optional.
src/Hub/Commands/UninstallCommand.php Ensures uninstall resets additional configuration fields (accountId, merchantId, paymentProfileId, poiType).
src/Hub/Commands/AbstractCommand.php Updates docblocks to reflect nullable IDs (no behavior change).
tests/Hub/Factories/HubCommandFactoryTest.php Adds broader factory tests for command creation, field population, and invalid payloads.
tests/Hub/Commands/UninstallCommandTest.php Introduces uninstall tests covering denial scenarios and persisted configuration cleanup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RafaMelazzo RafaMelazzo marked this pull request as ready for review March 6, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants