Skip to content

Tests: detect the deprecations and boot a kernel with process-bundle #57

Closed

Description

@njoubert-cleverage

Description

  • The deprecations are not detected by the test suite: no failOnDeprecation, no symfony/phpunit-bridge, no SYMFONY_DEPRECATIONS_HELPER. The deprecations triggered with trigger_deprecation() are silenced (@trigger_error()), so PHPUnit ignores them by default, and the @final annotations need the DebugClassLoader. A deprecation of Symfony, Doctrine or process-bundle used by this bundle goes unnoticed until the next major.
  • No test boots a kernel with process-bundle and the third-party bundles: the extension tests load it into a bare ContainerBuilder. The resolution of the task codes by process-bundle's TaskLocatorCompilerPass, the code collisions with the core, and the references to the services of other bundles are only checked by hand in process-bundle-demo.

Proposed fix

  1. Fail the tests on deprecations: failOnDeprecation="true", <source ignoreSuppressionOfDeprecations="true"> restricted to the deprecations caused by this bundle's code (ignoreIndirectDeprecations / ignoreSelfDeprecations, or the phpunit-bridge baseline), DebugClassLoader::enable() in the bootstrap. To check with the lowest supported PHPUnit (10.5) and the lowest CI job; the tests of deprecated features expect their deprecation explicitly.
  2. Add a functional test booting a minimal kernel (FrameworkBundle, process-bundle and this bundle) and compiling the container: every task declared by the bundle is resolvable by its code through the process-bundle registry, and the adapters locator (cleverage.cache.adapter tag, code attribute) resolves.

Same work in process-bundle: cleverage/process-bundle#303. Found during the Symfony bundle best practices review of the bridges.

Requirements

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

Breaking changes

None: tests and CI only.

Activity

  1. added a commit that references this issue on Oct 19, 2026
  2. added a commit that references this issue on Oct 19, 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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions