Camel Case

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Anti-Spam Guide
Post Reply
User avatar
david63
Registered User
Posts: 18572
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Camel Case

Post 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?
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
Piscator
Registered User
Posts: 120
Joined: Sat Mar 22, 2014 4:32 pm

Re: Camel Case

Post 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.
User avatar
AmigoJack
Registered User
Posts: 5795
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Camel Case

Post 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.
  • The worst thing about censorship is ███████████
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Camel Case

Post 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.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
Post Reply

Return to “phpBB Discussion”