Skip to content

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

Merged
njoubert-cleverage merged 1 commit into
mainfrom
58
Oct 20, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
58

Conversation

@njoubert-cleverage

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

Copy link
Copy Markdown
Member

Description

Fixes #58 (bridge part of cleverage/process-bundle#303). Same as the other bridges (e.g. cleverage/rest-process-bundle#66), plus two fixes revealed by the new checks.

  • phpunit.xml.dist: failOnDeprecation and displayDetailsOnTestsThatTriggerDeprecations; <source ignoreSuppressionOfDeprecations="true">, so that the deprecations triggered with trigger_deprecation() (silenced @trigger_error()) are reported.
  • New tests/bootstrap.php: DebugClassLoader::enable().
  • New tests/App/TestKernel.php + tests/Functional/KernelTest.php (#[CoversNothing]): FrameworkBundle, DoctrineBundle (DBAL only, SQLite in memory: no ORM configuration whose deprecations differ between DoctrineBundle versions), process-bundle and this bundle. doctrine is resolved; the 10 task codes resolve to their class with TaskRegistry (process-bundle 5.4, skipped with the released versions).
  • TestKernel sets framework.property_info.with_constructor_extractor from Symfony 7.3; rector.php skips RemoveAlwaysTrueIfConditionRector for tests/App/TestKernel.php.
  • AbstractDoctrineQueryTask::getQueryBuilder() (order_by option of DoctrineReaderTask): doctrine/orm 3.7 deprecates the string sort directions ([RFC] Follow-up on doctrine/collections Order enum doctrine/orm#11313). The \SortDirection enum is passed when addOrderBy() accepts it (checked once by reflection), the string otherwise: same query, nothing changes with doctrine/orm < 3.7. New test for the descending order.
  • psr/log ^2 || ^3 in require (was ^1.1.4 || ^2 || ^3): with psr/log 1, process-bundle's AbstractLogger is fatal as soon as a kernel boots (lowest dependencies). Same change as CI: test the lowest dependencies flysystem-process-bundle#49, CI: test the lowest dependencies rest-process-bundle#50, CI: test the lowest dependencies soap-process-bundle#43.
  • symfony/framework-bundle required in dev.
  • CI (test.yml): the lowest dependencies are tested on PHP 8.2 only, as in the other bridges. With PHP 8.4 and 8.5, the lowest dependencies (Symfony 6.4.0, released before PHP 8.4) trigger hundreds of PHP deprecations in the vendor code (implicitly nullable parameters), which now fail the tests: the lowest versions are meant for the lowest PHP version.

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), process-bundle dev-main: no deprecation, no risky test; PHPStan, PHP-CS-Fixer and Rector OK.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None. psr/log 1 is no longer accepted, but process-bundle does not work with it.

🤖 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, DoctrineBundle with
  DBAL on SQLite in memory, process-bundle and this bundle): doctrine is
  resolved, the 10 task codes resolve to their class. The resolution of the
  task codes is skipped without TaskRegistry (cleverage/process-bundle < 5.4).
- TestKernel sets framework.property_info.with_constructor_extractor from
  Symfony 7.3; Rector does not remove this condition on the Symfony version.
- AbstractDoctrineQueryTask (DoctrineReaderTask order_by): pass the
  \SortDirection enum to QueryBuilder::addOrderBy() when doctrine/orm accepts
  it (3.7+, string directions deprecated there), the string otherwise.
- Require psr/log ^2 || ^3: process-bundle's AbstractLogger is fatal with
  psr/log 1 (lowest dependencies, revealed by the kernel test).
- Require symfony/framework-bundle in dev.
- CI: the lowest dependencies are tested on the lowest PHP version only, as
  in the other bridges: with PHP 8.4+, Symfony 6.4.0 triggers PHP
  deprecations (implicitly nullable parameters) that now fail the tests.

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