Page MenuHomeDevCentral

Refactor URL encode/decode
Needs ReviewPublic

Authored by dereckson on Apr 18 2026, 13:00.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 22, 21:39
Unknown Object (File)
Wed, Oct 21, 13:17
Unknown Object (File)
Tue, Oct 20, 17:57
Unknown Object (File)
Tue, Oct 13, 05:28
Unknown Object (File)
Tue, Oct 13, 05:27
Unknown Object (File)
Tue, Oct 13, 04:50
Unknown Object (File)
Tue, Oct 13, 04:49
Unknown Object (File)
Tue, Oct 13, 04:17
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.