[TYPO3-project-4-3] Re: [TYPO3-dev] Cleaning up t3lib-filenames

Dan Osipov dosipov at phillyburbs.com
Tue Sep 29 14:33:40 CEST 2009


I would think that would clutter up the system, making it even harder to 
get around. There would be a bunch of what you call "compatibility 
files" pointing to real files, confusing developers.

My 2 cents.

Dan Osipov
Calkins Media
http://danosipov.com/blog/

Martin Kutschker wrote:
> 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-project-4-3 mailing list