Skip to content

fix: resolve false PHPStan observer type mismatch #3394

Description

@chubes4

Problem

Changed-file Homeboy lint reports a type mismatch at AbilityServiceProvider::register_full_runtime() even though WordPressActionDispatchObserver explicitly implements the required WP_Agent_Pending_Action_Observer interface.

inc/Core/Bootstrap/AbilityServiceProvider.php:125
Parameter #1 $observer of static method DataMachine\Engine\AI\Actions\PendingActionObservers::register() expects AgentsAPI\AI\Approvals\WP_Agent_Pending_Action_Observer, DataMachine\Engine\AI\Actions\WordPressActionDispatchObserver given.
[argument.type]

Evidence

  • PendingActionObservers::register() accepts WP_Agent_Pending_Action_Observer.
  • WordPressActionDispatchObserver implements WP_Agent_Pending_Action_Observer.
  • The provider registration line dates to commit e66b6765e7; it was not introduced by the bootstrap simplification in refactor: remove ability manifest and obsolete class includes #3393.
  • PHPCS passes before PHPStan emits this finding.

Expected

PHPStan resolves the shared Agents API interface consistently and accepts the concrete observer, or the repository's static-analysis bootstrap/config is corrected so it loads a single canonical interface definition.

Scope

Investigate Composer/static-analysis symbol resolution and fix the owning type/bootstrap configuration rather than suppressing the provider call.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions