transitionParticipants() - Improve $contactDetails cache maintenance
authorTim Otten <totten@civicrm.org>
Thu, 4 Nov 2021 03:26:27 +0000 (20:26 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 4 Nov 2021 03:26:27 +0000 (20:26 -0700)
commit972986615f646f2d6e8ebb40446afe2a230c2d52
tree5209bd8fde30ae6f086dbde552f156ddd3fd3b59
parent943c6d0cf5da1efccd71784ff63708cb38a88727
transitionParticipants() - Improve $contactDetails cache maintenance

This revises a very recent commit that touches `static $contactDetails` cache.

Imagine you have two calls to `transitionParticipants()` which involve different-but-overlapping sets:

* First invocation involves Alice and Bob
* Second invocation involves Bob and Carol

The first invocation loads Alice and Bob into `$contactDetails`.  The second
invocation identifies Carol as missing. We need to load Carol. Here's the change:

* Before: Carol overwrites Bob in `$contactDetails`. Bob goes missing.
* After: Alice, Bob, and Carol all exist in `$contactDetails`.
CRM/Event/BAO/Participant.php