propelorm/Propel2 — Issue #82: [RFC] Short Classname VS FQCN
Author: jaugustin
Created: 2011-12-04 13:38:10+00:00
State: open
Labels: RFC

Hi,

This is an open discution about when we need to use Short Classname and when we need to use FQCN.

We got lot's of issues with tests when we start Propel2, we fixed tests and not the lib but sometimes it's not the good thing to do.

**Short Classename** :

* all lib class in generated classes (Object, Query, Peer, Base, Map)

**Alias** :

* Base in Child classes ( `use Model\Base\Book as BaseBook in Model\Book`)
* Base, and child classes in other Base classes

**FQCN** :

* PHPDoc (with leading \) ( `@return \Model\Book`)
* in string used for calling classes dynamicaly (`constant($class . '::MY_CONSTANT'), new $object()`),

**TBD** :

* keys in toArray I am for shortname, now we have a bad mix someting FQCN, and sometimes Short
* keys in export yml, xml, (based on toArray()) keys didn't like `\`

We should add all usecase here to be consitant.

Others linked question:

*What should return a getClassname() ?*

* A short Classname / Alias
* A FQCN (with or without leading `\`)

we use those methods in runtime, builder, tableMap, and the behavior of the method is never consitant.