You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Define the public API: mark classes final or internal #279
No class of the bundle is final or @internal (checked on main @ cd7b81f): the whole code base is an extension point, so any refactoring (constructor change, renamed protected method or property) is potentially a breaking change. For instance, the constructors of ProcessManager (#275) and of the registries can only gain optional arguments.
The Symfony BC promise relies on @internal / @final / final to define what is covered.
Proposed fix
v5 (preparation): add @final on the classes that are not meant to be extended, and @internal on the infrastructure classes. The Symfony DebugClassLoader then triggers a deprecation for classes extending them, giving one minor version of notice.
Major (v6): extending a class that becomes final, or using an @internal class, is no longer supported. The v5 @final annotations only trigger deprecations.
v5 step done in #295 (merged 4d54b19, released in the next 5.x minor):
@final since 5.4 on 107 classes: the engine (ProcessManager, ProcessConfigurationRegistry, TransformerRegistry, ContextualOptionResolver), the models (ProcessState, ProcessHistory, SubprocessInstance, the configurations, the events, ConstraintLoader, the Filesystem files) and the concrete tasks and transformers.
Left open: the abstract classes, interfaces, traits, exceptions, and the classes extended by other classes of the bundle (FileReaderTask, LineReaderTask, FolderBrowserTask, CsvReaderTask, InputCsvReaderTask, Filesystem\CsvResource).
TaskRegistry (not released before) is already final.
Remaining for v6.0:
Turn every @final since 5.4 into final (and keep @internal).
Narrow the return types that are too wide, now ignored with @phpstan-ignore return.unusedType because narrowing them would break child classes until they are final:
Activity
#279 - Mark the classes not meant to be extended @Final and the infra…
#279 - Mark the classes not meant to be extended @Final and the infra…
Merge pull request #295 from cleverage/279
njoubert-cleverage commentedon Oct 15, 2026
v5 step done in #295 (merged
4d54b19, released in the next 5.x minor):@final since 5.4on 107 classes: the engine (ProcessManager,ProcessConfigurationRegistry,TransformerRegistry,ContextualOptionResolver), the models (ProcessState,ProcessHistory,SubprocessInstance, the configurations, the events,ConstraintLoader, theFilesystemfiles) and the concrete tasks and transformers.FileReaderTask,LineReaderTask,FolderBrowserTask,CsvReaderTask,InputCsvReaderTask,Filesystem\CsvResource).@internalon 13 infrastructure classes (extension,Configuration, commands,DataQueueEventListener,PhpFunctionProvider, Monolog processors,ProcessLogger,TaskLogger).TaskRegistry(not released before) is alreadyfinal.Remaining for v6.0:
@final since 5.4intofinal(and keep@internal).@phpstan-ignore return.unusedTypebecause narrowing them would break child classes until they are final:ProcessState::getContextualizedOptions(): ?array→arrayPregFilterTransformer::transform(): array|string|null→string|null@phpstan-ignorecomments.#56 - Mark the classes not meant to be extended @Final and the infras…
#57 - Mark the classes not meant to be extended @Final and the infras…
#58 - Mark the classes not meant to be extended @Final and the infras…
#55 - Mark the classes not meant to be extended @Final and the infras…