[TYPO3-core] Suggestion about use statement

Stefan Neufeind typo3.neufeind at speedpartner.de
Thu Feb 6 10:38:48 CET 2014


On 02/06/2014 10:31 AM, Markus Klein wrote:
> 
> I’d like to bring a topic out for discussion that regularly causes
> problems for us.
> 
> The ‘use’ statement.
> 
> Our current procedure is to make use of the ‘use’ statement when we
> use a class more than 10 times in one file. This has the
> disadvantages that we have inconsistent code from file to file where
> the usage numbers varies and we always have troubles with backports
> where the ‘use’ statement is not present in the other branches.
> 
> Therefore I propose to use the 'use' EVERYWHERE and ALWAYS in ALL
> branches.
> 
> e.g. 'use' a class already when it's first used

[...]

Personally I think that doing it for "every" class and on first
occurence would be a bit too much. But I'm not against it.

What I suggested a while back was to at least backport the one large
patch that added "use"-statements in various places. This would have
saved us some trouble on backports in the past at least.


Kind regards,
 Stefan


More information about the TYPO3-team-core mailing list