dev/core#2814 Add support for preferred syntax for contact tokens
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 22 Sep 2021 12:00:29 +0000 (00:00 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 22 Sep 2021 12:20:19 +0000 (00:20 +1200)
commit2478a7f2f54d190186007daf8090a7704473a1c9
treeb0d1b08bb687e0b3ce5ca4c2ebe47fdde19f6fa7
parent3ed153be69fa2bd14509b51de58c7a415728b977
dev/core#2814 Add support for preferred syntax for contact tokens

This maintains support for all currently advertised tokens. But it
switches the advertisement to our preferred style (matching the db field,
specifically denoting if the label is desired.) Tests for both styles are added.

This is a step towards switching to apiv4. An important difference with v4 is
that we can distinquish between 'not fetched' and 'empty' - saving us
from extra queries when it is not clear - which will in turn
allow us to switch greeting
processing over & still support the performance tweaks via
that method
Civi/Token/TokenCompatSubscriber.php
tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php