Skip to content

[2.2][DomCrawler] Added ability to set file as raw path to file field #5407

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

Merged
merged 1 commit into from
Oct 14, 2012

Conversation

hason
Copy link
Contributor

@hason hason commented Aug 31, 2012

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

For description see #4674 (#4674 (comment))

Related PRs:

Behat/MinkBrowserKitDriver#1
https://github.com/Behat/MinkGoutteDriver/pull/7
FriendsOfPHP/Goutte#77

@travisbot
Copy link

This pull request passes (merged c3c29e5d into c0673d7).

* @param string $value The value of the field
* @param Boolean $raw Set file path as string (for simulating HTTP request)
*/
public function setValue($value, $raw = false)
Copy link
Member

Choose a reason for hiding this comment

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

I don't like the method signature change. I would prefer to add a new method for this use case. It also makes things more explicit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This proposed change is very elegant, no BC and setValue($foo, true) works with (right behaviour) or without (bad behavior in some cases) this change. But I agree that it's not a nice solution. So should I leave setValue as alias for upload and create setFilePathmethod?

@stof
Copy link
Member

stof commented Oct 13, 2012

@fabpot anything missing here ?

fabpot added a commit that referenced this pull request Oct 14, 2012
This PR was merged into the master branch.

Commits
-------

c902966 [DomCrawler] Added ability to set file as raw path to file field

Discussion
----------

[2.2][DomCrawler] Added ability to set file as raw path to file field

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

For description see #4674 (#4674 (comment))

Related PRs:

Behat/MinkBrowserKitDriver#1
https://github.com/Behat/MinkGoutteDriver/pull/7
FriendsOfPHP/Goutte#77

---------------------------------------------------------------------------

by stof at 2012-10-13T21:53:27Z

@fabpot anything missing here ?
@fabpot fabpot merged commit c902966 into symfony:master Oct 14, 2012
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.

4 participants