Skip to content

Avoid null array offsets deprecated in PHP 8.5 - #40

Merged
TomK merged 4 commits into
packaged:masterfrom
msievenpiper:php84-updates
Oct 22, 2026
Merged

TomK merged 4 commits into
packaged:masterfrom
msievenpiper:php84-updates

Conversation

@msievenpiper

@msievenpiper msievenpiper commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

ResourceStore::getResources() used the nullable $priority as an array offset before checking for null, which PHP 8.5 deprecates; it now only does the direct lookup when $priority is non-null and the null ("all priorities") path is unchanged. AbstractDispatchableResource also passed a null file path to basename(), which is cast to string so behaviour is identical. GenericResourceTest keyed its expected content types on null, which is now ''. 94 tests pass on PHP 8.4 and 8.5 with no deprecations left; the one remaining notice (md5_file() on a directory in ResourceManager) is pre-existing and unrelated.

🤖 Generated with Claude Code

msievenpiper and others added 3 commits October 4, 2026 09:20
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@msievenpiper
msievenpiper marked this pull request as ready for review October 22, 2026 09:44
@TomK
TomK merged commit b77c940 into packaged:master Oct 22, 2026
4 checks passed
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