-
Notifications
You must be signed in to change notification settings - Fork 33
Remove the Abilities API dependency and rely on what's in WP 6.9 #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the Abilities API dependency and rely on what's in WP 6.9 #107
Conversation
… Add a better WP version check
… available anymore
… pass that to our script
…s causing problems. Add comments about removing phpstan exclude statements and stub
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
.phpstan/WP_Ability.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this as a stub for PHPStan. Hopefully we can remove this after WP 6.9 is released and https://github.com/php-stubs/wordpress-stubs is updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest version of the stubs has been released. We can update that and remove this! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Note that this stems from the discussion in #106 (review). |
JasonTheAdams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the new stubs is out, let's update this. Then I'll approve and we're good to go!
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #107 +/- ##
=============================================
- Coverage 38.91% 38.83% -0.08%
- Complexity 176 177 +1
=============================================
Files 16 16
Lines 1010 1012 +2
=============================================
Hits 393 393
- Misses 617 619 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JasonTheAdams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @dkotter!
What?
Removes the Ability API as a composer dependency and updates our code to account for this. Also bumps our minimum WordPress version to 6.9
Why?
We initially bundled all the various AI projects into this plugin (Abilities API, MCP Adapter, WP AI Client) to make it easy to build on those. With the Abilities API going into WP 6.9 though, we can instead rely on that and not have to worry about maintaining that dependency.
How?
composer.jsonfile and updates thecomposer.lockfile to remove thatis_wp_version_compatiblefunctionapiFetchinstead ofexecuteAbilitywhen title generation is triggered from the post edit screen. The latter doesn't exist yet in 6.9Testing Instructions
npm i && npm run build && composer install --no-devSettings > AI Credentialsand ensure you add at least one valid API keySettings > AI Experimentsand ensure the Title Generation Experiment is enabledTest using WordPress Playground
The changes in this pull request can be previewed and tested using this WordPress Playground instance:
Click here to test this pull request.