Page 1 of 1

Camel Case

Posted: Mon Mar 14, 2016 11:47 am
by david63
For years now it has been a "rule" that when writing code for phpBB that camel case is not allowed - has the time now come to at least relax that rule if not abandon it?

Almost every file that is to be found in the vendor folder uses camel case as does .js files - so why not core/extension phpBB files?

Re: Camel Case

Posted: Mon Mar 14, 2016 1:32 pm
by Piscator
imo no, everything should be lower case. ive seen some servers unable to open a file because it has a capital and the link to it is lowercase.

Main.php

<a href src="main.php">link</a>

doesnt work

some servers do work though :|

best to be all lowercase.

Re: Camel Case

Posted: Mon Mar 14, 2016 2:39 pm
by AmigoJack
Seems like Piscator talks about file system restrictions (which would be irrelevant since links, or precisely said URLs should always be case sensitive) and david63 about code in files unrelated to filenames. In the latter case /docs/coding-guidelines.html#namingvars (comes with every installation) makes a distinction between PHP and JS only, but never mentioned files like imageset.cfg.

Re: Camel Case

Posted: Tue Mar 15, 2016 1:49 am
by A_Jelly_Doughnut
david63 wrote: Almost every file that is to be found in the vendor folder uses camel case as does .js files - so why not core/extension phpBB files?
phpBB has no control over the coding standards used in the vendor directory, so obviously each vendor gets to choose their own coding style.

IMO a strong rule is necessary for the core of any project.