From cc722349d95082b999575fe7da1796e03450fd12 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 9 Jul 2019 23:30:57 -0700 Subject: [PATCH] CRM_Utils_File::baseFilePath() - Mark function as deprecated The rationale is provided in the docblock. --- CRM/Utils/File.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index 69a5465ca0..b338a52a70 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -577,8 +577,19 @@ HTACCESS; } /** - * Create the base file path from which all our internal directories are - * offset. This is derived from the template compile directory set + * (Deprecated) Create the file-path from which all other internal paths are + * computed. This implementation determines it as `dirname(CIVICRM_TEMPLATE_COMPILEDIR)`. + * + * This approach is problematic - e.g. it prevents one from authentically + * splitting the CIVICRM_TEMPLATE_COMPILEDIR away from other dirs. The implementation + * is preserved for backwards compatibility (and should only be called by + * CMS-adapters and by Civi\Core\Paths). + * + * Do not use it for new path construction logic. Instead, use Civi::paths(). + * + * @deprecated + * @see \Civi::paths() + * @see \Civi\Core\Paths */ public static function baseFilePath() { static $_path = NULL; -- 2.25.1