Skip to content

Fixed final class usage - again impossible to extend functionality #173

@adambalint-srg

Description

@adambalint-srg

Oh yeah, finally the package's new (not yet released) version will use interfaces for chains, so I can extend the functionality despite of final core chain classes.
Oh wait, no.

assert($chain instanceof ValidatorChain);

So at some points of the package it won't work if I use a different chain (with the core interface). The Input factory supports the custom chain classes, but the code itself not. Is it planned to fix?

Some other places where the classes are fixed:


$targetValidatorChain instanceof ValidatorChain

assert($chain instanceof ValidatorChain);

assert($chain instanceof ValidatorChain);

assert($chain instanceof ValidatorChain);

Why merge and getValidator method not added to the interface? With this the code really can support custom chain classes.
If you agree about it, I can help with PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions