Skip to content

Commit

Permalink
minor #17776 [DomCrawler] Clarify the value returned by getPhpFiles()…
Browse files Browse the repository at this point in the history
… (jakzal)

This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Clarify the value returned by getPhpFiles()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14021
| License       | MIT
| Doc PR        | -

The comment was previously suggesting the returned value is similar to the one stored in $_FILES, while it is more similar to the way PHP stores submitted form values. It is actually more convenient to have it this way, so rather then changing the returned value (which would break BC), it is better to clarify the comment.

Commits
-------

a694401 [DomCrawler] Clarify the value returned by getPhpFiles()
  • Loading branch information
fabpot committed Feb 12, 2016
2 parents 2799b1c + a694401 commit 1be2d34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Symfony/Component/DomCrawler/Form.php
Expand Up @@ -157,8 +157,12 @@ public function getPhpValues()
*
* This method converts fields with the array notation
* (like foo[bar] to arrays) like PHP does.
* The returned array is consistent with the array for field values
* (@see getPhpValues), rather than uploaded files found in $_FILES.
* For a compound file field foo[bar] it will create foo[bar][name],
* instead of foo[name][bar] which would be found in $_FILES.
*
* @return array An array of field values.
* @return array An array of file field values.
*/
public function getPhpFiles()
{
Expand Down

0 comments on commit 1be2d34

Please sign in to comment.