This PR was merged into the master branch.
Commits
-------
7fe44da Whitespace corrections
6d30f20 Switched to using a method to get original class name that did not require string parsing
3c8d607 Changed test to use a longer form, complete check of the contents of the trace
de77c88 Whitespace correction
03a7bb9 Added a unit test to verify incomplete classes do not cause flatten exception to throw
e562418 Added a bit to convert incomplete objects in the error message
Discussion
----------
[HttpKernel] Added a bit to convert incomplete objects in the error message
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes*
\* no - errors in MongoDbSessionHandlerTest attempting to access private property, however running just src/Symfony/Component/HttpKernel does pass.
Objects of class __PHP_Incomplete_Class are only sometimes an object.
```
$object = unserialize('O:14:"BogusTestClass":0:{}');
$object instanceof __PHP_Incomplete_Class; // true
is_object($object); // false
gettype($object); // "object"
```
Since it is "not an object", the flatter attempts to turn it into a string, it triggers:
```
__PHP_Incomplete_Class could not be converted to string.
```
Which then hides the root error message.
---------------------------------------------------------------------------
by pborreli at 2012-09-18T16:16:33Z
have you seen that http://stackoverflow.com/questions/965611/forcing-access-to-php-incomplete-class-object-properties looks like you can still access the object even if it's a __PHP_Incomplete_Class with foreach
---------------------------------------------------------------------------
by rrehbeindoi at 2012-09-18T16:38:38Z
Thank you for the tip re: foreach.
* 2.1:
Added Base64 encoding, decoding to MongoDBProfilerStorage
Fix duplicated code and a field name
refactor src/Symfony/Component/Translation/Loader/MoFileLoader.php
fixed typo
Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
fixed issue #5596 (Broken DOM with the profiler's toolbar set in position top)
[Form] Fixed the testsuite for PHPUnit 3.6 as travis still uses it
added dirs generated by build-data.php in locale component to .gitignore
[Process] Fixed bug introduced by 7bafc69f38.
[Process][Tests] Prove process fail (Add more test case)
[Process][Tests] Prove process fail
[HttpFoundation] Fixed the tests
[DomCrawler] Added test for supported encodings by mbstring
[Config] Fixed preserving keys in associative arrays
[Console] Fixed return value for Command::run
[Locale] Fixed tests
[Console] Fix some input tests
[Filesystem] Fixed tests on Windows
[Config] Fixed tests on Windows
This PR was merged into the 2.1 branch.
Commits
-------
c120c4d Added Base64 encoding, decoding to MongoDBProfilerStorage
Discussion
----------
[HttpKernel] Added UTF8 encoding, decoding to MongoDBProfilerStorage
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
It didn't take long for us to hit a non-utf8 error using the new `MongoDBProfilerStorage`. I'm pretty sure the culprit was the Switfmailer DataCollector serializing a message with a PDF attachment.
I thought this would be a good failsafe, although one could ask whether mail message attachments should be serialized at all...
---------------------------------------------------------------------------
by krmcbride at 2012-09-28T17:28:02Z
Switched encoding/decoding to base64
This PR was merged into the 2.1 branch.
Commits
-------
d7623ae [DomCrawler] Added test for supported encodings by mbstring
Discussion
----------
[2.1][DomCrawler] Added test for supported encodings by mbstring
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
---------------------------------------------------------------------------
by fabpot at 2012-09-25T09:35:18Z
As this is a bug fix, it should be done on the 2.0 branch. Thanks.
---------------------------------------------------------------------------
by stof at 2012-09-25T09:41:59Z
@fabpot 2.0 does not contain the code trying to convert the encoding.
This PR was merged into the master branch.
Commits
-------
45bf523 Optimize autoload prefix in composer.json
Discussion
----------
Optimize autoload prefix in composer.json
By having more specific autoload prefixes it is possible to reduce the
number of stat calls made. Also it prevents conflicts with similar
namespaces.
See ref: e58c6cdbf5
SessionHandlerInterface is left intentionally.
---------------------------------------------------------------------------
by sstok at 2012-09-28T08:41:25Z
@Seldaek Is this true? And if so shouldn't this be optimized in Composer it self?
---------------------------------------------------------------------------
by stof at 2012-09-28T08:48:05Z
@sstok I cannot be optimized in Composer itself. It already optimize things by putting most specific prefixes first.
Composer matches a prefix. The most specific the prefix is, the better (as it is less likely to match other classes).
For components, it is quite useless as we don't have component with a name being a prefix for the name of another one.
For the main package, it can indeed optimize things if someone was using ``Symfony_`` in an old-way package. This is not likely as there is no reason to have some new Symfony code using the PHP 5.2 naming and symfony1 was not using PSR-0. but it is indeed a working solution.
This was occuring in Zend Framework as using ``Zend`` for the namespace prefix of ZF2 would match when loading ``Zend_Registry`` (and this was causing issues when using ZF1 and ZF2 together as the PSR-0 path for ``Zend_Registry`` or ``Zend\Registry`` would be the same, thus loading the wrong file)
---------------------------------------------------------------------------
by Slamdunk at 2012-09-28T09:04:17Z
I know the main reason occurred in ZF doesn't happen in Symfony, but I see only benefits for taking it even so.
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes#5602).
Commits
-------
a7d8a74 [Console] Fix duplicated code and a field name
Discussion
----------
[Console] Fix duplicated code and a field name
* Renamed a field name in CommandTesterTest
* Deleted duplicated code in testRenderException
---------------------------------------------------------------------------
by fabpot at 2012-09-27T12:16:40Z
Can you submit this PR on the 2.1 branch as this is where it should be fixed? Thanks.
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes#5623).
Commits
-------
4a17053 refactor src/Symfony/Component/Translation/Loader/MoFileLoader.php
Discussion
----------
Refactor extract
proposed patch for what looked falsly as usage of undefined variables (#5620)
---------------------------------------------------------------------------
by stof at 2012-09-27T18:05:22Z
could you squash your commits ?
---------------------------------------------------------------------------
by pborreli at 2012-09-27T18:12:56Z
check http://symfony.com/doc/current/contributing/code/patches.html#step-3-submit-your-patch
---------------------------------------------------------------------------
by h4ck3rm1k3 at 2012-09-27T18:18:53Z
Wow, that is nice, thanks for taking the time to teach me these tricks.
This PR was submitted on branch master but was merged on branch 2.0 instead (closes#5624).
Commits
-------
05eaebf hasColorSupport does not take an argument
Discussion
----------
hasColorSupport does not take an argument
removed the uneeded argument. trivial patch.
Commits
-------
27b2df9 [Process] Fixed bug introduced by 7bafc69f38.
7a955c0 [Process][Tests] Prove process fail (Add more test case)
598dcf3 [Process][Tests] Prove process fail
Discussion
----------
[Process][Tests] Prove process fail with chained commands
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no
Fixes the following tickets: -
Todo: Fix that
License of the code: MIT
This PR is against 2.1 branch. Previous PR was #5575
This PR try to hiligh a regression in Process component.
``` php
$process = new Process("echo -n 1 && echo -n 1");
// or $process = new Process("echo -n 1 ; echo -n 1");
$process->run();
var_dump('11' == $process->getOutput()); // false,
var_dump($process->getOutput()); // '1',
```
This test failed because of PR #5543 ; see 7bafc69f38 (L0R233)
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T13:05:45Z
You've to revert the change that causes the fail (ie: remove https://github.com/symfony/symfony/blob/2.1/src/Symfony/Component/Process/Process.php#L233)
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T13:06:56Z
BTW, removing this line re-open #5030
---------------------------------------------------------------------------
by stof at 2012-09-25T13:11:15Z
@lyrixx please add a commit reverting the addition of ``exec`` in the case of sigchild not being used (only this addition, not the full commit you linked) as it should fix your test.
---------------------------------------------------------------------------
by stof at 2012-09-25T13:12:21Z
@fabpot btw, this regression is quite important. As I said in the previous PR, it impacts composer in a bunch of places.
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T13:30:07Z
You reverted too much things, you just had to remove line 233
---------------------------------------------------------------------------
by stof at 2012-09-25T13:42:49Z
@lyrixx I explicitly asked you to revert only the ``exec`` addition for the case without sigchild.
---------------------------------------------------------------------------
by lyrixx at 2012-09-25T13:55:57Z
@stof Sorry, i fixed that.
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T13:56:26Z
@lyrixx just remove the two last commit, edit Process.php and remove line 233
---------------------------------------------------------------------------
by lyrixx at 2012-09-25T13:59:59Z
@romainneutron I think it's ok now.
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T14:11:28Z
yep it's good :)
Commits
-------
2dcb2d7 [Filesystem] Fixed tests on Windows
Discussion
----------
[2.1][Filesystem] Fixed tests on Windows
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
fc1e844 [Locale] Fixed tests
Discussion
----------
[2.1][Locale] Fixed tests
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
65281fb [Config] Fixed tests on Windows
Discussion
----------
[2.1][Config] Fixed tests on Windows
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
b961ee3 [HttpFoundation] Fixed the tests
Discussion
----------
[HttpFoundation] Fixed the tests
b8a2f8c646 reverted the use of the username
and password in the getSchemeAndHost method but forgot to revert the
corresponding tests.
Commits
-------
8ab3054 added dirs generated by build-data.php in locale component to .gitignore
Discussion
----------
added dirs generated by build-data.php in locale component to .gitignore
This is to complete the PR #5411.
Paging @eriksencosta.
---------------------------------------------------------------------------
by eriksencosta at 2012-09-25T14:54:06Z
For me it's ok!
Batman?
---------------------------------------------------------------------------
by shieldo at 2012-09-25T14:55:38Z
Kapow! Thanks for checking it over!
---------------------------------------------------------------------------
by shieldo at 2012-09-25T15:41:05Z
As @stof pointed out, git does read .gitignore files in sub-paths. So I've modified the commit so the change is in the Locale component only.
Commits
-------
530bd22 fixed issue #5596 (Broken DOM with the profiler's toolbar set in position top)
Discussion
----------
fixed issue #5596 (Broken DOM with the profiler's toolbar set in position top)
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5596
Todo: -
License of the code: MIT
Documentation PR: -
Whatever the toolbar position, the html code associated to it may be placed at the end of the page (and this will be better from a webperf point of view).
---------------------------------------------------------------------------
by stof at 2012-09-25T17:47:53Z
The spacer div will not be in the right place when using ``position: top`` as it will be at the end of the body.
---------------------------------------------------------------------------
by pborreli at 2012-09-25T17:53:03Z
@stof what is the spacer div ? i guess all the profiler is in absolute so i guess it should work (and I'm sure @xavierlacot already tested it :))
---------------------------------------------------------------------------
by pborreli at 2012-09-25T17:55:55Z
@xavierlacot so maybe we should refactor
```
$pos = $posrFunction($content, '</body>');
$content = $substrFunction($content, 0, $pos).$toolbar.$substrFunction($content, $pos);
```
with something like
```
$content = str_replace('</body>', $toolbar.'</body>', $content);
```
What do you think ?
---------------------------------------------------------------------------
by stof at 2012-09-25T17:58:35Z
@pborreli The toolbar is in position fixed. But to avoid hiding some of the content of your page, another div is added on with a margin, to force keeping some space after the content for the toolbar. With this change, the toolbar HTML is always at the end, so the 40px space is always added at the bottom of the page even if the toolbar is added at the top.
---------------------------------------------------------------------------
by pborreli at 2012-09-25T18:03:08Z
@stof maybe we should just fix the body/html margin-top in that case no ? or find a better solution, anyway I think the actual way to do it is bad, `<body>` and `</body>` are not even mandatory in html5, IMHO i would just put it at the end of file without any check, then fix it with some css and/or js
---------------------------------------------------------------------------
by stof at 2012-09-25T18:06:58Z
@pborreli Putting it at the end after the closing ``<html>`` tag would make the page invalid for people defining the markup fully. It is a bad idea.
And anyway, detecting the body tag is still important, to avoid injecting the toolbar in partial page content (be it ESI requests or parts loaded through AJAX).
Oh, and ``$content = str_replace('</body>', $toolbar.'</body>', $content);`` would not fix#5596 but make it worse: it would also inject the toolbar in the head even when being placed at the bottom (keeping it at the bottom too).
---------------------------------------------------------------------------
by pborreli at 2012-09-25T18:18:46Z
@stof for detecting ajax you already have `if ($request->isXmlHttpRequest()) {` called few lines before,
the proposal for `$content = str_replace('</body>', $toolbar.'</body>', $content);` was only a refactoring for the above PR
---------------------------------------------------------------------------
by stof at 2012-09-25T18:26:34Z
@pborreli ESI requests are not AJAX requests. So simply appending at the end would still break them.
And your code is *not* a refactoring. Your ``str_replace`` will replace **all** occurences of ``</body>``, not just the last one. See the related issue to understand why it makes a difference
---------------------------------------------------------------------------
by pborreli at 2012-09-25T18:38:11Z
ok I'm all wrong.
---------------------------------------------------------------------------
by xavierlacot at 2012-09-25T18:51:42Z
@stof, please review the last commit, which injects the wdt container at the top of the page in javascript, using the browser's DOM capacities. This fixes the spacer problem that you noticed.
---------------------------------------------------------------------------
by stof at 2012-09-25T18:55:51Z
Well, you are now breaking things when the spacer should be at the bottom as you are always putting the spacer at the top.
---------------------------------------------------------------------------
by stloyd at 2012-09-25T19:06:14Z
@xavierlacot Pass `position` variable to template and change:
```diff
- document.body.insertBefore(sfwdt, document.body.firstChild);
+ {% if position == 'bottom' -%}
+ document.body.appendChild(sfwdt);
+ {%- else -%}
+ document.body.insertBefore(sfwdt, document.body.firstChild);
+ {%- endif %}
---------------------------------------------------------------------------
by stof at 2012-09-25T20:18:31Z
@xavierlacot could you squash your commits ?
---------------------------------------------------------------------------
by xavierlacot at 2012-09-25T21:32:47Z
@stof done. Thanks for the review :-)
Commits
-------
ef288a2 [Form] Fixed the testsuite for PHPUnit 3.6 as travis still uses it
Discussion
----------
[Form] Fixed the testsuite for PHPUnit 3.6
Travis is still using it so this avoids making all build fail just because of it.
Commits
-------
c869a65 [Console] Fixed return value for Command::run
Discussion
----------
[2.1][Console] Fixed return value for Command::run
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
API says that Command::run returns integer. This is also necessary if I want to run nested commands.
Commits
-------
cc46780 [Console] Fix some input tests
Discussion
----------
[Console] Fix some input tests
New PR for console input tests, was previously on the master branch : https://github.com/symfony/symfony/pull/5567
* 2.1:
fixed stringification of array objects in RequestDataCollector (closes#5295)
[HttpFoundation] removed the username and password from generated URL as generated by the Request class (closes#5555)
[Console] fixed default argument display (closes#5563)
Fixing config normalisation example in docblock
* 2.0:
fixed stringification of array objects in RequestDataCollector (closes#5295)
Fixing config normalisation example in docblock
Conflicts:
src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php
src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php