Skip to content

#46 #45 - Give a code to the task and the transformer, class name as service id - #47

Merged
njoubert-cleverage merged 2 commits into
mainfrom
46
Oct 15, 2026
Merged

njoubert-cleverage merged 2 commits into
mainfrom
46

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #46, fixes #45: propagate cleverage/process-bundle#91 (PR cleverage/process-bundle#294) to the task of this bridge, and tag its transformer with its code for the lazy loading of cleverage/process-bundle#276 (PR cleverage/process-bundle#293). Deprecations introduced in 3.3, removal in 4.0.

Changes

  • Task code: soap_request (RequestTask), { name: cleverage.task, code: soap_request } tag, so that the task is referenced with task: soap_request (process-bundle 5.4 or later, where referencing a task by its service is deprecated).
  • Transformer code: RequestTransformer tagged { name: cleverage.transformer, code: soap_request }, the code returned by its getCode() (checked by process-bundle): with process-bundle 5.4 it is loaded lazily from the transformer locator instead of being instantiated eagerly by TransformerRegistry::addTransformer() (deprecated there without code). The task and the transformer share the soap_request code: no conflict, the registries are separate.
  • Service ids: the class names, as in process-bundle (task non-shared, as before; arguments and monolog.logger tags unchanged). They are public, but fetching them directly from the service container is deprecated since 3.3 ({ name: container.private, package: cleverage/soap-process-bundle, version: '3.3' }); private in 4.0. Note: the transformer was previously private (its class-name alias had no public), it is now public with the same container.private deprecation, as in process-bundle.
  • Former ids cleverage_soap_process.task.request / cleverage_soap_process.transformer.request (private): deprecated aliases of the class names since 3.3 (The "cleverage_soap_process.task.request" service alias is deprecated, use the "soap_request" task code or the class name of the task instead. It will be removed in 4.0., and the same with "transformer code" / "class name of the transformer" for the transformer), removed in 4.0. They stay private. No other service definition referenced them.
  • Docs: the code on the task reference page (and in the template; the transformer page already shows its Transformer code), all the examples use the codes (soap_request and the process-bundle tasks transformer, input_iterator, csv_reader, csv_writer, logger); index.md (codes, lazy loading of the transformer, service ids, deprecations).
  • CHANGELOG (Latest), one entry per issue.

Requirement not changed yet: cleverage/process-bundle stays ^5.0, because 5.4 is not released (Composer could not resolve ^5.4, the CI would fail). The change is harmless with process-bundle ≤ 5.3 (the code attributes of the cleverage.task / cleverage.transformer tags are ignored there; container.private and deprecated aliases are Symfony features). To raise to ^5.4 before releasing 3.3 (the task: key of the documentation requires it).

Checks

  • Container definitions checked with the extension loaded in a ContainerBuilder (ids, shared, public, tags, arguments, aliases and their deprecations).
  • Tests: CleverAgeSoapProcessExtensionTest (class name as id, task non-shared, cleverage.task / cleverage.transformer code tags, transformer code equal to getCode(), public + container.private, monolog.logger tags and arguments, former ids private deprecated aliases with their message). After composer update: 34 tests OK, PHPStan, PHP-CS-Fixer, Rector OK, composer validate --strict OK.
  • The demo project check is done separately.

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None: the former ids and the public access are only deprecated (3.3), removed in 4.0.

🤖 Generated with Claude Code

njoubert-cleverage and others added 2 commits October 15, 2026 11:49
… name as service id

- RequestTask: tagged { name: cleverage.task, code: soap_request }
  (cleverage/process-bundle#91), referenced with "task: soap_request".
- RequestTransformer: tagged { name: cleverage.transformer, code: soap_request }
  (the code returned by getCode()), loaded lazily by cleverage/process-bundle
  5.4 (cleverage/process-bundle#276).
- Class name as service id for both, public with the container.private tag:
  fetching them directly from the service container is deprecated since 3.3,
  private in 4.0. Arguments, non-shared task and monolog.logger tags unchanged.
- Former ids cleverage_soap_process.task.request and
  cleverage_soap_process.transformer.request: private deprecated aliases of
  the class names (since 3.3, removed in 4.0).
- Tests: extension test for the ids, codes, container.private tags and the
  deprecated aliases.
- Docs: code on the task reference page and template, examples switched to
  "task: <code>", configuration paragraph in docs/index.md; CHANGELOG.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…test

The transformer test instantiates RequestTransformer to compare the tag code
with getCode(): with a coverage driver, the test was risky (code executed but
not listed as covered or used).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit c9a7491 into main Oct 15, 2026
18 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

1 participant