Skip to content

Change type from library to wordpress-plugin - #44

Merged
galatanovidiu merged 1 commit into
WordPress:trunkfrom
spenserhale:patch-1
Mar 26, 2026
Merged

Change type from library to wordpress-plugin#44
galatanovidiu merged 1 commit into
WordPress:trunkfrom
spenserhale:patch-1

Conversation

@spenserhale

Copy link
Copy Markdown
Contributor

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.json file.

{
  "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:

composer require wordpress/abilities-api wordpress/mcp-adapter

To use Composer for installing to the plugin folder, the type must be 'wordpress-plugin'.
Copilot AI review requested due to automatic review settings September 11, 2025 11:25
@github-actions

github-actions Bot commented Sep 11, 2025

Copy link
Copy Markdown

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: spenserhale <spenserhale@git.wordpress.org>
Co-authored-by: swissspidy <swissspidy@git.wordpress.org>
Co-authored-by: justlevine <justlevine@git.wordpress.org>
Co-authored-by: galatanovidiu <ovidiu-galatan@git.wordpress.org>

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Sep 11, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.91%. Comparing base (95981e8) to head (b3c4841).
⚠️ Report is 51 commits behind head on trunk.

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           
Flag Coverage Δ
unit 50.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@justlevine

Copy link
Copy Markdown
Contributor

Related: WordPress/abilities-api#66 (comment)

@galatanovidiu

Copy link
Copy Markdown
Contributor

This is a straightforward change. The package has evolved from a simple library in v0.1.0 to a full WordPress plugin, so "type": "wordpress-plugin" is the correct Composer type.
I don't see any drawbacks with this change, regardless of how the MCP Adapter is consumed, whether bundled as a Composer package across multiple plugins or installed as a standalone plugin through installer-paths.
Already approved by @swissspidy. Merging...

@galatanovidiu
galatanovidiu merged commit eb88e90 into WordPress:trunk Mar 26, 2026
17 of 19 checks passed
@github-project-automation github-project-automation Bot moved this from In discussion / Needs decision to Done in WordPress MCP Adapter Planning Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

6 participants