From 122f86c70193b9134f7b45a548c336f96f8e651d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFck=20Piera?= Date: Fri, 3 May 2024 21:52:40 +0200 Subject: [PATCH] Remove mb_string extension requirement --- CHANGELOG.md | 4 ++++ src/OsHelper.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36a957e..1df1567 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## Not released yet + +* Remove mb_string extension requirement + ## 0.1.0 (2023-13-03) * Initial release diff --git a/src/OsHelper.php b/src/OsHelper.php index 1d8445c..ad1a654 100644 --- a/src/OsHelper.php +++ b/src/OsHelper.php @@ -15,7 +15,7 @@ public static function isUnix(): bool public static function isWindowsSubsystemForLinux(): bool { - return self::isUnix() && false !== mb_strpos(strtolower(php_uname()), 'microsoft'); + return self::isUnix() && str_contains(strtolower(php_uname()), 'microsoft'); } public static function isWindows(): bool