Skip to content

CamelCase enforcement in namespaced classes #117

@mbabker

Description

@mbabker

From what I remember, part of our camel case rule with class names came from how JLoader in the CMS is designed and how it splits classes based on camel casing to align to the filesystem; it couldn't cope with multiple uppercase letters. As our namespaced code is following PSR-4 standards, this is less of an issue. So, throwing the idea around, IMO we have a couple of options for how to manage that.

  • Continue enforcement of the camel case rule
  • Allow non-camel cased class and namespaces

Technically neither one is an issue, it's probably more of a consistency thing than anything. But, with allowing the non- option, you can represent a proper name correctly and not impose styling rules on them (i.e. Joomla\Cache\XCache versus Joomla\Cache\Xcache or Joomla\GitHub\GitHub versus Joomla\Github\Github).

Thoughts?

//cc @nonumber

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions