On Wed, 31 Dec 2014, Stanislav Malyshev wrote:

> 
> The issue is the class names though. E.g. see: 
> https://github.com/ralphschindler/zf2-db/blob/master/research/ColumnType/Integer.php

That's in a namespace, so it's not actually Integer, but 
Zend\Db\Metadata\Type\Integer

> and:
> 
> https://github.com/canaydogan/ObjectValidator/blob/master/src/ObjectValidator/Validator/Int.php

That's in a namespace, so it's not actually Int, but 
ObjectValidator\Validator\Int

> 
> These are uppercase "I", but class names are not case-sensitive... So
> we'll need to figure it out. Unfortunately, looking at github,
> disallowing "class Int" looks like pretty bad idea.

Sorry, but for years we have this in the manual 
(http://php.net/manual/en/userlandnaming.rules.php):

"PHP owns the top-level namespace but tries to find decent descriptive 
names and avoid any obvious clashes."

With namespaces (as in your above examples), this is already moot.

I think it's perfectly acceptable that PHP makes a built-in type a 
reserved word. I would certainly not change it to PHPInt to "avoid any 
obvious clashes".

cheers,
Derick

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to