chore(legacy): deprecate OC_Util::runningOnMac()

- Easy enough query directly these days; Only used in one spot anyhow
- Updated the runningOnMac method to use PHP_OS_FAMILY just for clarity until we can remove the function entirely (same result; supported since PHP ~7.4).

Signed-off-by: Josh <josh.t.richards@gmail.com>
pull/56816/head
Josh 2025-12-02 18:46:16 +07:00 committed by Josh Richards
parent 756efb76aa
commit cc873ccaec
1 changed files with 6 additions and 2 deletions

@ -733,12 +733,16 @@ class OC_Util {
}
/**
* Checks whether the server is running on Mac OS X
* Checks whether PHP is running directly on macOS.
*
* Note: In a Linux container, this will be false even on a macOS host
* (PHP just sees "Linux").
*
* @return bool true if running on Mac OS X, false otherwise
* @deprecated 33.0.0 Query PHP_OS_FAMILY directly.
*/
public static function runningOnMac() {
return (strtoupper(substr(PHP_OS, 0, 6)) === 'DARWIN');
return (PHP_OS_FAMILY === 'Darwin');
}
/**