[TYPO3-core] Coding Guidelines about PHP Namespaces
François Suter
fsu-lists at cobweb.ch
Mon Mar 25 08:01:28 CET 2013
Hi,
> I don't think that this is a good approach. Imho classes should have
> minimal dependencies and the use of a "standardized use set" would
> encourage people to couple classes again. This makes every refactoring
> very hard as every dependency has to be considered.
>
> Use the imports where it's necessary. My rule of thumb is something like
> "is something used more then twice, then import", "is something from the
> same namespace used more then twice, import the namespace". Maybe such
> an advice could go into the CGL.
I agree with that. I don't see the point of having a default set of
"use" statements everywhere. Twice or more sounds good.
Cheers
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
More information about the TYPO3-team-core
mailing list