Repository navigation
[v6] #279 - Make the classes marked @final since 5.4 final, type the services on the interfaces - #521
Merged
Merged
Conversation
…ces on the interfaces The 109 classes marked @Final since 5.4 are final. The services of the bundle are typed on ProcessManagerInterface, ProcessConfigurationRegistryInterface and TransformerRegistryInterface, so that a decorator is injected everywhere; the interfaces declare the methods the services use and the two services tagged kernel.reset extend ResetInterface. PregFilterTransformer::transform() returns ?string. Update documentation and tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #279 (v6.0 step; the v5 step was #295).
@final since 5.4arefinal(121 final classes insrc/); the@internaltags are unchanged.ProcessManagerInterface,ProcessConfigurationRegistryInterfaceandTransformerRegistryInterface(commands,ProcessExecutorTask,ProcessLauncherTask,ProcessManager, the Monolog processors,TransformerTask,TransformerTraitand the transformers using it), so that a decorator of these services is injected everywhere.ProcessManagerInterface::getProcessHistory()/getTaskConfiguration(),ProcessConfigurationRegistryInterface::getProcessCodes(). Both extendResetInterface: their services are taggedkernel.reset, and the tag moves to a decorator, which must delegatereset().PregFilterTransformer::transform()returns?string(the@phpstan-ignore return.unusedTypeis removed).ContextualOptionResolverhas no interface: documented as not decoratable.finalremoved from the class constants,CsvWriterTask::getHeaders()returnsarray, the unused$lengthparameter ofSplFile::readLine()is removed.Tests: no PHPUnit double nor subclass of a final class is left (doubles on the interfaces, real
ProcessState);CleverAgeProcessBundleTest::testSubclassLoadsTheServicesOfTheBundleis removed,TransformerRegistryTest::testOnlyTheTransformersOfTheLocatorAreGivenis rewritten without a subclass.DecorationTestdecorates the process manager and the registries in adecoratedenvironment of the test kernel: the decorators are used,lint:containerchecks every service against them, and the reset goes through them.Follow-ups in the bridges, for their test doubles of
ProcessStatebefore they allow^6.0: cleverage/doctrine-process-bundle#96, cleverage/flysystem-process-bundle#99, cleverage/archive-process-bundle#82.Requirements
Breaking changes
Major (v6.0, see
UPGRADE.md, section "Final classes"):ProcessManagerInterfaceandProcessConfigurationRegistryInterfacedeclare new methods and extendResetInterface: own implementations and decorators must implement them;$transformerRegistryproperty ofTransformerTraitis typed?TransformerRegistryInterface;PregFilterTransformer::transform()returns?string,SplFile::readLine()has no$lengthparameter.🤖 Generated with Claude Code