Skip to content

Stop the logger raising a deprecation notice on PHP 8.6 - #289

Merged
GaryJones merged 1 commit into
developfrom
GaryJones/php-8.6-is-int
Nov 24, 2026
Merged

GaryJones merged 1 commit into
developfrom
GaryJones/php-8.6-is-int

Conversation

@GaryJones

Copy link
Copy Markdown
Contributor

PHP 8.6 deprecates is_integer(), which is an alias of is_int(). Syndication_Logger::log() uses it to check the post ID before it stores a log entry on a post. On PHP 8.6, every one of those entries raises a deprecation notice. The new WordPress trunk on PHP 8.6 row in #288 caught this: four integration tests fail there (push post reports failed new post and failed edit post, and pull site reports failed insert and failed update).

This switches the check to is_int(), which behaves identically on every PHP version the plugin supports.

I searched the other inventory plugins for is_integer(), is_long() and is_double(), and this was the only call.

PHP 8.6 deprecates is_integer(), an alias of is_int(). The logger uses
it to validate the post ID before storing a log entry on the post, so
on PHP 8.6 every such entry raises a deprecation notice, and four
integration tests fail on the trunk row. is_int() behaves identically.
@GaryJones
GaryJones requested a review from a team as a code owner November 24, 2026 21:52
@GaryJones GaryJones added this to the 3.0.0 milestone Nov 24, 2026
@GaryJones GaryJones added the type: bug Something isn't working label Nov 24, 2026
@GaryJones GaryJones self-assigned this Nov 24, 2026
@GaryJones
GaryJones merged commit edee155 into develop Nov 24, 2026
8 checks passed
@GaryJones
GaryJones deleted the GaryJones/php-8.6-is-int branch November 24, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant