Skip to content

Fix fatal on WP 7.0 by deferring to core AI client#1193

Closed
davidperezgar wants to merge 4 commits intotrunkfrom
1192-fatal-error-with-wordpress-70-beta-2
Closed

Fix fatal on WP 7.0 by deferring to core AI client#1193
davidperezgar wants to merge 4 commits intotrunkfrom
1192-fatal-error-with-wordpress-70-beta-2

Conversation

@davidperezgar
Copy link
Copy Markdown
Member

Summary

  • Prevents class/interface signature conflicts between the plugin’s bundled AI client and WordPress 7.0 core AI client.
  • After loading the plugin’s Composer autoloader, if core AI client is present, unregisters WordPress\AiClient\ and WordPress\AI_Client\ PSR-4 mappings so core classes are used.
  • Adds a small helper to detect the core AI client bootstrap.

Testing

  • Local environment

@davidperezgar davidperezgar linked an issue Feb 27, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 27, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: davidperezgar <davidperez@git.wordpress.org>
Co-authored-by: ernilambar <nilambar@git.wordpress.org>
Co-authored-by: threadi <threadi@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ernilambar
Copy link
Copy Markdown
Member

@davidperezgar Tests are still failing.

@davidperezgar
Copy link
Copy Markdown
Member Author

Yes, but I didn't manage to reproduce the WP 7 error. Could you check it?

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