这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@justlevine
Copy link
Contributor

What

This PR cleans up the Core/McpAdapter server registry, by (re)moving functionality that is unused or unrelated to server registry handling.

Why

SRP - now that we have a Plugin wrapper we don't need the extra complexity/boilerplate.

How

See diff comments.

@justlevine justlevine self-assigned this Aug 29, 2025
@justlevine justlevine marked this pull request as ready for review August 29, 2025 09:40
Copilot AI review requested due to automatic review settings August 29, 2025 09:40

This comment was marked as outdated.

@justlevine justlevine changed the title dev: refactor non-registry functionality from Core/McpAdapter dev!: refactor non-registry functionality from Core/McpAdapter Aug 29, 2025
Copy link
Contributor

Copilot AI left a 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 refactors the MCP adapter by moving dependency checks and initialization logic from the Core/McpAdapter class to the main Plugin class, following the Single Responsibility Principle.

  • Moved dependency validation logic from McpAdapter to Plugin
  • Simplified McpAdapter to focus solely on server registry functionality
  • Updated type annotations and class declarations for better type safety

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
includes/Plugin.php Added dependency checking logic and improved type annotations
includes/Core/McpAdapter.php Removed dependency checking, initialization state tracking, and debugging methods to focus on server registry

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@galatanovidiu galatanovidiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions
Copy link

github-actions bot commented Sep 4, 2025

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: 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.

@codecov
Copy link

codecov bot commented Sep 4, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@justlevine justlevine merged commit 6785ef5 into WordPress:trunk Sep 4, 2025
19 of 22 checks passed
@justlevine justlevine deleted the dev/cleanup-registry branch September 4, 2025 13:30
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