Project

General

Profile

Actions

Bug #54916

closed

Consolidate path methods into PathUtility

Added by Michiel Roos almost 11 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Code Cleanup
Target version:
-
Start date:
2014-01-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:
Remote Sprint

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()
For getting a relative path:
  • \TYPO3\CMS\Backend\Module\ModuleLoader::getRelativePath()
  • \TYPO3\CMS\Core\Utility\PathUtility::getRelativePath()
  • \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::getRelativePath()
  • \TYPO3\CMS\Install\FolderStructure\AbstractNode::getRelativePathBelowSiteRoot()
For checking is something is an absolute path:
  • \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.

Actions

Also available in: Atom PDF