Skip to content

#45 - Give a code to the custom cache task example - #46

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

njoubert-cleverage merged 1 commit into
mainfrom
45

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #45: the "Custom cache tasks" example of docs/index.md declared App\Task\DeleteTask as a public service without code, so it could only be referenced by its service, deprecated since cleverage/process-bundle 5.4 (cleverage/process-bundle#91, #43).

  • #[AsTask(code: 'app_cache_delete')] on the task (prefixed, as recommended for the application tasks).
  • Service definition: autoconfigure: true (non-shared, cleverage_process_task logger channel, cleverage.task tag with the code) instead of public: true / shared: false; the adapter registry is still passed explicitly (it has no class alias for autowiring).
  • New process example: task: app_cache_delete.

Checks

Example copied as is in the demo project (process-bundle and cache-process-bundle main), then removed: debug:container shows the cleverage.task (code app_cache_delete) and monolog.logger tags, not shared; a process cache_set → app_cache_delete → cache_get succeeds and cache_get returns null after the deletion.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None (documentation only).

🤖 Generated with Claude Code

The DeleteTask example gets a code with #[AsTask(code: 'app_cache_delete')],
relies on autoconfiguration (non-shared, cleverage_process_task logger
channel, code tag) instead of a public service, and is used in a process
with "task: app_cache_delete".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit e57c31b 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

Development

Successfully merging this pull request may close these issues.

Documentation: give a code to the custom cache task example

1 participant