Skip to content

feat(registry) #27 Give the service ids in the error on duplicate client codes - #28

Merged
njoubert-cleverage merged 1 commit into
mainfrom
27
Oct 2, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
27

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #27.

Two clients with the same code made every SOAP process fail with Client <code> is already defined, without telling which services are in conflict (they usually share the same class).

  • RegisterClientsPass (new): registers the services tagged cleverage.soap.client in ClientRegistry with their service id, replaces the generic RegistryCompilerPass
  • ClientRegistry::addClient(): new optional $serviceId argument; on a duplicate code, the message gives the ids of both services (unchanged message when an id is missing)
  • ClientRegistryTest, RegisterClientsPassTest (new)
  • reference/client.md: update the note on unique codes

Checked with process-bundle-demo, with a second app.cleverage_soap_process.client.oorsprong_countryinfo_duplicate client service with the oorsprong_countryinfo code: demo.soap now fails with Client oorsprong_countryinfo is already defined by service "app.cleverage_soap_process.client.oorsprong_countryinfo", cannot register service "app.cleverage_soap_process.client.oorsprong_countryinfo_duplicate"; without the duplicate, it still runs successfully.

Same change in cleverage/cache-process-bundle#26 and cleverage/rest-process-bundle#33 (see the related issues).

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None: the new argument of ClientRegistry::addClient() is optional, only the exception message changes.

🤖 Generated with Claude Code

…ent codes

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 24fb13f into main Oct 2, 2026
17 checks passed
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.

Give the service ids in the error on duplicate client codes

1 participant