Skip to content

Add CreateContactAndContribution-Matcher - #558

Open
CS-DaS wants to merge 1 commit into
Project60:masterfrom
CS-DaS:issue/123
Open

Add CreateContactAndContribution-Matcher#558
CS-DaS wants to merge 1 commit into
Project60:masterfrom
CS-DaS:issue/123

Conversation

@CS-DaS

@CS-DaS CS-DaS commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

This PR aims to solve #123

It introduces the followind PHPStand finding, which I would suggest to add to the PHPStan Baseline as it is created by the generic nature auf civicrm_api4:

Run PHPStan: tests/phpunit/CRM/Banking/TestBase.php#L426
Method CRM_Banking_TestBase::getLatestContact() should return array<string> but returns mixed.

And it introduces the following PHPStan finding, which could onbly be solved by changing code outside of the scope of this issue:

Run PHPStan: CRM/Banking/PluginImpl/Matcher/CreateContactAndContribution.php#L32
Parameter #1 $plugin_dao of method CRM_Banking_PluginModel_Matcher::__construct() expects CRM_Banking_DAO_PluginInstance, string given.

The PR lacks translation. I will be happy to add translation after clarifying my question in #553

The PR lacks refactoring to avoid code duplication with the CreateContribution matcher. I will soon add this refactoring.

The matcher lacks support for households. It currently only creates Individuals and Organizations. We would prefer to keep it like this due to limited funding. Please let me know if that would prevent you from merging this PR.

If you feel to do so, I would appreciate to already get your feedback on the current state. Thanks for your contributions!

@CS-DaS

CS-DaS commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

After going through the findings of PHPStan and PHP_CodeSniffer, I think the code differs quite a lot from the code in CreateContribution-matcher. Thus my suggestion would be to not refactor both and do the cleanup of the CreateContribution-matcher in a different PR.

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.

1 participant