Skip to content

[Form][2.3] Fixed Form::submit() and Form::setData() to react to dynamic form modifications #8828

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 978 commits into from
Aug 23, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
978 commits
Select commit Hold shift + click to select a range
cfd7e8b
merged branch kgilden/trans-et (PR #8016)
fabpot May 13, 2013
6d64c9a
merged branch jakzal/bugfix/domcrawler-savehtml (PR #8013)
fabpot May 13, 2013
f41ac06
changed all version deps to accepts all upcoming Symfony versions
fabpot May 13, 2013
b1c9fd2
removed versions in composer.json files
fabpot May 13, 2013
5e6245f
[ADD] Component_Console -add suggest in the composer.json to event-di…
ramonornela May 13, 2013
89c2591
merged branch fabpot/dep-versions (PR #8017)
fabpot May 13, 2013
0617ed1
[Console] Removed the descriptor from data set providers.
jakzal May 14, 2013
a290f87
[Console] fix test for NullOutput that does not print anything and ad…
Tobion May 14, 2013
ee0cc40
[Console] fix NullOutput
Tobion May 14, 2013
2628d88
[Console] the default type value should use the constant in OutputInt…
Tobion May 14, 2013
9dcc9fa
[Console] fix abstract Output class that fasly claims to support gues…
Tobion May 14, 2013
bd61b92
[Console] fix phpdoc of Output classes (esp. regarding the new verbos…
Tobion May 14, 2013
940b788
[Console] use inheritdoc for Output classes
Tobion May 14, 2013
6d5bc7a
[Twig][Form] Removed extra table colunm in the button_row block template
paradoxe May 14, 2013
b027c92
merged branch Tobion/console-nulloutput (PR #8037)
fabpot May 15, 2013
d656be0
merged branch paradoxe/master (PR #8043)
fabpot May 15, 2013
d61ca1b
merged branch jakzal/bugfix/segfaulting-tests (PR #8032)
fabpot May 15, 2013
4edbf3c
merged branch ramonornela/master (PR #8029)
fabpot May 15, 2013
1f8a1b7
tweaked previous merge (refs #8029)
fabpot May 15, 2013
8f54da7
[BrowserKit] should not follow redirects if status code is not 30x
May 13, 2013
da6f190
merged branch tiraeth/master-browserkit-redirect (PR #8025)
fabpot May 15, 2013
4dccee6
[Form] Add missing type hint
armetiz May 15, 2013
a6dd5db
merged branch armetiz/master (PR #8045)
fabpot May 15, 2013
ffccc1a
Merge branch '2.2'
fabpot May 16, 2013
1231d47
Revert "merged branch armetiz/master (PR #8045)"
fabpot May 16, 2013
204e23e
adding missing Farsi translations
empire May 16, 2013
2b3a0b9
merged branch empire/patch-validator-fa (PR #8060)
fabpot May 16, 2013
95f356b
remove check for PHP bug #50731
xabbuh May 11, 2013
c31caca
merged branch xabbuh/issue8007-master (PR #8052)
fabpot May 16, 2013
742cdb3
Update validators.ru.xlf
vitaliytv May 16, 2013
309373f
merged branch vitaliytv/patch-2 (PR #8055)
fabpot May 16, 2013
f3af8c2
Bumped Icu dependency to RC
webmozart May 16, 2013
3c57921
merged branch bschussek/intl-fix (PR #8057)
fabpot May 16, 2013
2952269
[TwigBundle] Added missing files for phpunit
hason May 16, 2013
683bd17
Added missing column to the form's table layout
webmozart May 16, 2013
37d9de9
merged branch bschussek/table-layout-fix (PR #8059)
fabpot May 16, 2013
f3bee77
updated CHANGELOG for 2.3.0-RC1
fabpot May 16, 2013
db719ae
updated VERSION for 2.3.0-RC1
fabpot May 16, 2013
c8b2e11
bumped Symfony version to 2.3.0-DEV-DEV
fabpot May 16, 2013
2d9027d
[CssSelector] Fix :nth-last-child() translation
lazyhammer May 16, 2013
a39db7b
[Intl] Fixed the class namespaces in the @covers annotations.
jakzal May 18, 2013
435012f
[Config] Adding the previous exception message into the FileLoaderLoa…
weaverryan May 18, 2013
b2e52e8
[CssSelector] Moved a test into the Tests folder.
jakzal May 19, 2013
e8bb502
merged branch jakzal/2.3-cssselector-test-location (PR #8090)
fabpot May 19, 2013
d0fed26
merged branch jakzal/bugfix/intl-tests-covers (PR #8082)
fabpot May 19, 2013
f723bda
merged branch lazyhammer/issue-8068 (PR #8072)
fabpot May 19, 2013
f989c84
Merge branch '2.2' into 2.3
fabpot May 19, 2013
aa6a73a
Merge branch '2.2' into 2.3
fabpot May 19, 2013
88b06d0
merged branch weaverryan/resource-loader-show-previous-exception (PR …
fabpot May 19, 2013
70c0424
fix double variable assignment in ContainerDebugCommand
zakharovvi May 17, 2013
71d2883
merged branch zakharovvi/ContainerDebugCommand_fix_double_assignment …
fabpot May 19, 2013
e4b900e
merged branch hason/twig_bundle (PR #8062)
fabpot May 19, 2013
e61ba7d
[Routing] Added Router tests and fixed an exception message.
jakzal May 20, 2013
815cee5
[FrameworkBundle] Added missing files for phpunit
hason May 13, 2013
11497f3
[SecurityBundle] Added missing files for phpunit
hason May 16, 2013
d4f5389
[WebProfilerBundle] Fixed composer.json
hason May 20, 2013
44d7b2b
merged branch hason/web-profiler-bundle (PR #8103)
fabpot May 20, 2013
750ca71
merged branch jakzal/2.3-router-tests (PR #8102)
fabpot May 20, 2013
2398144
merged branch hason/framework (PR #8061)
fabpot May 20, 2013
55f2000
merged branch hason/security_bundle (PR #8064)
fabpot May 20, 2013
79a842a
[Console] Add namespace support back in to list command
xanido May 22, 2013
a8f4501
[Form] [2.3] removed old option
bamarni May 24, 2013
13ba4ea
fix logger in regards to DebugLoggerInterface
Tobion May 14, 2013
8121dbb
merged branch Tobion/monolog-logger (PR #8040)
fabpot May 24, 2013
8a4b91b
[WebProfiler] remove deprecated verbose option
Tobion May 24, 2013
024bd9e
[FrameworkBundle] removed deprecated method from cache:clear command
Tobion May 24, 2013
9d3397d
[Security] Added tests for the AccessMap.
jakzal May 20, 2013
573bf07
[Security] Added tests for the SessionAuthenticationStrategy.
jakzal May 20, 2013
3129bee
[Security] Added tests for the remember me ReponseListener.
jakzal May 20, 2013
12d9b0a
[Security] Added tests for the DefaultAuthenticationFailureHandler.
jakzal May 22, 2013
6394a5b
[ClassLoader] tiny refactoring
Tobion May 24, 2013
30fe940
[Security] Added tests for the DefaultAuthenticationSuccessHandler.
jakzal May 24, 2013
8d5f39f
[Security] Added tests for the DefaultLogoutSuccessHandler.
jakzal May 24, 2013
4b9c276
merged branch jakzal/2.3-security-tests (PR #8136)
fabpot May 25, 2013
9b178db
merged branch Tobion/classloader-refactor (PR #8134)
fabpot May 25, 2013
e30c892
merged branch Tobion/cacheclear-deprecated-method (PR #8132)
fabpot May 25, 2013
3158dad
merged branch Tobion/profiler-verbose (PR #8131)
fabpot May 25, 2013
c29d845
merged branch bamarni/patch-3 (PR #8125)
fabpot May 25, 2013
fb7adaa
merged branch xanido/fix-list-command (PR #8115)
fabpot May 25, 2013
c8e5503
[FrameworkBundle] removed HttpFoundation classes from HttpKernel cache
bamarni May 26, 2013
af2cd98
Added missing slovak translations
pulzarraider May 26, 2013
fd151fd
[Security] Fixed the check if an interface exists.
jakzal May 26, 2013
0251c93
merged branch jakzal/bugfix/interface-check (PR #8143)
fabpot May 27, 2013
4c444db
merged branch pulzarraider/patch-1 (PR #8142)
fabpot May 27, 2013
395ec40
merged branch bamarni/patch-4 (PR #8141)
fabpot May 27, 2013
554ab9f
[Console] renamed ConsoleForExceptionEvent into ConsoleExceptionEvent
Tobion May 27, 2013
458ce6d
Merge branch '2.2' into 2.3
fabpot May 27, 2013
0270136
merged branch Tobion/console-event-name (PR #8147)
fabpot May 27, 2013
176a3d4
[Console] fix typehint for Application::setDispatcher
Tobion May 28, 2013
e93fc7a
[FrameworkBundle] set the dispatcher in the console application
Tobion May 28, 2013
35c6768
slovenian validator translations updated
May 29, 2013
42b0fe4
merged branch peterkokot/translations-2.3 (PR #8160)
fabpot May 29, 2013
0bd9d2c
Removed reference to Symfony\Component\Form\Extension\Core\Type\FormT…
danielec7 May 29, 2013
d14db58
merged branch iJanki/fix_field (PR #8159)
fabpot May 29, 2013
b5c9bb8
merged branch Tobion/console-dispatcher (PR #8158)
fabpot May 30, 2013
3db0360
ErrorHandler and fixes
uuf6429 May 31, 2013
b9dadbb
merged branch uuf6429/master (PR #8170)
fabpot Jun 2, 2013
7fb9c25
Merge branch '2.2' into 2.3
fabpot Jun 2, 2013
6b25213
Merge branch '2.2' into 2.3
fabpot Jun 2, 2013
314f29a
[Security] Removed an unnecessary call to sprintf() and added a test …
jakzal May 26, 2013
307bc91
[Security] Added a test to the BasicAuthenticationListener.
jakzal May 27, 2013
cccd005
[Security] Added tests for the ContextListener.
jakzal May 27, 2013
d6ab77e
[Security] Added tests for the SwitchUserListener.
jakzal Jun 2, 2013
5409852
[Security] Added few new test cases for the HttpUtils and improved re…
jakzal Jun 2, 2013
bf769e0
[Config] Added tests for the ConfigCache.
jakzal Jun 2, 2013
c5dda79
[Config] Fixed @covers annotation which ignored some of the methods f…
jakzal Jun 3, 2013
804b182
[Config] Added tests for the FileResource and DirectoryResource.
jakzal Jun 3, 2013
3825970
updated CHANGELOG for 2.3.0
fabpot Jun 3, 2013
6da9c5d
updated VERSION for 2.3.0
fabpot Jun 3, 2013
8d2cda3
bumped Symfony version to -DEV
fabpot Jun 3, 2013
379f5e0
[DependencyInjection] Fix aliased access of shared services, fixes #8096
Seldaek Jun 4, 2013
bb797ee
[DependencyInjection] Remove get*Alias*Service methods from compiled …
Seldaek Jun 4, 2013
d8c0ef7
[DependencyInjection] Rename ContainerBuilder::$aliases to avoid conf…
Seldaek Jun 4, 2013
9527001
Fixed doc block on Filesystem::rename
lyrixx Jun 3, 2013
47a0a4c
merged branch lyrixx/filesystem-docblock (PR #8181)
fabpot Jun 4, 2013
e1f530e
merged branch jakzal/2.3-more-security-tests (PR #8177)
fabpot Jun 4, 2013
b219e0a
merged branch jakzal/2.3-config-tests (PR #8178)
fabpot Jun 4, 2013
81b122d
[DependencyInjection] Add support for aliases of aliases + regression…
Seldaek Jun 5, 2013
df0a02d
merged branch Seldaek/fix-container-opt (PR #8193)
fabpot Jun 5, 2013
e3561ce
[FrameworkBundle] Fixed OutOfBoundException when session handler_id i…
Jun 7, 2013
b2d2c12
merged branch saem/ticket_8228 (PR #8229)
fabpot Jun 8, 2013
68b3360
Added Greek translation
lancergr Jun 7, 2013
af098eb
merged branch lancergr/greek_validator (PR #8225)
fabpot Jun 8, 2013
b8c13b6
Added missing galician (gl) translations
rubenrua Jun 9, 2013
847951e
merged branch rubenrua/master (PR #8236)
fabpot Jun 10, 2013
2f915f7
Merge branch '2.2' into 2.3
fabpot Jun 11, 2013
a2f6a41
updated CHANGELOG for 2.3.1
fabpot Jun 11, 2013
0902c60
updated VERSION for 2.3.1
fabpot Jun 11, 2013
8d29c64
bumped Symfony version to 2.3.2-DEV-DEV
fabpot Jun 11, 2013
aa79393
also consider alias in Container::has()
lsmith77 Jun 12, 2013
e65723c
fix-progressbar-start
AntonioAngelino Jun 12, 2013
4dc58ad
merged branch AntonioAngelino/2.3 (PR #8258)
fabpot Jun 13, 2013
b5ded81
[Security] fixed usage of the salt for the bcrypt encoder (refs #8210)
fabpot Jun 13, 2013
d849d5d
Merge branch '2.2' into 2.3
fabpot Jun 13, 2013
6d2bec7
merged branch lsmith77/container_check_alias_in_has_method (PR #8252)
fabpot Jun 13, 2013
f554ada
merged branch fabpot/bcrypt-salt (PR #8266)
fabpot Jun 13, 2013
3381f3f
Feature/fix unit tests
Jun 13, 2013
092fae1
merged branch hostnet/feature/fix-unit-tests (PR #8275)
fabpot Jun 14, 2013
ab1439e
[Console] Fixed the table rendering with multi-byte strings.
jakzal Jun 15, 2013
0da84da
merged branch jakzal/bugfix/table-helper-multi-byte (PR #8285)
fabpot Jun 16, 2013
0cb95e0
added a node about HTML extension in readme
jfsimon Jun 16, 2013
46cb3b8
merged branch jfsimon/css-selector-readme-update (PR #8287)
fabpot Jun 17, 2013
caaaec3
[CssSelector] tweaked README file (closes #8287)
fabpot Jun 17, 2013
494e803
[DependencyInjection] Replaced try/catch block with an @expectedExcep…
jakzal Jun 17, 2013
e01c6c2
merged branch jakzal/bugfix/di-tests-segfault (PR #8298)
fabpot Jun 17, 2013
3492186
[Intl] Fixed tests failing on PHP 5.5
jakzal Jun 21, 2013
69ec7c8
Removed PHP 5.5 from the allowed failures.
jakzal Jun 21, 2013
fa42a90
merged branch jakzal/2.3-tests-on-php-5.5 (PR #8324)
fabpot Jun 23, 2013
d7999d7
Merge branch '2.2' into 2.3
fabpot Jun 23, 2013
c60bdf5
removed unused code
fabpot Jun 26, 2013
a2b1535
[Form] Fix of "PATCH'ed forms are never valid"
biozshock Jun 26, 2013
0cc8872
Added missing French validator translations
stof Jun 27, 2013
b76a6fc
merged branch stof/french_translations (PR #8370)
fabpot Jun 27, 2013
e46fd4e
[Console] Avoided an unnecessary check.
jakzal Jun 30, 2013
80826aa
merged branch jakzal/console-interaction-check (PR #8386)
fabpot Jun 30, 2013
af101a5
Merge branch '2.2' into 2.3
fabpot Jul 1, 2013
4c0bfd3
fixed CS
fabpot Jul 1, 2013
ab9e3ee
Update validators.sk.xlf
birko Jul 3, 2013
f03a489
merged branch birko/patch-1 (PR #8411)
fabpot Jul 3, 2013
8bb4e4d
[DI] Fixed bug requesting non existing service from dumped frozen con…
wouterj Jul 7, 2013
eaf9ede
merged branch WouterJ/di_alias_dumper_bug (PR #8435)
fabpot Jul 7, 2013
4d2051c
CookieJar remove unneeded var, Client remove unneeded else
eduardosoliv Jul 7, 2013
92c30b9
merged branch entering/browser-kit-beautify-code (PR #8432)
fabpot Jul 7, 2013
4efac29
merged branch fabpot/removed-unused-code (PR #8440)
fabpot Jul 8, 2013
686bbb6
Merge branch '2.2' into 2.3
fabpot Jul 8, 2013
c2c1568
Merge branch '2.2' into 2.3
fabpot Jul 11, 2013
a3fbf00
Merge branch '2.2' into 2.3
fabpot Jul 17, 2013
1672396
updated CHANGELOG for 2.3.2
fabpot Jul 17, 2013
b82eb2f
updated VERSION for 2.3.2
fabpot Jul 17, 2013
40f7e68
bumped Symfony version to 2.3.3-DEV
fabpot Jul 17, 2013
9ac3556
[DependencyInjection] Add exception for service name not dumpable in PHP
GromNaN Jul 19, 2013
658579a
added greek translation
lancergr Jul 19, 2013
1efb0f0
merged branch lancergr/greek_trans (PR #8522)
fabpot Jul 19, 2013
017c44d
merged branch GromNaN/2.3-di-dump-exception (PR #8524)
fabpot Jul 20, 2013
1837963
Merge branch '2.2' into 2.3
fabpot Jul 20, 2013
4146587
Added missing files .gitignore
hason Jul 16, 2013
9dbffee
merged branch hason/gitignore (PR #8498)
fabpot Jul 21, 2013
9d98c41
merged branch biozshock/patch-form-fix (PR #8362)
fabpot Jul 21, 2013
b45f18b
Merge branch '2.2' into 2.3
fabpot Jul 21, 2013
dc1fff0
The ignoreAttributes itself should be ignored, too.
derrabus Jul 24, 2013
ef987f7
merged branch derrabus/ignore_attributes_in_redirect_controller (PR #…
fabpot Jul 24, 2013
2e2a36c
fixed file permission
fabpot Jul 24, 2013
970ce2c
[DependencyInjection] fixed #8570
bronze1man Jul 25, 2013
48338fc
Ignore null value in comparison validators
EmmanuelVella Jul 25, 2013
50d0727
[DependencyInjection] fixed regression where setting a service to nul…
fabpot Jul 25, 2013
7dc211a
merged branch fabpot/null-services (PR #8582)
fabpot Jul 25, 2013
364ccd1
merged branch bronze1man/PR-setLazy-parent-2.3 (PR #8573)
fabpot Jul 25, 2013
e5fba3c
[Form] fixes empty file-inputs get treated as extra field
Jul 25, 2013
de1915f
merged branch Flask/ticket_8548 (PR #8575)
fabpot Jul 26, 2013
9d53905
Merge branch '2.2' into 2.3
fabpot Jul 27, 2013
1bd45b3
[FrameworkBundle] fixed regression where the command might have the w…
fabpot Jul 29, 2013
bd30a5c
merged branch fabpot/console-fix (PR #8600)
fabpot Jul 29, 2013
dbd14fc
Revert "[Form] Remove "value" attribute on empty_value option"
webmozart Aug 1, 2013
d1e5710
Fixes link indices
Aug 1, 2013
cb5e765
[Form] Fixed: If a form is not present in a request, it is not automa…
webmozart Aug 1, 2013
50f201e
Revert "[Form] Fix of "PATCH'ed forms are never valid""
webmozart Aug 1, 2013
85330a6
[Form] Fixed patched forms to be valid even if children are not submi…
webmozart Aug 1, 2013
cd169b6
merged branch bschussek/revert-7678 (PR #8623)
fabpot Aug 2, 2013
888a2e4
merged branch langj/readme-link-fix (PR #8632)
fabpot Aug 2, 2013
adca1ef
merged branch bschussek/issue8385 (PR #8636)
fabpot Aug 2, 2013
ef69619
merged branch bschussek/issue8111 (PR #8638)
fabpot Aug 2, 2013
e18f3ed
moved some fixed dep versions from 2.2.* to ~2.2 (refs #8613)
fabpot Aug 2, 2013
fcea011
merged branch fabpot/deps-versions (PR #8649)
fabpot Aug 2, 2013
64535bb
Merge branch '2.2' into 2.3
fabpot Aug 2, 2013
00c0237
fixed typo
fabpot Aug 2, 2013
9f3b1e1
[Process] Increased the timeout in a test to prevent random failures …
jakzal Aug 2, 2013
ccb497a
[HttpKernel] Added a missing use statement.
jakzal Aug 2, 2013
4af3477
merged branch jakzal/process-stop-with-timeout-test (PR #8652)
fabpot Aug 3, 2013
fbb78ec
merged branch jakzal/2.3-fragment-handler-fix (PR #8653)
fabpot Aug 3, 2013
4de3a06
Merge branch '2.2' into 2.3
fabpot Aug 6, 2013
3911cfa
Merge branch '2.2' into 2.3
fabpot Aug 6, 2013
8fa0453
[Intl] Updated stubs to reflect ICU 51.2
webmozart Aug 6, 2013
f8ffb80
Merge branch '2.2' into 2.3
fabpot Aug 7, 2013
4369af2
updated CHANGELOG for 2.3.3
fabpot Aug 7, 2013
17aefe6
updated VERSION for 2.3.3
fabpot Aug 7, 2013
6cc1929
bumped Symfony version to 2.3.4-DEV
fabpot Aug 7, 2013
879e271
merged branch bschussek/icu51 (PR #8680)
fabpot Aug 8, 2013
b463a70
Merge branch '2.2' into 2.3
fabpot Aug 8, 2013
98f6969
Fix empty process argument escaping on Windows
helmer Aug 7, 2013
fa2c71a
merged branch helmer/processutils_patch (PR #8691)
fabpot Aug 8, 2013
ffe5567
merged branch EmmanuelVella/validators (PR #8577)
fabpot Aug 8, 2013
e47657d
Make sure ContextErrorException is loaded during compile time errors
shira-374 Aug 7, 2013
0d16f5d
merged branch ShiraNai7/master (PR #8688)
fabpot Aug 8, 2013
6ed0fdf
[Form] Moved auto_initialize option to the BaseType
jakzal Jun 24, 2013
2b2c116
merged branch jakzal/2.3-form-button-fix (PR #8349)
fabpot Aug 9, 2013
7eaaec1
[FrameworkBundle] made code more generic
fabpot Aug 9, 2013
96aec0f
Fix internal sub-request creation
lazyhammer May 1, 2013
615bd0b
merged branch lazyhammer/fix-inline-fragment (PR #7893)
fabpot Aug 11, 2013
572ba68
[TwigBridge] removed superflous ; when rendering form_enctype() (clos…
fabpot Aug 13, 2013
df5a32a
merged branch fabpot/form_enctype-fix (PR #8731)
fabpot Aug 13, 2013
1101801
Merge branch '2.2' into 2.3
fabpot Aug 13, 2013
909fab6
[Process] Fix #8742 : Signal-terminated processes are not successful
romainneutron Aug 13, 2013
16413ff
Merge branch '2.2' into 2.3
fabpot Aug 14, 2013
4af7276
merged branch romainneutron/fix-8742 (PR #8744)
fabpot Aug 14, 2013
fa01e6b
[Process] Fix for #8754 (Timed-out processes are successful)
romainneutron Aug 14, 2013
e6d0e69
merged branch romainneutron/fix-8754 (PR #8756)
fabpot Aug 14, 2013
c342715
[Form] Fixed: Added "validation_groups" option to submit button
webmozart Aug 15, 2013
e2f7d1e
merged branch bschussek/fix-submit (PR #8764)
fabpot Aug 15, 2013
91e5b10
Merge branch '2.2' into 2.3
fabpot Aug 15, 2013
49eb608
Merge branch '2.2' into 2.3
fabpot Aug 17, 2013
4cfbdf1
Merge branch '2.2' into 2.3
fabpot Aug 21, 2013
fd2f633
Include untrusted host in the exception message
Seldaek Aug 21, 2013
cbc30a3
merged branch Seldaek/untrusted (PR #8810)
fabpot Aug 21, 2013
8e1cb3e
Merge branch '2.2' into 2.3
fabpot Aug 22, 2013
5d60a4f
Merge branch 'form-submit-2.2' into form-submit-2.3
webmozart Aug 22, 2013
878e27c
Merge branch 'form-submit-2.2' into form-submit-2.3
webmozart Aug 22, 2013
b9a3770
[Form] Removed call to deprecated method
webmozart Aug 22, 2013
07d14e5
[Form] Removed exception in Button::setData(): setData() is now alway…
webmozart Aug 22, 2013
3cb8a80
[Form] Added a test that ensures that setData() reacts to dynamic mod…
webmozart Aug 22, 2013
7a34d96
Merge branch 'form-submit-2.2' into form-submit-2.3
webmozart Aug 23, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix empty process argument escaping on Windows
  • Loading branch information
helmer authored and fabpot committed Aug 8, 2013
commit 98f6969e9c2ebbb00d81bf9362f072cb200da38a
8 changes: 6 additions & 2 deletions src/Symfony/Component/Process/ProcessUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ public static function escapeArgument($argument)
//@see https://bugs.php.net/bug.php?id=43784
//@see https://bugs.php.net/bug.php?id=49446
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
if ('' === $argument) {
return escapeshellarg($argument);
}

$escapedArgument = '';
foreach (preg_split('/([%"])/i', $argument, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $part) {
if ('"' == $part) {
if ('"' === $part) {
$escapedArgument .= '\\"';
} elseif ('%' == $part) {
} elseif ('%' === $part) {
$escapedArgument .= '^%';
} else {
$escapedArgument .= escapeshellarg($part);
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Process/Tests/ProcessUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ public function dataArguments()
array('"foo bar"', 'foo bar'),
array('^%"path"^%', '%path%'),
array('"<|>"\\"" "\\""\'f"', '<|>" "\'f'),
array('""', ''),
);
}

return array(
array("'foo bar'", 'foo bar'),
array("'%path%'", '%path%'),
array("'<|>\" \"'\\''f'", '<|>" "\'f'),
array("''", ''),
);
}
}