[TYPO3-core] Coding Guidelines about PHP Namespaces

Michael Stucki michael.stucki at typo3.org
Mon Mar 25 09:07:31 CET 2013

This reminds me of a similar discussion about using globals some time
ago. We used the same rule of thumb for it, and I agree that it makes sense.

- michael

Am 25.03.2013 08:01, schrieb François Suter:
> 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

More information about the TYPO3-team-core mailing list