Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input Fallback Value is not merged on Input::merge() #12

Open
weierophinney opened this issue Dec 31, 2019 · 3 comments
Open

Input Fallback Value is not merged on Input::merge() #12

weierophinney opened this issue Dec 31, 2019 · 3 comments
Labels

Comments

@weierophinney
Copy link
Member

I think the fallback value should be replaced when merge is done.


Originally posted by @Maks3w at zendframework/zend-inputfilter#35

@weierophinney
Copy link
Member Author

I think this is bug not a BC break. I don't think someone is relying on current behavior. But yes also it can be BC break, but very unlikely. This is not documented, no tests.. so I think we don't need to wait till 3.0


Originally posted by @svycka at zendframework/zend-inputfilter#35 (comment)

@weierophinney
Copy link
Member Author

Imho the intended behavior of merge is to also take care of the fallback value. Therefore this qualifies as a bugfix. I really would like to see this fixed asap.

        if ($input instanceof Input && $input->hasFallback()) {
            $this->setFallbackValue($input->getFallbackValue());
        }

ping @Maks3w


Originally posted by @Netiul at zendframework/zend-inputfilter#35 (comment)

@weierophinney
Copy link
Member Author

Fallback feature and merge method exists since a long time and nobody appreciate this before. My conclusion any change in the current behavior introduces a BC break.


Originally posted by @Maks3w at zendframework/zend-inputfilter#35 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant