Bug #54916
closedConsolidate path methods into PathUtility
0%
Description
There are many path related methods in the core that are named almost the same. Sometimes they are functionally identical and sometimes they are not. All path related methods should be moved to \TYPO3\CMS\Core\Utility\PathUtility and the other methods should be deprecated.
For getting an absolute path:- \TYPO3\CMS\Core\Resource\Driver\LocalDriver::getAbsolutePath()
- \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::getAbsolutePath()
- \TYPO3\CMS\Backend\Module\ModuleLoader::getRelativePath()
- \TYPO3\CMS\Core\Utility\PathUtility::getRelativePath()
- \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::getRelativePath()
- \TYPO3\CMS\Install\FolderStructure\AbstractNode::getRelativePathBelowSiteRoot()
- \TYPO3\CMS\Core\Utility\GeneralUtility::isAbsPath()
- \TYPO3\CMS\Core\Utility\PathUtility::isAbsolutePath()
We can grep out a list of method declarations in the core (excluding Tests, contrib, etc.), and then check this list for any duplicate method implementations.
I'll cook a patch for the path methods.
Updated by Philipp Gampe almost 11 years ago
- Category set to Code Cleanup
- Status changed from New to Accepted
- Assignee set to Michiel Roos
Make sure to validate every method if it can be used out of context.
Updated by Anja Leichsenring almost 10 years ago
- Sprint Focus set to On Location Sprint
Updated by Anja Leichsenring over 9 years ago
- Sprint Focus changed from On Location Sprint to Remote Sprint
Updated by Susanne Moog over 4 years ago
- Status changed from Accepted to Closed
Closing as I don't think anyone is currently actively working on it and looking at the issue and the methods most of these are either
- legacy code which will break a lot of installations if removed / deprecated (GeneralUtility)
- context dependent different implementations (for example FAL vs. PathUtility)
- wrappers for each other (a lot of methods call Path/GeneralUtility in the end)
If you still want to spend time reworking this part, feel free to reopen the issue.