Page MenuHomeDevCentral

Refactor URL encode/decode
Needs ReviewPublic

Authored by dereckson on Apr 18 2026, 13:00.
Tags
None
Referenced Files
F49045479: D4077.id10763.diff
Thu, Sep 10, 03:11
F49041893: D4077.id11039.diff
Thu, Sep 10, 02:42
F49007873: D4077.id10640.diff
Wed, Sep 9, 22:16
F48999108: D4077.diff
Wed, Sep 9, 21:10
Unknown Object (File)
Mon, Sep 7, 22:00
Unknown Object (File)
Mon, Sep 7, 18:14
Unknown Object (File)
Mon, Sep 7, 03:14
Unknown Object (File)
Sun, Sep 6, 04:20
Subscribers

Details

Reviewers
Duranzed

Diff Detail

Repository
rKERUALD Keruald libraries development repository
Lint
Lint Errors
SeverityLocationCodeMessage
Erroromnitools/src/HTTP/QueryEncoding.php:9PHPCS.E.Generic.Classes.OpeningBraceSameLine.BraceOnNewLineGeneric.Classes.OpeningBraceSameLine.BraceOnNewLine
Erroromnitools/src/HTTP/URL.php:163PHPCS.E.Generic.Formatting.SpaceAfterCast.TooMuchSpaceGeneric.Formatting.SpaceAfterCast.TooMuchSpace
Unit
Tests Passed
Branch
follow-up-for-doc-iii
Build Status
Buildable 6866
Build 7154: arc lint + arc unit

Event Timeline

dereckson created this revision.
Duranzed requested changes to this revision.May 18 2026, 23:15
Duranzed added a subscriber: Duranzed.

Harbormaster reports unit test failures on omnitools/tests/HTTP/URLTest.php, also the exception message changed in beautifyQuery() from "Unexpected encoding value" to "Unexpected value", while normalizeQuery() keeps "Unexpected encoding value".

This revision now requires changes to proceed.May 18 2026, 23:15

Restore full exception message

Move constantes to a backed enum, so we can get autocomplete from IDEs
and exhaustive matching.

_toString() -> (string) cast

Exception can be removed using an PHP 8.1 enum instead of in-class constants.