Class method names update to camelCase. #209

Closed
opened 2020-11-02 01:28:52 +00:00 by jamie · 4 comments
jamie commented 2020-11-02 01:28:52 +00:00 (Migrated from git.hazaar.io)

Problem Statement

In Hazaar 2.0, most class methods use camelCase naming conventions. However, the Hazaar\File group of classes deviated from this convention by using underscores in method names to maintain consistency with PHP's built-in file access functions. This inconsistency makes the API less uniform and deviates from standard Hazaar naming conventions.

With the transition to Hazaar 3.0, this is an opportunity to correct the naming scheme and align Hazaar\File methods with the rest of the framework by converting them to camelCase.

Who will benefit?

  • Developers who expect a consistent API across all Hazaar components.
  • Applications that rely on the Hazaar\File classes for file operations.
  • Future maintainers and contributors to Hazaar.

Benefits and risks

Benefits

  • Improves API consistency across the framework.
  • Aligns Hazaar\File methods with standard Hazaar coding conventions.
  • Makes it easier for developers to use and remember method names.

Risks

  • This is a breaking change that will require refactoring in projects that use Hazaar\File.
  • Existing applications may need significant updates to adjust to the new method names.
  • Documentation and examples will need to be updated accordingly.

Proposed solution

  • Rename all Hazaar\File methods using underscores to their camelCase equivalents.
  • Provide a temporary compatibility layer or migration tool to ease the transition.
  • Clearly document the changes in upgrade guides and release notes.

Priority/Severity

  • High (This will bring a huge increase in performance/productivity/usability/legislative cover)
  • Medium (This will bring a good increase in performance/productivity/usability)
  • Low (anything else e.g., trivial, minor improvements)
## Problem Statement In Hazaar 2.0, most class methods use camelCase naming conventions. However, the `Hazaar\File` group of classes deviated from this convention by using underscores in method names to maintain consistency with PHP's built-in file access functions. This inconsistency makes the API less uniform and deviates from standard Hazaar naming conventions. With the transition to Hazaar 3.0, this is an opportunity to correct the naming scheme and align `Hazaar\File` methods with the rest of the framework by converting them to camelCase. ## Who will benefit? - Developers who expect a consistent API across all Hazaar components. - Applications that rely on the `Hazaar\File` classes for file operations. - Future maintainers and contributors to Hazaar. ## Benefits and risks ### Benefits - Improves API consistency across the framework. - Aligns `Hazaar\File` methods with standard Hazaar coding conventions. - Makes it easier for developers to use and remember method names. ### Risks - This is a **breaking change** that will require refactoring in projects that use `Hazaar\File`. - Existing applications may need significant updates to adjust to the new method names. - Documentation and examples will need to be updated accordingly. ## Proposed solution - Rename all `Hazaar\File` methods using underscores to their camelCase equivalents. - Provide a temporary compatibility layer or migration tool to ease the transition. - Clearly document the changes in upgrade guides and release notes. ## Priority/Severity - [x] High (This will bring a huge increase in performance/productivity/usability/legislative cover) - [ ] Medium (This will bring a good increase in performance/productivity/usability) - [ ] Low (anything else e.g., trivial, minor improvements)
jamie commented 2025-03-19 01:38:37 +00:00 (Migrated from git.hazaar.io)

created branch 209-class-method-names-update-to-camelcase to address this issue

created branch [`209-class-method-names-update-to-camelcase`](/hazaar/framework/-/compare/master...209-class-method-names-update-to-camelcase) to address this issue
jamie commented 2025-03-19 01:38:43 +00:00 (Migrated from git.hazaar.io)

mentioned in merge request !218

mentioned in merge request !218
jamie commented 2025-03-19 01:39:54 +00:00 (Migrated from git.hazaar.io)

changed the description

changed the description
jamie commented 2025-03-19 08:31:34 +00:00 (Migrated from git.hazaar.io)

mentioned in commit 0f9f5de91e

mentioned in commit 0f9f5de91e40cf3f52405828fcc1302f02429f2b
jamie (Migrated from git.hazaar.io) closed this issue 2025-03-19 08:31:34 +00:00
jamie self-assigned this 2025-09-04 01:15:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/framework#209
No description provided.