Lukas Kahwe Smith
[email protected]
On Sep 9, 2011, at 09:24 , FractalizeR wrote:
> Hello.
>
> When I browse symfony code, I can see many type names written capitalized
> (examples are randomly taken from Symfony components):
>
only Boolean should be capitalized
>
> As you can see, here in docblocks Boolean and Array are written as
> capitalized. PHP is case-sensitive language so you can name your class
> Boolean or Array and it will be a completely different type. For example, the
> following code snippet is perfectly valid:
PHP is case preserving, however most *nix file systems are case sensitive so
the case is relevant for autoloaders, which however are not relevant for these
examples.
> <?php
> class Boolean {
> public function hello() {
> echo "I work!";
> }
> }
>
> $a = new Boolean();
> $a->hello();
>
> So, well, I would like to ask, if that is correct to use capitalized type
> names of built-in types like it is currently used in Symfony? It confuses
> PHPStorm for example, and I created a ticket there. But now I think, that
> this is not PHPStorm's problem. What do you think?
So please file PR's for incorrect capitalization of built-in types. All
primitive types should be lowercased except for Boolean which should be
uppercase.
regards,
Lukas
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en