Skip to content

Apply Symfony best practices - Services #149

Closed

Description

@njoubert-cleverage
  • Step 1 : command, events, expression_language, logger, manager, registry
  • Step 2 : task, transformer

Activity

  1. added this to the v4.0 milestone on Oct 22, 2024
  2. changed the title [-]Services[/-] [+]Apply Symfony best practices - Services[/+] on Oct 22, 2024
  3. removed this from the v4.0 milestone on Oct 22, 2024
  4. added this to the v5.0 milestone on Dec 16, 2024
  5. modified the milestones: v5.0, v6.0 on Dec 9, 2025
  6. njoubert-cleverage commented on Oct 14, 2026

    @njoubert-cleverage
    MemberAuthor

    State on main @ cd7b81f (v5.3), for step 2: config/services/task.yaml and config/services/transformer.yaml still load src/Task/* and src/Transformer/* as resources with autowire: true (+ autoconfigure: true for transformers) and bind. The best practices for reusable bundles say bundle services should not use autowiring nor autoconfiguration: their dependencies then depend on the aliases available in the application.

    Step 2 = one explicit definition per task/transformer, with cleverage_process.* ids and FQCN aliases (task service: '@CleverAge\ProcessBundle\Task\...' references must keep working), explicit arguments instead of bind, explicit tags.

    Related: #275 (task locator) and #114 (private tasks) change how tasks are fetched, #276 adds a code tag attribute on transformers, #277 converts the definitions to PHP. Doing step 2 after #275/#276 avoids writing the definitions twice.

  7. njoubert-cleverage commented on Oct 14, 2026

    @njoubert-cleverage
    MemberAuthor

    Moved out of the v6.0 milestone (next 5.x minor): replacing the autowired resources of config/services/task.yaml / transformer.yaml by explicit definitions is not a BC break as long as the service ids (the class names), public / shared, tags and arguments stay the same. Edge case to mention in the PR: today the arguments are autowired from the application aliases (e.g. a custom PropertyAccessorInterface alias), an explicit wiring to the bundle services would no longer use them. Still to do after #275 / #276, which change how tasks and transformers are fetched. Not in conflict with #272 (autoconfiguration of the application services implementing TaskInterface / TransformerInterface).

  8. removed this from the v6.0 milestone on Oct 14, 2026
  9. added a commit that references this issue on Oct 14, 2026
  10. added a commit that references this issue on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions