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

[5.4] Remove files hydration #16017

Merged
merged 1 commit into from
Oct 24, 2016
Merged

[5.4] Remove files hydration #16017

merged 1 commit into from
Oct 24, 2016

Conversation

themsaid
Copy link
Member

Since the Validator is now capable of dealing with arrays it might receive some complex structures like:

[
    'users' => [
        ['name' => 'Taylor', 'image' => $file],
        ['name' => 'Mohamed', 'image' => $file2],
    ]
];

In this example a user item may contain file values as well as regular data values, in such cases extracting files won't be possible.

Looking at the validator code, the only place where this hydration is useful is when we try to get the attribute type via getAttributeType() but using the attribute value we can get the type easily, this will leave the hydration thing useless IMO.

In this PR I remove this step from the Validator.

@taylorotwell
Copy link
Member

Do you know if this has any breaking changes?

@themsaid
Copy link
Member Author

afaik it's only the removal of the two methods getFiles and setFiles, other than this the Validator should work as normal, actually the hydration method was broken for a big while until that PR fixed it.

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

Successfully merging this pull request may close these issues.

2 participants