Skip to content

Fix camptix-invoices/wcpt-meetup warnings; bump mcp-adapter to 0.6.1 - #1889

Merged
bor0 merged 6 commits into
productionfrom
fix/camptix-invoices-skip-cross-device-rename
Aug 13, 2026
Merged

Fix camptix-invoices/wcpt-meetup warnings; bump mcp-adapter to 0.6.1#1889
bor0 merged 6 commits into
productionfrom
fix/camptix-invoices-skip-cross-device-rename

Conversation

@bor0

@bor0 bor0 commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • camptix-invoices: follow-up to Fix PHP deprecation/warning notices from error monitoring #1887. That PR still called @rename() before falling back to copy()+unlink(), but the sites error-monitoring bot logs warnings even when suppressed with @ (it does not check error_reporting() === 0). rename() always fails here (the PDF is generated into a /tmp mount that is a different filesystem from the uploads volume), so this drops the doomed rename() attempt entirely and always copies + removes the source.
  • wcpt-meetup: Meetup_Admin::update_meetup_data() was throwing "Trying to access array offset on null/false" on every wcpt_meetup_api_sync cron run. get_group_details() can return false (not just WP_Error/array) and get_group_members() can return entries that are null/non-array on a malformed Meetup API response. Added is_array() guards before indexing into either response.
  • mcp-adapter: bump wordpress/mcp-adapter from ^0.5.0 to ^0.6.0. v0.5.0's RequestRouter.php calls McpObservabilityHelperTrait::is_sensitive_key() statically, which PHP 8.3 deprecates ("should only be called on a class using the trait"), firing on every request to this repo's wcpt-vetting MCP server. Fixed upstream in v0.6.0 (github.com/WordPress/mcp-adapter, commit 7cc42a0), which routes the call through ErrorLogMcpObservabilityHandler instead. Composer's caret rule on a 0.x version only allows patch bumps, so ^0.5.0 never picks up 0.6.0 on its own -- the constraint has to move explicitly. Checked v0.6.0's breaking changes against this repo: the WP 6.9+ requirement is already met, the removed McpValidator MIME helpers are not used here, and the only WP\MCP classes referenced (McpAdapter, HttpTransport, ErrorLogMcpErrorHandler, NullMcpObservabilityHandler) are unaffected.

Test plan

  • php -l on all changed PHP files
  • composer.json validated as well-formed JSON
  • Confirm invoice PDFs still attach correctly on ticket checkout
  • Confirm wcpt_meetup_api_sync cron no longer logs array-offset warnings, and still updates meetup postmeta on a valid API response
  • Confirm the wcpt-vetting MCP server still responds correctly after the mcp-adapter bump, and the trait-deprecation notice is gone

Generated with Claude Code

bor0 and others added 3 commits August 12, 2026 22:56
The prior fix (#1887) fell back to copy()+unlink() only after an @-suppressed
rename() attempt failed, but the sites error-monitoring bot still logs the
warning regardless of @ suppression. rename() always fails here because the
PDF is generated into a /tmp mount thats a different filesystem from the
uploads volume, so drop the doomed rename() attempt entirely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
get_group_details() and get_group_members() can return false or an array
containing null entries on a malformed/failed Meetup API response, which
was triggering "Trying to access array offset on null/false" warnings on
every wcpt_meetup_api_sync cron run. Bail with a WP_Error when the
response isnt an array, and skip non-array entries in the leads loop.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
v0.5.0s RequestRouter.php calls McpObservabilityHelperTrait::is_sensitive_key()
statically, which is deprecated in PHP 8.3 ("should only be called on a class
using the trait") and fires on every request to the wcpt-vetting MCP server.
Fixed upstream in v0.6.0 (github.com/WordPress/mcp-adapter@7cc42a0), which
routes the call through ErrorLogMcpObservabilityHandler instead.

^0.5.0 only allows patch releases (Composers caret rule on a 0.x version),
so the constraint has to move to ^0.6.0 to pick this up. Checked v0.6.0s
breaking changes against this repo: WP 6.9+ requirement is already met,
the removed McpValidator MIME helpers arent used here, and the only
WP\MCP classes referenced (McpAdapter, HttpTransport,
ErrorLogMcpErrorHandler, NullMcpObservabilityHandler) are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@bor0 bor0 changed the title Fix persisting camptix-invoices warning + wcpt-meetup array-offset warnings Fix camptix-invoices/wcpt-meetup warnings; bump mcp-adapter to 0.6.0 Aug 12, 2026
@bor0
bor0 requested a balanced review from Copilot August 12, 2026 21:03
wordpress/mcp-adapter 0.6.0 added a transitive dependency on
automattic/jetpack-autoloader (used to make WP\MCP class-loading resolve
to the newest version when the standalone adapter and another plugin
each bundle their own copy). It ships a Composer plugin, so composer
install/update now aborts with "contains a Composer plugin which is
blocked by your allow-plugins config" -- this broke CI on the mcp-adapter
bump commit. Allowlisting it since its an Automattic package already used
elsewhere in this codebase via Jetpack.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

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

Updates warning-prone invoice and Meetup flows and upgrades the MCP adapter.

Changes:

  • Replaces cross-filesystem invoice renaming with copy-and-delete.
  • Validates malformed Meetup API responses.
  • Bumps wordpress/mcp-adapter to 0.6.0.

Reviewed changes

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

File Description
class-meetup-admin.php Adds Meetup response guards.
class-camptix-addon-invoices.php Changes temporary PDF transfer behavior.
composer.json Upgrades the MCP adapter dependency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread composer.json Outdated
copy() can fail (disk full, permissions, directory creation failure),
and the prior code unconditionally deleted the only generated PDF and
recorded post meta pointing at a file that was never created. Only
unlink the tmp file and update the post meta once the copy actually
succeeds.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@bor0
bor0 requested a review from obenland August 12, 2026 21:19
@bor0 bor0 changed the title Fix camptix-invoices/wcpt-meetup warnings; bump mcp-adapter to 0.6.0 Fix camptix-invoices/wcpt-meetup warnings; bump mcp-adapter to 0.6.1 Aug 13, 2026
@bor0
bor0 merged commit 56b892f into production Aug 13, 2026
5 checks passed
@bor0
bor0 deleted the fix/camptix-invoices-skip-cross-device-rename branch August 13, 2026 15:51
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