Skip to content

[pull] master from php:master#347

Merged
pull[bot] merged 5 commits into
Ammarpad:masterfrom
php:master
Jun 1, 2026
Merged

[pull] master from php:master#347
pull[bot] merged 5 commits into
Ammarpad:masterfrom
php:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Jun 1, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

ndossche and others added 5 commits June 1, 2026 20:21
This makes imagick CI fail on PHP 8.5:
```
/usr/include/php/20250925/Zend/zend_operators.h: In function 'zend_dval_to_lval_cap':
/usr/include/php/20250925/Zend/zend_operators.h:149:88: error: unused parameter 's' [-Werror=unused-parameter]
  149 | static zend_always_inline zend_long zend_dval_to_lval_cap(double d, const zend_string *s)
      |                                                                     ~~~~~~~~~~~~~~~~~~~^
cc1: all warnings being treated as errors
```
* PHP-8.5:
  Fix -Werror compile error in `zend_dval_to_lval_cap()` (#22196)
…_rfc3986 (#21726)

When Uri\Rfc3986\Uri::parse() produces a URI already in canonical form
(the common case: http/https URLs with no uppercase host, no
percent-encoding in unreserved ranges, no ".." path segments),
get_normalized_uri() no longer deep-copies the parsed struct and runs
a full normalization pass. It calls uriNormalizeSyntaxMaskRequiredExA
once to compute the dirty mask; a zero mask means we alias the raw
uri. The struct caches the dirty mask, so multiple non-raw reads on
the same instance only run the scan once.

Fallback: when the mask is nonzero, we copy and normalize as before,
but only for the flagged components (uriNormalizeSyntaxExMmA(...,
dirty_mask, ...) instead of (..., -1, ...)).

Measurements on a 17-URL mix with a realistic parse-and-read workload
(10 runs of 1.7M parses each, CPU pinned via taskset, same-session
stash-pop A/B so both builds share machine state):

                        baseline mean    optimized mean    delta
    parse only         0.3992s (4.26M/s)  0.4083s (4.16M/s)  noise
    parse + 1 read     0.6687s (2.54M/s)  0.5464s (3.11M/s)  -18.3%
    parse + 7 reads    0.8510s (2.00M/s)  0.7305s (2.33M/s)  -14.2%

The "parse + 1 read" row isolates the first-read cost where this
change lands. The "parse + 7 reads" row shows the amortized effect
under a realistic user pattern: the first getter pays the reduced
normalization cost, and the remaining six getters hit the cached
normalized uri and cost the same as before.

hyperfine cross-check on the whole benchmark script, 15 runs each:

    baseline   20.471 s +/- 1.052 s  [19.535 .. 22.985]
    optimized  17.240 s +/- 0.540 s  [16.556 .. 18.190]
    optimized runs 1.19 +/- 0.07 times faster.

All 309 tests in ext/uri/tests pass. I checked that URIs needing
normalization (http://EXAMPLE.com/A/%2e%2e/c resolving to /c) still
hit the full normalize path through the nonzero dirty mask.

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
#12276)

Displays arguments for errors from built-in PHP functions using docref API.

RFC: https://wiki.php.net/rfc/display_error_function_args

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
@pull pull Bot locked and limited conversation to collaborators Jun 1, 2026
@pull pull Bot added the ⤵️ pull label Jun 1, 2026
@pull pull Bot merged commit a22c56c into Ammarpad:master Jun 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants