Skip to content

[FEAT]: Configure RPC via attributes #118

@tacman

Description

@tacman

Describe the solution you'd like

This is very similar to #70, but uses the more modern PHP 8 attributes.

I started implementing https://github.com/EdouardCourty/mcp-server-bundle but it seemed overkill for my needs, which can be handled with simple JSON-RPC calls. But it's worth look at how tools are defined, as this bundle could also use that approach instead of configuring it in the services.

So instead of

services:
   method-a.service-id:
      class: Method\A\Class
      tags:
       - { name: 'json_rpc_http_server.jsonrpc_method', method: 'method-a' }
       - { name: 'json_rpc_http_server.jsonrpc_method', method: 'method-a-alias' }
class A {
    #[RpcMethod('a', 'a-alias')
    public function MyMethod()...
}

Is your feature request related to a problem ?

  • Yes

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions