[TYPO3-dev] Cleaning up t3lib-filenames

Andy Grunwald [wmdb] andreas.grunwald at wmdb.de
Thu Oct 1 14:32:33 CEST 2009


For a few days i think about the same issue.
And in my mind i came to the same solution as you.

Mark the old files (for example "class.t3lib_page.php") as deprecated 
(for example per phpDoc comment or svn-property).

So: +1 by me

Martin Kutschker schrieb:
> Moving the topic to typo3.projects.typo3_4-3.general.
> 
> Maybe it gets there more attention.
> 
> Martin Kutschker schrieb:
>> How about rename a couple of files in a backwards compatible manner in t3lib so that the class name
>> leads directly to the file path?
>>
>> The whole procedure may not be presented as a diff as existing files are renamed (and moved) and new
>> files are added in their stead.
>>
>> eg
>> svn mv class.t3lib_page.php class.t3lib_pageselect.php
>> mv class.t3lib_page-compat.php class.t3lib_page.php
>> svn add class.t3lib_page.php
>>
>> The compatibility file (class.t3lib_page.php) contains only one line:
>>
>> require_once(PATH_t3lib . 'class.t3lib_pageselect.php');
>>
>> Because of the autoloader this isn't really necessary, but so the file is at least not empty.
>>
>> The file with the new name has a changed extended XCLASS section:
>>
>> if (defined('TYPO3_MODE')) {
>>  if ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pageselect.php']) {
>>     include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pageselect.php']);
>>  } elseif ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_page.php']) {
>>     // backwards compatibility
>>     include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_page.php']);
>>   }
>> }
> 




More information about the TYPO3-dev mailing list