Possible regression - ContributionRecur.getoptionschanged
In 5.47 we have changed the pseudoconstant on ContributionRecur.payment_processor_id to get the title rather than the name. This caused breakage on our site as we have not filled in payment_processor.title so we got an array like
[1 => NULL, 2 => NULL]
When this was array-flipped it fatalled.
On reflection I'm going to re-write the relevant bit of our code but could it affect others?
payment_processor.title was added to core recently-ish and was optional. It's possible some sites would leave it blank in order to have 'nothing' show on the front end. In which case correctly the pseudoconstant could 'look like' a regression. Or perhaps other sites do what we did.
The right answer I think the 'correct' structure would be to have
name = unique machine name
master_id = way to link test processor to the master
title = display value
frontend_title = as shown on front end pages
The use of frontend_title is consistent with elsewhere (I think Justin pushed for that on other entities) and would get away from the need to use a title like 'Credit card' when you really want 'Eway'.
I suspect switching to using 'master_id' would be a transition rather than a quick change but the use of 'name' for this seems to keep biting us.
The immediate question
- does it make sense to add an upgrade to Five Forty Seven
UPDATE civicrm_payment_processor SET title = name WHERE title IS NULL
and / orUPDATE civicrm_payment_processor SET title = name WHERE title = ''
- or do we think it might break more than it fixes.