Class method names update to camelCase.
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)
Edited by Jamie Carl