Skip to content

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

Merged
njoubert-cleverage merged 1 commit into
mainfrom
57
Oct 19, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
57

Conversation

@njoubert-cleverage

@njoubert-cleverage njoubert-cleverage commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #57 (bridge part of cleverage/process-bundle#303).

  • phpunit.xml.dist: failOnDeprecation and displayDetailsOnTestsThatTriggerDeprecations; <source ignoreSuppressionOfDeprecations="true">, so that the deprecations triggered with trigger_deprecation() (silenced @trigger_error()) are reported. No ignoreIndirectDeprecations: it also hides the DebugClassLoader deprecations about the classes of the bundle.
  • New tests/bootstrap.php: DebugClassLoader::enable() (extending a @final / @internal class, missing return types...).
  • New tests/App/TestKernel.php + tests/Functional/KernelTest.php (#[CoversNothing]): a kernel with FrameworkBundle, process-bundle and this bundle. It checks an adapter declared by tag and one by #[AsCacheAdapter] are resolved by code, cache_get / cache_set resolve to GetTask / SetTask. The resolution of the task codes needs TaskRegistry (process-bundle 5.4, not released yet): the test is skipped with the released versions, and runs with cleverage/process-bundle:dev-main.
  • KernelTest restores the exception handler of the ErrorHandler registered when the kernel boots, which the first Symfony 6.4 versions do not remove (risky test with the lowest dependencies).
  • symfony/framework-bundle required in dev.
  • TestKernel sets framework.property_info.with_constructor_extractor from Symfony 7.3, where not setting it is deprecated. rector.php skips RemoveAlwaysTrueIfConditionRector for tests/App/TestKernel.php: the condition on the Symfony version is always true with the installed version only.
  • psr/log ^2 || ^3 required in dev: with the lowest dependencies, process-bundle 5.0 lets Composer install psr/log 1, which is fatal with its AbstractLogger once a kernel boots. The real fix is raising the cleverage/process-bundle floor to the first release containing #274 - CI: test the lowest dependencies, fix the lower bounds of psr/log and monolog/monolog process-bundle#287; this dev constraint can then be removed.

Checked in the container: highest dependencies (PHP 8.5, process-bundle 5.3, PHPUnit 13, Symfony 8.1), lowest dependencies (PHP 8.2, process-bundle 5.0, PHPUnit 11.5, Symfony 6.4.0), Symfony 6.4.48 and 7.4 (highest) and process-bundle dev-main: no deprecation, no risky test; PHPStan, PHP-CS-Fixer and Rector OK. A deprecation makes PHPUnit exit with code 1 (checked).

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None: tests and CI only.

🤖 Generated with Claude Code

…undle

- PHPUnit fails on deprecations (failOnDeprecation, details displayed), the
  silenced ones included (ignoreSuppressionOfDeprecations). The new
  tests/bootstrap.php enables the Symfony DebugClassLoader (@Final,
  @internal, return types).
- New functional test booting a kernel (FrameworkBundle, process-bundle and this bundle):
  an adapter declared by tag and one by #[AsCacheAdapter] are resolved by code, cache_get / cache_set resolve to GetTask / SetTask. The resolution of the task codes is skipped
  without TaskRegistry (cleverage/process-bundle < 5.4).
- The exception handler of the ErrorHandler registered at boot is restored
  after each kernel test (not removed by the first Symfony 6.4 versions).
- Require symfony/framework-bundle in dev.
- TestKernel sets framework.property_info.with_constructor_extractor from
  Symfony 7.3 (not setting it is deprecated there); Rector does not remove
  this condition on the Symfony version (always true with the installed one).
- psr/log ^2 || ^3 required in dev: with the lowest dependencies,
  process-bundle 5.0 installs psr/log 1, incompatible with its AbstractLogger
  (to be removed when the process-bundle floor is raised).

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

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

1 participant