[TYPO3-50-general] Package Key Guidelines

Tim Eilers tim.eilers at web.de
Wed May 7 23:45:55 CEST 2008

Hi Jochen,

Jochen Rau schrieb:
>> to this whole part:
>> here you notice what i wrote above. F3_ shouldnt and cant be used, 
>> because it contains underscores. but also F3 shouldn't be used.
>> also "keywords" shouldn't be used. i don't know what robert included 
>> in his code, but i am just thinking about special OO keywords like 
>> "Interface", "Abstract", "Class" and so on. also already taken 
>> packages should be forbidden: "FLOW3", "Testing" and so on.
> I don't think we should be so restrictive as 
> "F3_ClassRoomManager_Repository" is a great name for a domain model ;-)

Ok, i think the technical thing is more problematic in the methods used.
But i still think at least Interface and Abstract should be forbidden. 
Of Course it will perhaps still run, but you will get confused, when a 
you have for example a package name like WePaintAbstract and then later 
have a class like F3_WePaintAbstract_RepositoryAbstract... Needs to be 

> It seems that we are at cross-purposes. Take
> ^[A-Z][A-Za-z0-9]+$ as RegEx for package keys
> ^F3(?:_[A-Z][A-Za-z0-9]+)+$ as RegEx for class and component names.

For the first time i think that is ok. When the first packages are 
registered we will see, which package names cause confusion and which not.

>> i think one char package names should be forbidden.
> I agree.

and you RegEx fits to that. perfect!

>> one last thing:
>> in FLOW3CGL at the moment we only check the whole class name. we only 
>> check if it exceeds the allowed characters a-z A-Z 0-9 and _
>> at this moment i see that we dont check for uppercase word beginnings, 
>> we have to implement it :(
> Take the second RegEx from up above.

Ok, perhaps Malte or i'll implement it.

>> check the checks in 
>> http://forge.typo3.org/repositories/browse/packages-flow3cgl/trunk/Classes/Checks/NamingConventions 
>>  for that. i have to talk to malte about that a bit.
> I checked it and I think there is a bug in class 
> "T3_FLOW3CGL_Checks_NamingConventions_ValidClassNameSniff". Line 102
> if (preg_match('|(Abstract[a-zA-Z0-9])$|', $declarationName, $match)) {
> should be
> if (preg_match('|(Abstract[a-zA-Z0-9]+)$|', $declarationName, $match)) {

Hm, thanks. I'll open an issue for it and check it later...

> Do you attend T3DD08? Hope to meet you there.

No unfortunately not. I have to work the next days and have to be on 
stand-by. I really would have liked to be there...
But Malte is there and will represent the FLOW3CGL team :D
I am very curious and will later look for podcast and so on..

> Greetings
> Jochen

Cheers, Tim.

More information about the TYPO3-project-5_0-general mailing list