[TYPO3-core] Suggestion about use statement

Philipp Gampe philipp.gampe at typo3.org
Fri Feb 7 00:49:09 CET 2014

Hi Markus,

Markus Klein wrote:

> Therefore I propose to use the 'use' EVERYWHERE and ALWAYS in ALL
> branches.
> e.g. 'use' a class already when it's first used
> This has the following benefits for us:
> - One can see all used classes being used in one file already at the top
> of the file - No troubles on backports anymore, because we have it in all
> branches - Much shorter and thereby readable code
> - PHPStorm and other IDEs automatically take care of the 'use' statement
> when using a class

+1 I would have asked the very same in the next active contributor meetup.

Most classes only use very few other classes. IMHO, a large number of use 
statements shows a design flaw in the following code. The class is concerned 
with too much.

I would also prefer the nice summery of class usage that is generated with 
the use statements. It would be far more consistent than the current 
sometimes and sometimes not.

Best regards
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!

More information about the TYPO3-team-core mailing list