diff --git a/application/utils.inc.php b/application/utils.inc.php index f822de8f9..98a09758f 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -2127,6 +2127,12 @@ class utils * or an empty string if no such module is found (or not called within a module file) * * @uses \debug_backtrace() + * + * @since 3.0.0 Before writing model.*.php file, compiler will now always delete it. + * If you have symlinks enabled, base dir will be original module dir, but since this behavior change this won't be true anymore for model.*.php + * In consequence the backtrace analysis won't be possible for this file + * See N°4854 + * @link https://www.itophub.io/wiki/page?id=3_0_0%3Arelease%3A3_0_whats_new#compiler_always_generate_new_model_php compiler behavior change documentation */ public static function GetCurrentModuleDir($iCallDepth) { diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php index 572fd5fad..89b1e5088 100644 --- a/setup/compiler.class.inc.php +++ b/setup/compiler.class.inc.php @@ -3542,12 +3542,22 @@ EOF; /** * Write a file only if not exists - * Also add some informations in case of a write failleure - * @param $sFilename - * @param $sContent + * Also add some informations when write failure occurs + * + * @param string $sFilename + * @param string $sContent + * @param int $flags * * @return bool|int * @throws \Exception + * + * @uses \unlink() + * @uses \file_put_contents() + * + * @since 3.0.0 The file is removed before writing (commit c5d265f6) + * For now this causes model.*.php files to always be located in env-* dir, even if symlinks are enabled + * See N°4854 + * @link https://www.itophub.io/wiki/page?id=3_0_0%3Arelease%3A3_0_whats_new#compiler_always_generate_new_model_php compiler behavior change documentation */ protected function WriteFile($sFilename, $sContent, $flags = null) {