Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-274

Class and namespace naming inconsistency

    Details

    • Type: Improvement Improvement
    • Status: In Progress
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      There are inconsistencies with some class and namespace names that include acronyms.

      Examples:

      Classes with upper-casing:
      ORMException, DBALException, OCI8Connection, etc.

      Classes with proper-casing:
      RunDqlTask, CliException, MySqlPlatform, etc.

      Namespaces with upper-casing:
      DBAL, ORM, Doctrine\DBAL\Driver\PDOMsSql, etc.

      Namespaces with proper-casing:
      Doctrine\Common\Cli, Doctrine\DBAL\Tools\Cli\, Doctrine\ORM\Id, etc.

      There is more proper-casing than upper-casing. IMHO, proper-casing is better as it's easier to read "SqlException" than it is to read "SQLException" (the "E" looks like part of the acronym), and things like "CLITask" can be avoided.

      I discussed this a bit with Benjamin and Guilherme, and they were unsure and said that the whole team needed to reach consensus.

      I'm leaving the priority as "Major" because this should probably be fixed sooner rather than later to prevent compatibility breaks.

        Activity

        Hide
        Roman S. Borschel added a comment -

        More renamings have been done but still more to do. Pushing remaining work to beta3.

        Show
        Roman S. Borschel added a comment - More renamings have been done but still more to do. Pushing remaining work to beta3.
        Hide
        Roman S. Borschel added a comment -

        Final name changes should be done prior to going into RC1.

        Show
        Roman S. Borschel added a comment - Final name changes should be done prior to going into RC1.
        Hide
        Benjamin Eberlei added a comment -

        there is much to be done yet, however most of it is also public API class names and might cause quite some BC breaks (i.e. DBAL Platforms and Schema Manager, Mapping Driver Names). I am not sure how to proceed here.

        Show
        Benjamin Eberlei added a comment - there is much to be done yet, however most of it is also public API class names and might cause quite some BC breaks (i.e. DBAL Platforms and Schema Manager, Mapping Driver Names). I am not sure how to proceed here.
        Hide
        Roman S. Borschel added a comment -

        Since PHP is mostly case-insensitive on class and method names it shouldn't be much of an issue.

        Show
        Roman S. Borschel added a comment - Since PHP is mostly case-insensitive on class and method names it shouldn't be much of an issue.
        Hide
        Guilherme Blanco added a comment -

        Scheduled to 3.0 as this may potentially create BC breaks

        Show
        Guilherme Blanco added a comment - Scheduled to 3.0 as this may potentially create BC breaks

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Glen Ainscow
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: