Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1be2d34

Browse files
committed
minor #17776 [DomCrawler] Clarify the value returned by getPhpFiles() (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()
2 parents 2799b1c + a694401 commit 1be2d34

File tree

1 file changed

+5
-1
lines changed
  • src/Symfony/Component/DomCrawler

1 file changed

+5
-1
lines changed

src/Symfony/Component/DomCrawler/Form.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,12 @@ public function getPhpValues()
157157
*
158158
* This method converts fields with the array notation
159159
* (like foo[bar] to arrays) like PHP does.
160+
* The returned array is consistent with the array for field values
161+
* (@see getPhpValues), rather than uploaded files found in $_FILES.
162+
* For a compound file field foo[bar] it will create foo[bar][name],
163+
* instead of foo[name][bar] which would be found in $_FILES.
160164
*
161-
* @return array An array of field values.
165+
* @return array An array of file field values.
162166
*/
163167
public function getPhpFiles()
164168
{

0 commit comments

Comments
 (0)