Skip to content

#48 - Give a code to the tasks, class name as service id - #49

Merged
njoubert-cleverage merged 1 commit into
mainfrom
48
Oct 15, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
48

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #48: propagate cleverage/process-bundle#91 (PR cleverage/process-bundle#294) to this bridge. Deprecations introduced in 3.3, removal in 4.0.

Changes

  • Codes: cleverage.task tag on each task, prefixed by the bridge name, so that the tasks are referenced with task: <code> (process-bundle 5.4 or later, where referencing a task by its service is deprecated):

    Task Code
    DatabaseReaderTask doctrine_database_reader
    DatabaseUpdaterTask doctrine_database_updater
    ClearEntityManagerTask doctrine_clear_entity_manager
    DoctrineBatchWriterTask doctrine_batch_writer
    DoctrineCleanerTask doctrine_cleaner
    DoctrineDetacherTask doctrine_detacher
    DoctrineReaderTask doctrine_reader
    DoctrineRefresherTask doctrine_refresher
    DoctrineRemoverTask doctrine_remover
    DoctrineWriterTask doctrine_writer
  • Service ids: the class names, as in process-bundle (definitions non-shared, arguments and monolog.logger tag unchanged). They stay public, but fetching them directly from the service container is deprecated since 3.3 ({ name: container.private, package: cleverage/doctrine-process-bundle, version: '3.3' }): Accessing the "…" service directly from the container is deprecated, use dependency injection instead.; private in 4.0. The references of the container (process-bundle task locator) use the private service, without deprecation.

  • Former ids cleverage_doctrine_process.task.* (released since 2.0, private): deprecated aliases of the class names since 3.3 (The "cleverage_doctrine_process.task.doctrine_reader" service alias is deprecated, use the "doctrine_reader" task code or the class name of the task instead. It will be removed in 4.0.), removed in 4.0. They stay private, as before. No other service definition of the bundle referenced them.

  • Docs: the code on the reference page of each task (and in the template), all the examples use the codes (doctrine tasks and process-bundle tasks, 43 references in the reference pages and cookbooks, plus the template); index.md (codes, service ids, deprecations).

  • Tests: CleverAgeDoctrineProcessExtensionTest adapted; testEveryTaskIsTested now checks the class-name definitions, the uniqueness and the doctrine_ prefix of the codes and that every former id is a tested alias.

  • CHANGELOG (Latest).

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 cleverage.task tag is 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

  • Extension loaded in a ContainerBuilder: the 10 definitions (class name id, non-shared, public, arguments unchanged, cleverage.task / monolog.logger / container.private tags) and the 10 private deprecated aliases with their message.
  • Tests: CleverAgeDoctrineProcessExtensionTest (class name as id, non-shared, logger channel, code, public + container.private, former ids private deprecated aliases with their message, every task tested). After composer update: 81 tests OK, PHPStan, PHP-CS-Fixer, Rector OK, composer validate --strict OK.
  • Demo project: not checked in this PR (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

Give a code to the tasks (cleverage/process-bundle#91), prefixed by the
bridge name: doctrine_database_reader, doctrine_database_updater,
doctrine_clear_entity_manager, doctrine_batch_writer, doctrine_cleaner,
doctrine_detacher, doctrine_reader, doctrine_refresher, doctrine_remover
and doctrine_writer (cleverage.task tag, task: <code> with
cleverage/process-bundle 5.4 or later).

The tasks have their class name as service id (public, non-shared,
arguments and monolog.logger tag unchanged) with the container.private
tag: fetching them directly from the service container is deprecated
since 3.3, they will be private in 4.0. The former ids
cleverage_doctrine_process.task.* are private deprecated aliases of the
class names (since 3.3, removed in 4.0).

Update the extension tests (class name id, code tag, container.private
tag, deprecated aliases, every task and alias tested), the documentation
(code on each reference page and the template, examples switched to
task: <code>, index) and the CHANGELOG.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 75b2eaa into main Oct 15, 2026
22 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 a code to the tasks (process-bundle#91), class name as service id

1 participant