Repository navigation
#39 - Tests: detect the deprecations and boot a kernel with process-bundle - #42
Merged
Merged
Conversation
…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): archive_zip / archive_unzip resolve to ZipTask / UnzipTask. 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
force-pushed
the
39
branch
from
October 19, 2026 14:54
acde833 to
490b5f3
Compare
1 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #39 (bridge part of cleverage/process-bundle#303).
phpunit.xml.dist:failOnDeprecationanddisplayDetailsOnTestsThatTriggerDeprecations;<source ignoreSuppressionOfDeprecations="true">, so that the deprecations triggered withtrigger_deprecation()(silenced@trigger_error()) are reported. NoignoreIndirectDeprecations: it also hides theDebugClassLoaderdeprecations about the classes of the bundle.tests/bootstrap.php:DebugClassLoader::enable()(extending a@final/@internalclass, missing return types...).tests/App/TestKernel.php+tests/Functional/KernelTest.php(#[CoversNothing]): a kernel with FrameworkBundle, process-bundle and this bundle. It checks archive_zip / archive_unzip resolve to ZipTask / UnzipTask. The resolution of the task codes needsTaskRegistry(process-bundle 5.4, not released yet): the test is skipped with the released versions, and runs withcleverage/process-bundle:dev-main.KernelTestrestores the exception handler of theErrorHandlerregistered when the kernel boots, which the first Symfony 6.4 versions do not remove (risky test with the lowest dependencies).symfony/framework-bundlerequired in dev.TestKernelsetsframework.property_info.with_constructor_extractorfrom Symfony 7.3, where not setting it is deprecated.rector.phpskipsRemoveAlwaysTrueIfConditionRectorfortests/App/TestKernel.php: the condition on the Symfony version is always true with the installed version only.psr/log^2|^3required in dev: with the lowest dependencies, process-bundle 5.0 lets Composer install psr/log 1, which is fatal with itsAbstractLoggeronce a kernel boots. The real fix is raising thecleverage/process-bundlefloor 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
Breaking changes
None: tests and CI only.
🤖 Generated with Claude Code