dev!: rename plugin constants to WPAI_*#317
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
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. |
There was a problem hiding this comment.
Pull request overview
This PR updates the plugin’s global naming/prefixing from the legacy AI_EXPERIMENTS_* constants to WPAI_*, aligning runtime constants and PHPCS configuration, and adjusts related code/tests accordingly.
Changes:
- Renames plugin constants (
AI_EXPERIMENTS_*→WPAI_*) and updates references across bootstrap and core classes. - Updates PHPCS global-prefix configuration to enforce the new
WPAIconstant prefix. - Adjusts credential migration version-writing and the corresponding integration test expectation.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Integration/Includes/Migrations/Credential_MigrationTest.php | Updates migration version assertion (now hard-coded). |
| phpcs.xml.dist | Changes required global constant prefix to WPAI. |
| includes/Migrations/Credential_Migration.php | Writes migration version (now hard-coded). |
| includes/bootstrap.php | Renames/rewires plugin constants and their usages. |
| includes/Asset_Loader.php | Updates asset paths/URLs to use new constants. |
| includes/Abstracts/Abstract_Ability.php | Switches ability category constant to WPAI_*. |
| includes/Abilities/Utilities/Posts.php | Switches ability category constant to WPAI_*. |
| ai.php | Renames base dir constant to WPAI_DIR and updates bootstrap include. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #317 +/- ##
==========================================
Coverage 57.15% 57.15%
Complexity 589 589
==========================================
Files 41 41
Lines 3076 3076
==========================================
Hits 1758 1758
Misses 1318 1318
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:
|
There was a problem hiding this comment.
LGTM! The constant renaming is clean and straightforward. As noted in the inline comment, I'm not familiar with this particular logic: #317 (comment).
0eaba59 to
b361d2d
Compare
What?
Replaces the
AI_EXPERIMENTS_*prefix withWPAI_*Important
This PR is based on #316 which should be merged first.
Why?
Plugin rename makes
AI_EXPERIMENTSnon-sensical. While these are technically breaking changes it's rare for 3pp to use plugins.How?
Use of AI Tools
GitHub Copilot Autocomplete
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast