Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
CRM_Core_DAO_Base
with (mostly) static alias CRM_*_DAO_Base
* This approach defines `CRM_*_DAO_Base`. * When deployed on 5.74+, `CRM_*_DAO_Base` will be exactly the same as `CRM_Core_DAO_Base` In other words: class CRM_Foo_DAO_MyData extends CRM_Foo_DAO_Base {} class_alias('CRM_Core_DAO_Base', 'CRM_Foo_DAO_Base'); class CRM_Core_DAO_Base extends CRM_Core_DAO {} * When deployed on <5.74, `CRM_*_DAO_Base` will use the anonymous backport variant from civimix. In other words: class CRM_Foo_DAO_MyData extends CRM_Foo_DAO_Base {} class_alias('CiviMix\Schema\Foo\DAO', 'CRM_Foo_DAO_Base'); ^^ Read anonymous class... which extends CRM_Core_DAO * In this arrangement, the anonymous DAO implementation is -only- used on old versions. Once you get to 5.74+, you use the local base. This should provide better IDE hints and simpler callstacks. You presumptively do not get backports of changes/improvements in the DAO base.
- Loading branch information