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

[BrowserKit] Nested file array prevents uploading file #35827

Merged
merged 1 commit into from Feb 23, 2020

Conversation

afilina
Copy link
Contributor

@afilina afilina commented Feb 22, 2020

Q A
Branch? master
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR n/a

The HttpBrowser doesn't play nicely with Symfony\Component\DomCrawler::getPhpFiles().
The former assumes a flat array structure, while the latter explicitly un-flattens it, causing files to silently get ignored by the DomCrawler's submitForm.

@afilina
Copy link
Contributor Author

afilina commented Feb 22, 2020

I don't understand what's wrong with thew CI system. Appveyor reports an error despite having all checks green. fabpot.io reports CS issues. I went and fixed CS issues in preexisting code as per the CONTRIBUTING.md docs, and now fabpot.io reports reports one more issue than previously. I have no idea what I'm expected to do here to pass the build. The rules are obfuscated and this bug is going to affect my workshop on Monday.

@chalasr chalasr added this to the 4.4 milestone Feb 22, 2020
@nicolas-grekas nicolas-grekas changed the title [Bugfix] Nested file array prevents uploading file [BrowserKit] Nested file array prevents uploading file Feb 23, 2020
@nicolas-grekas nicolas-grekas changed the base branch from master to 4.4 February 23, 2020 09:55
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @afilina.
I rebased your PR to target 4.4 + fixed some minor CS issues meanwhile.

@nicolas-grekas
Copy link
Member

Thank you @afilina.

@nicolas-grekas nicolas-grekas merged commit d28a738 into symfony:4.4 Feb 23, 2020
@afilina afilina deleted the bugfix/nested-file-array branch February 23, 2020 14:04
This was referenced Feb 29, 2020
fabpot added a commit that referenced this pull request Mar 28, 2020
… uploads (codebay)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[BrowserKit] fixed missing post request parameters in file uploads

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

Pull Request #35827 "[BrowserKit] Nested file array prevents uploading file" introduced a bug that had not been previously covered by unit tests for the component. Requests that include additional parameters with a file upload are not being included

Commits
-------

7abee62 [BrowserKit] fixed missing post request parameters in file uploads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants