Open
Conversation
|
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. |
Contributor
There was a problem hiding this comment.
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/poiTypeinHubCommandFactoryand make some IDs optional when absent in payloads. - Clear
accountId,merchantId,paymentProfileId, andpoiTypeduringUninstallCommand::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.
…-core into feat/add-one-stone-to-uninstall-command-ECPJ-481
…ttps://github.com/pagarme/ecommerce-module-core into feat/add-one-stone-to-uninstall-command-ECPJ-481
camiladiasds
approved these changes
Mar 9, 2026
Mario-Junior
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
Descrição
Foi atualizado o
UninstallCommandpara processarpaymentProfileIdepoiType.Cenários testados
A classe
UninstallCommandnão possuía testes unitários. Criei testes para o cenário de One Stone, além de outros para aumentar a cobertura: