summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b2f4ac4)
The conversion from a class name such as
tx_extensionname_domain_model_somename to its corresponding PHP file
does not take Extbase naming conventions for the file name. This yields
an wrongly-cased file name which will be validated anyway on case
insensitive file systems.
This wrong conversion may lead to a PHP fatal error
Cannot redeclare class VendorName\Extension\Domain\Model\Somename
Fixes: #55256
Releases: 6.2
Change-Id: Ibe512945ac01f53844f790bea9f0d0cf58518c54
Reviewed-on: https://review.typo3.org/26999
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Marcin Sągol
Reviewed-by: Stefan Neufeind
Tested-by: Marcin Sągol
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
} else {
$classesPath = $this->packageClassesPaths[$extensionKey];
}
} else {
$classesPath = $this->packageClassesPaths[$extensionKey];
}
- $classFilePath = $classesPath . strtr($classNameWithoutVendorAndProduct, $delimiter, '/') . '.php';
+ // Naming convention is to capitalize each part of the path
+ $classNameWithoutVendorAndProduct = ucwords(strtr($classNameWithoutVendorAndProduct, $delimiter, LF));
+ $classFilePath = $classesPath . strtr($classNameWithoutVendorAndProduct, LF, '/') . '.php';
if (@file_exists($classFilePath)) {
return array($classFilePath, $className);
}
if (@file_exists($classFilePath)) {
return array($classFilePath, $className);
}