From 2a0ca617331ab82fe1a2f4406630b7e573402ae0 Mon Sep 17 00:00:00 2001 From: Niels Keurentjes Date: Sat, 21 Dec 2024 23:21:17 +0100 Subject: [PATCH] Test should not depend on mbstring module --- .../Mapping/NamingStrategy/CustomPascalNamingStrategy.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Tests/ORM/Mapping/NamingStrategy/CustomPascalNamingStrategy.php b/tests/Tests/ORM/Mapping/NamingStrategy/CustomPascalNamingStrategy.php index 104665aaa4e..fb3349cd936 100644 --- a/tests/Tests/ORM/Mapping/NamingStrategy/CustomPascalNamingStrategy.php +++ b/tests/Tests/ORM/Mapping/NamingStrategy/CustomPascalNamingStrategy.php @@ -20,8 +20,8 @@ class CustomPascalNamingStrategy implements NamingStrategy */ public function classToTableName(string $className): string { - if (false !== mb_strpos($className, '\\')) { - return mb_substr($className, mb_strrpos($className, '\\') + 1); + if (false !== strpos($className, '\\')) { + return substr($className, strrpos($className, '\\') + 1); } return $className; @@ -37,7 +37,7 @@ public function classToTableName(string $className): string */ public function propertyToColumnName(string $propertyName, ?string $className = null): string { - if (null !== $className && mb_strtolower($propertyName) == mb_strtolower($this->classToTableName($className)) . 'id') { + if (null !== $className && strtolower($propertyName) == strtolower($this->classToTableName($className)) . 'id') { return 'Id'; }