Civi\Angular\ChangeSet - Relax debug-mode consistency check
authorTim Otten <totten@civicrm.org>
Thu, 13 Jun 2019 16:30:41 +0000 (12:30 -0400)
committerTim Otten <totten@civicrm.org>
Thu, 13 Jun 2019 16:30:41 +0000 (12:30 -0400)
commit69b7411ccc1940adc1c08c35bbbfbe4400909751
tree841973b5c39ad2695df1702cedb1bd378f0613e3
parent5976ea1d38ce82f3dc7abb29743bae418f5ffeb5
Civi\Angular\ChangeSet - Relax debug-mode consistency check

Overview
--------

The Angular subsystem *sometimes* includes a consistency-check. The consistency check ensures that an HTML document is
read/written in consistency format (i.e. `encode(decode($html)) === $html`). However, the check is not often run, and
it sometimes produces errors on consistency issues which we don't care about.

This approach here is to relaxes the checks in `civicrm-core` and reproduce them in separate developer-oriented tooling.

Before
------

* If an Angular HTML partial is not altered (`hook_civicrm_alterAngular`), then the partial is *not* checked for consistency.
* If a site is in production/non-debug mode, then the partial is *not* checked for consistency.
* If a site is in debug mode, then the partial *is* checked for consistency.

After
-----

* The partial is not checked for consistency.
* A task is recorded on the [Afform roadmap](https://github.com/totten/afform/blob/master/docs/roadmap.md) to include
  better consistency checks in the `afform_auditor` extension.
Civi/Angular/ChangeSet.php