Skip to content

fix php 8.5 deprecations - #183

Merged
diosmosis merged 2 commits into
mainfrom
php-8.5.deprecations
Sep 15, 2026
Merged

diosmosis merged 2 commits into
mainfrom
php-8.5.deprecations

Conversation

@diosmosis

Copy link
Copy Markdown
Member

Description

As title. Also introduces a matrix for the phpunit github actions workflow (testing against php 7.4 and 8.5).

Checklist

  • [✔/✖/NA] I have understood, reviewed, and tested all AI outputs before use
  • [✔/✖/NA] All AI instructions respect security, IP, and privacy rules

Review

textagroup
textagroup previously approved these changes Sep 15, 2026

@textagroup textagroup left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems to work OK.
Ran an AI review which brought up the one minor issue

• Found one issue:

  • P2 – stale headers can be reused after a failed request.
    In classes/WP_Piwik/Request/Rest.php:153, libs/matomo-php-tracker/MatomoTracker.php:2217, and proxy/proxy.php:426, PHP 8.4+ reads http_get_last_response_headers() without first clearing the
    previously stored response. If multiple stream requests occur in one PHP request and a later request fails before receiving headers, the previous response’s status/cookies may be treated as belonging
    to the failed request. PHP provides http_clear_last_response_headers() specifically for clearing this state. PHP documentation

    Add a clear immediately before each file_get_contents() call, and add a regression test covering successful request followed by transport failure.

@diosmosis
diosmosis merged commit 2adc073 into main Sep 15, 2026
3 checks passed
@diosmosis
diosmosis deleted the php-8.5.deprecations branch September 15, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants