From d6b80559e889f6fa207ab18fae6731e29f63542f Mon Sep 17 00:00:00 2001 From: Guido Scialfa Date: Mon, 18 Mar 2024 18:54:29 +0100 Subject: [PATCH] Use `PATHINFO_BASENAME` for interoperability The usage of the flag `PATHINFO_FILENAME` might strip part of the name of the project. One case might be a theme having a dot as part of the name, for instance when we want to differentiate the different versions of a theme we have in our installation. Signed-off-by: Guido Scialfa --- src/Properties/BaseProperties.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Properties/BaseProperties.php b/src/Properties/BaseProperties.php index 8bbc730..1924677 100644 --- a/src/Properties/BaseProperties.php +++ b/src/Properties/BaseProperties.php @@ -64,7 +64,7 @@ protected function sanitizeBaseName(string $name): string { substr_count($name, '/') and $name = dirname($name); - return strtolower(pathinfo($name, PATHINFO_FILENAME)); + return strtolower(pathinfo($name, PATHINFO_BASENAME)); } /**