This PR was merged into the 2.0 branch.
Commits
-------
f8812b2 [Form] Fixed "label" option to accept the value "0"
Discussion
----------
[Form] Fixed "label" option to accept the value "0"
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6862
| License | MIT
| Doc PR | -
@fabpot: This commit will cause troubles when merging 2.0 into 2.1 and up. Tell me if you need help upon conflict resolution.
This PR was merged into the 2.0 branch.
Commits
-------
179cd58 [Process] Fix regression introduced in #6620 / 880da01c49, fixes#7082
Discussion
----------
[Process][2.0] getcwd failure fix
Fix regression introduced in #6620Fixes#7082
For reference, here is the current behavior I saw:
PHP 5.4.11, windows:
```
5.4.11\php.exe -r "chdir('c:\\'); var_dump(getcwd()); $p = proc_open('pwd', [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']], $pipes, null); var_dump(stream_get_contents($pipes[1]));"
string(3) "C:\\"
string(14) "/c/Users/seld\n"
```
(I use pwd which is a unix util so it dumps a funny path, but don't look at that)
PHP 5.5alpha4, windows (seems fixed):
```
5.5.0a4\php.exe -r "chdir('c:\\'); var_dump(getcwd()); $p = proc_open('pwd', [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']], $pipes, null); var_dump(stream_get_contents($pipes[1]));"
string(3) "C:\"
string(3) "/c\n"
```
PHP 5.3.10, ubuntu:
```
php -r "chdir('/'); var_dump(getcwd()); \$p = proc_open('pwd', array(array('pipe', 'r'), array('p
ipe', 'w'), array('pipe', 'w')), \$pipes, null); var_dump(stream_get_contents(\$pipes[1]));"
string(1) "/"
string(2) "/\n"
```
Since the permission issue that #6620 originally was fixing is most likely not gonna happen on windows, this seems like a safe enough compromise. Ideally a check for PHP<5.5 should be introduced, but I would like to be sure it's been fixed and is not just a lucky coincidence (/cc @PierreJoye)
I would recommend merging fast and maybe adding the version check later, since it breaks composer create-project on windows. The workaround being: cd in the dir and run `composer install` again to finalize the project setup.
---------------------------------------------------------------------------
by vicb at 2013-02-17T20:12:17Z
Thanks @Seldaek !
Would you mind creating an issue for the version check so that it doesn't get lost ?
---------------------------------------------------------------------------
by Seldaek at 2013-02-18T10:43:56Z
@vicb done.
---------------------------------------------------------------------------
by vicb at 2013-02-18T11:45:16Z
thanks !
This PR was merged into the 2.0 branch.
Commits
-------
4ce9ac3 [EventDispatcher] Added assertion.
Discussion
----------
[EventDispatcher] Added assertion
re #7023, I think it actually makes sense to add an assertion here. It reveals the intent of the test (listener is not removed).
---------------------------------------------------------------------------
by vicb at 2013-02-10T11:32:06Z
I don't think the assertion would fail with the former code, would it ?
---------------------------------------------------------------------------
by vicb at 2013-02-10T11:34:30Z
I mean an error would be generated even before the assertion.
---------------------------------------------------------------------------
by jakzal at 2013-02-10T11:37:05Z
Yes, it would fail before getting to the assertion with: *Object of class Closure could not be converted to int*.
However, this is something good to test for (and document - test is a documentation). We're not checking if type is taken into account in other tests. This test might still fail if code inside removeListener() changed.
---------------------------------------------------------------------------
by vicb at 2013-02-10T11:42:29Z
I don't really understand your point and think it is a bit useless here but I am not against your change - I don't argue that test is doc though.
---------------------------------------------------------------------------
by jakzal at 2013-02-10T15:38:09Z
Assertion is indeed useless for the bug you discovered and fixed. I think it's still worth to have it there for other reason:
* test readability and completeness - with an assertion it's more clear that we don't expect the listener to be removed with the `removeListener()` call if passed argument doesn't match the one added before
If you still don't see my point just close this PR :)
---------------------------------------------------------------------------
by vicb at 2013-02-10T17:34:35Z
What I mean is that you are unit testing php and it is not a job for sf. So it is not strictly required but as it doesn't hurt, let's merge your change.
Jakub Zalas <notifications@github.com> wrote:
>Assertion is indeed useless for the bug you discovered and fixed. I
>think it's still worth to have it there for other reason:
>* test readability and completeness - with an assertion it's more clear
>that we don't expect the listener to be removed with the
>`removeListener()` call if passed argument doesn't match the one added
>before
>
>If you still don't see my point just close this PR :)
>
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/symfony/symfony/pull/7038#issuecomment-13351469
This PR was squashed before being merged into the 2.0 branch (closes#7023).
Commits
-------
87f3db7 [EventDispathcer] Fix removeListener
Discussion
----------
[EventDispathcer] Fix removeListener
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Todo
- [x] Add a UT
I won't have time to add a test before next Friday but this PR could save some debugging (especially with Silex & Closures)
---------------------------------------------------------------------------
by vicb at 2013-02-09T23:32:51Z
Probably related to https://bugs.php.net/bug.php?id=62976, I need to do some more investigation - I use 546. anyway the fix is valid for whatever php version.
---------------------------------------------------------------------------
by vicb at 2013-02-10T10:24:46Z
This **is** related to the PHP bug mentioned above, see http://3v4l.org/Q6WKj:
```
Output for 5.3.18 - 5.3.21, 5.4.8 - 5.5.0alpha4
bool(false)
Output for 5.3.0 - 5.3.17, 5.4.0 - 5.4.7
Notice: Object of class Klass could not be converted to int in /in/Q6WKj on line 9
Notice: Object of class Closure could not be converted to int in /in/Q6WKj on line 9
int(0)
```
@fabpot anything more needed to merge this ?
---------------------------------------------------------------------------
by fabpot at 2013-02-10T10:26:52Z
Is it possible to add a test?
---------------------------------------------------------------------------
by vicb at 2013-02-10T10:29:34Z
It is, for php versions < fixed version, I'll do that
---------------------------------------------------------------------------
by vicb at 2013-02-10T10:42:01Z
@fabpot ready Sir !
---------------------------------------------------------------------------
by vicb at 2013-02-10T10:44:35Z
well I can probably add an assert, please wait !
This PR was merged into the 2.0 branch.
Commits
-------
bd0ad92 [DependencyInjection] Allow frozen containers to be dumped to graphviz
Discussion
----------
[DependencyInjection] Allow frozen containers to be dumped to graphviz
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR replaces #7010.
This PR was merged into the 2.0 branch.
Commits
-------
a12744e Add dot character `.` to legal mime subtype regular expression
Discussion
----------
[HttpFoundation][2.0] Add dot character `.` to legal mime subtype regular expression
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
For example, the following mimetype (used for Microsoft powerpoints) is not recognized given the current regexp : `application/vnd.ms-powerpoint; charset=binary`
This PR was merged into the 2.0 branch.
Commits
-------
ddf4678 [HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes#6923, closes#6936)
Discussion
----------
[HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes#6923, closes#6936)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6923, #6936
| License | MIT
| Doc PR | n/a
This fixes the creation of a sub-request when the master request Request URI
is determined with specific server information.
This PR was submitted for the 2.2 branch but it was merged into the 2.0 branch instead (closes#6959).
Commits
-------
ad889c9 [DependencyInjection] fixed a circular call (closes#6864)
Discussion
----------
[DependencyInjection] fixed a circular call (closes#6864)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6864
| License | MIT
| Doc PR | n/a
This PR was merged into the 2.0 branch.
Commits
-------
4119caf [DependencyInjection] fixed the creation of synthetic services in ContainerBuilder
Discussion
----------
[DependencyInjection] fixed the creation of synthetic services in ContainerBuilder
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
---------------------------------------------------------------------------
by stof at 2013-01-22T00:14:29Z
👍
This PR was squashed before being merged into the 2.0 branch (closes#6818).
Commits
-------
598ae9d [Security] PHPDoc in SecurityEvents
Discussion
----------
[Security] PHPDoc in SecurityEvents
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I'm not sure about the description given.
This PR was merged into the 2.0 branch.
Commits
-------
53ccc2c [Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes#6786)
Discussion
----------
[Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes#6786)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6786
| License | MIT
| Doc PR | n/a
This PR was merged into the 2.0 branch.
Commits
-------
ce38069 [FrameworkBundle] fixed Client::doRequest that must call its parent method (closes#6737)
Discussion
----------
[FrameworkBundle] fixed Client::doRequest that must call its parent method (closes#6737)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6737
| License | MIT
| Doc PR | n/A
This PR was merged into the 2.0 branch.
Commits
-------
fea20b7 [Yaml] fixed#6770
Discussion
----------
[Yaml] fixed parsing of negative integers (2.0 branch)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6770
| License | MIT
| Doc PR | n/a
Note that an unrelated test fixture for large integers had to be changed to work on systems with 64-bit integer support because of the change from `assertEquals()` to `assertSame()`. Please see the diff for clarification.
This PR was merged into the 2.0 branch.
Commits
-------
ab0385c [Yaml] fixed#6773
Discussion
----------
[Yaml] fixed parsing of blocks with 'keep' chomping indicators (2.0 branch)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6773
| License | MIT
| Doc PR | n/a
Also added a full set of tests for all combinations of literal/folded blocks and strip/clip/keep chomping indicators in both mid-file and end-of file positions.
YAML does not specify an absolute indentation level, but a consistent indentation of nested nodes only: http://www.yaml.org/spec/1.2/spec.html#space/indentation/
Projects that are generally using 2 spaces for indentation should be able to retain consistency with their coding standards by supplying a custom value for the new $indent parameter added to Yaml::dump(), or the new Dumper::setIndentation() method.
The new parameter is a backwards-compatible API addition and defaults to the previous default of 4 (which was changed from 2 via PR #2242 only recently).
Conflicts:
src/Symfony/Component/Yaml/Dumper.php
src/Symfony/Component/Yaml/Yaml.php
By default, object support is disabled, and instead of throwing an
exception when an object is handled, null is returned.
If you do need object support, enable it via:
Yaml::dump($data, false, true);
If you want an exception to be thrown in case an invalid type is handled
(a PHP resource or a PHP object), pass true as the second argument:
Yaml::dump($data, true, true);
The same can be done when parsing:
Yaml::parse($data, 2, false, true);
PHP support when parsing a file has been disabled by default.
If you do need PHP support when parsing a YAML file, enable it via:
Yaml::setPhpParsing(true);
As of Symfony 2.1, PHP support is disabled by default, and support will
be removed in Symfony 2.3.
This PR was merged into the 2.0 branch.
Commits
-------
c7bfce9 Fix version_compare() calls for PHP 5.5.
Discussion
----------
[2.0] [Form] [Locale] PHP 5.5 compatibility fixes
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: unknown, can't run the test suite on 2.0 due to `Doctrine\DBAL\Logging\DebugStack` not being found
Fixes the following tickets: N/A
Todo: None
License of the code: MIT
Documentation PR: N/A
A backport of #6647 to the Symfony 2.0 branch, as requested. This affects a couple of files that aren't affected on 2.1.