-
Notifications
You must be signed in to change notification settings - Fork 45
Change type from library to wordpress-plugin #44
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
base: trunk
Are you sure you want to change the base?
Conversation
To use Composer for installing to the plugin folder, the type must be 'wordpress-plugin'.
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR changes the Composer package type from "library" to "wordpress-plugin" to enable proper installation into WordPress plugin directories when using Composer with installer-paths configuration.
- Updates the package type in composer.json to align with WordPress plugin installation standards
- Enables Composer to correctly install the package into the wp-content/plugins directory structure
- Supports the installation workflow documented in the project's README
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #44 +/- ##
=========================================
Coverage 50.91% 50.91%
Complexity 598 598
=========================================
Files 31 31
Lines 1923 1923
=========================================
Hits 979 979
Misses 944 944
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:
|
|
Related: WordPress/abilities-api#66 (comment) |
To use Composer for installing into the plugin folder, the type should be 'wordpress-plugin'.
In order to use Composer as described in the readme the type should be updated.
Docs:
With Composer
Until the plugin is available on Packagist, you will need to add the repository to your
composer.jsonfile.{ "repositories": [ { "type": "vcs", "url": "https://github.com/WordPress/abilities-api.git" }, { "type": "vcs", "url": "https://github.com/WordPress/mcp-adapter.git" } // ... other repositories. ], "extra": { "installer-paths": { // This should match your WordPress+Composer setup. "wp-content/plugins/{$name}/": [ "type:wordpress-plugin" ] // .. other paths. } } // ... rest of your composer.json. }Then, require the package in your project: