biig-io / biig-io/DomainComponent
execute method should expect an interface
Open
- Dominant language
- PHP
- Stars
- 16
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Currently to have a good code in rules, we need to check if the event is an instance of the event we expect. (required at least by phpstan)
We could improve the situation by replacing DomainEvent by DomainEventInterface, because we can use children interface as type afterwards.
Contributor guide
Research direction
Start at the execute method and trace how DomainEvent is used in its parameter type and in the rules that consume events. Replace the expected type with DomainEventInterface, verify that child interfaces can be accepted, and run the existing test suite and PHPStan checks to confirm the typing remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100