Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Input receives complete context for validation #6264

Closed

Conversation

marcuswinkler
Copy link
Contributor

Instances of InputInterface used to receive all submitted values from BaseInputFilter as context. After the changes made in #5271, only the values extracted from other inputs are passed on.

Is this by intention or by accident? I'd like to peek into the context without defining values as an input sometimes.

@argentinaluiz
Copy link

Works now, I discovered this bug.

@Ocramius
Copy link
Member

@marcuswinkler can you check if $this->data is also filtered first? That is quite a big difference...

@Ocramius
Copy link
Member

Also ping @bakura10

@marcuswinkler
Copy link
Contributor Author

No, I don't think $this->data is filtered at all. It's the values passed into setData(), not those extracted from the input objects.

The extraction is currently done via getRawValues(), so data is not being filtered now either. It's just that values not defined as inputs are missing from the validation context.

To be honest, I'm not sure this is worth merging anymore. The current behavior makes more sense and has been present in several released versions now (starting with 2.2.5).

@marcuswinkler
Copy link
Contributor Author

This PR is probably also superseded by #6154, where it's going to be possible to set a context array explicitly.

@weierophinney
Copy link
Member

Closing, as we've merged #6154, which provides a more comprehensive solution.

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

Successfully merging this pull request may close these issues.

4 participants