4 Commits
Author SHA1 Message Date
dualfroz 2f4f2d71c4 Percent encode the URI template literals as per RFC6570 section 3.1
Template::expandAll swapped every expression notation in the raw template
string with str_replace, so the literal text surrounding the expressions was
copied verbatim and never percent encoded. The expression detection pattern is
now used to split the template into an ordered list of parts: literals are
encoded once at construction, expressions stay Expression objects, and the
expansion simply concatenates them. Keeping the parts apart is what prevents
the already encoded expansion results from being encoded a second time.

Fixes the "Additional Examples 8: Literal Encoding" case of the vendored
uritemplate-test compliance suite.
2026-09-04 08:43:47 +02:00
upstream 432904515e Upstream thephpleague/uri-src state of the touched files before dc0df9e387 2026-09-04 08:43:47 +02:00
dualfroz e39d486924 Percent encode the URI template literals as per RFC6570 section 3.1
Template::expandAll swapped every expression notation in the raw template
string with str_replace, so the literal text surrounding the expressions was
copied verbatim and never percent encoded. The expression detection pattern is
now used to split the template into an ordered list of parts: literals are
encoded once at construction, expressions stay Expression objects, and the
expansion simply concatenates them. Keeping the parts apart is what prevents
the already encoded expansion results from being encoded a second time.

Fixes the "Additional Examples 8: Literal Encoding" case of the vendored
uritemplate-test compliance suite.
2026-09-06 00:58:45 +02:00
upstream cb44762108 Upstream thephpleague/uri-src state of the touched files before 6b1d90a020 2026-09-04 08:43:47 +02:00