REMOVE ake() #320

Closed
opened 2025-03-04 13:31:00 +00:00 by jamie · 6 comments
jamie commented 2025-03-04 13:31:00 +00:00 (Migrated from git.hazaar.io)

Problem Statement

The ake() helper function in Hazaar has been deprecated in favor of using PHP’s null coalescing operator (??). Additionally, its dot-notation access functionality has been moved to a new array_get() function. Since ake() is no longer needed, it should be completely removed from the framework. However, to provide developers with adequate transition time, this removal is scheduled for action in one year.

Who will benefit?

  • Developers maintaining Hazaar-based applications by encouraging modern, native PHP practices.
  • The Hazaar framework, by reducing legacy code and improving maintainability.
  • Performance improvements by eliminating an unnecessary helper function.

Benefits and risks

Benefits

  • Reduces technical debt by removing obsolete functionality.
  • Encourages developers to use native PHP features.
  • Simplifies the codebase and documentation.

Risks

  • Breaking change for applications still relying on ake(), requiring updates before removal.
  • Some developers may need to refactor their codebases ahead of the scheduled removal.

Proposed Solution

  1. Announce the scheduled removal of ake() and provide clear migration guidance.
  2. Update documentation to reflect the deprecation and recommended alternatives.
  3. In one year, remove ake() from the framework entirely.

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 The `ake()` helper function in Hazaar has been deprecated in favor of using PHP’s null coalescing operator (`??`). Additionally, its dot-notation access functionality has been moved to a new `array_get()` function. Since `ake()` is no longer needed, it should be completely removed from the framework. However, to provide developers with adequate transition time, this removal is scheduled for action in one year. ## Who will benefit? - Developers maintaining Hazaar-based applications by encouraging modern, native PHP practices. - The Hazaar framework, by reducing legacy code and improving maintainability. - Performance improvements by eliminating an unnecessary helper function. ## Benefits and risks ### Benefits - Reduces technical debt by removing obsolete functionality. - Encourages developers to use native PHP features. - Simplifies the codebase and documentation. ### Risks - Breaking change for applications still relying on `ake()`, requiring updates before removal. - Some developers may need to refactor their codebases ahead of the scheduled removal. ## Proposed Solution 1. Announce the scheduled removal of `ake()` and provide clear migration guidance. 2. Update documentation to reflect the deprecation and recommended alternatives. 3. In one year, remove `ake()` from the framework entirely. ## 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-04 13:31:00 +00:00 (Migrated from git.hazaar.io)

changed due date to March 05, 2026

changed due date to March 05, 2026
jamie commented 2025-03-04 13:31:00 +00:00 (Migrated from git.hazaar.io)

assigned to @jamie

assigned to @jamie
jamie commented 2025-03-09 09:14:03 +00:00 (Migrated from git.hazaar.io)

created branch 320-remove-ake to address this issue

created branch [`320-remove-ake`](/hazaar/framework/-/compare/master...320-remove-ake) to address this issue
jamie commented 2025-03-09 09:14:10 +00:00 (Migrated from git.hazaar.io)

mentioned in merge request !209

mentioned in merge request !209
jamie commented 2025-03-09 09:14:41 +00:00 (Migrated from git.hazaar.io)

I'm doing this now. I have already updated all internal references and I just don't want it to exist in the new release.

I'm doing this now. I have already updated all internal references and I just don't want it to exist in the new release.
jamie commented 2025-03-09 09:32:22 +00:00 (Migrated from git.hazaar.io)

mentioned in commit 99a77e38e2

mentioned in commit 99a77e38e2f6a09a4cfe77f153baa6111700d840
jamie (Migrated from git.hazaar.io) closed this issue 2025-03-09 09:32:23 +00:00
jamie self-assigned this 2025-09-04 01:14:39 +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#320
No description provided.