Commit Graph

11249 Commits

Author SHA1 Message Date
Fabien Potencier
be00e3204f merged branch h4ck3rm1k3/hasColorSupportFix (PR #5624)
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.
2012-09-28 16:21:46 +02:00
James Michael DuPont
ad95364b21 hasColorSupport does not take an argument 2012-09-28 16:21:46 +02:00
Fabien Potencier
5fff62644f merged branch lyrixx/process (PR #5592)
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 :)
2012-09-28 15:15:00 +02:00
Fabien Potencier
f62fa8a79e fixed typo 2012-09-27 14:45:27 +02:00
Fabien Potencier
f3fedac503 merged branch hason/config (PR #5589)
Commits
-------

c812b9d [Config] Fixed preserving keys in associative arrays

Discussion
----------

[2.1][Config] Fixed preserving keys in associative arrays

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
2012-09-27 14:29:01 +02:00
Fabien Potencier
bc59f6a4ff merged branch hason/filesystem_tests (PR #5574)
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
2012-09-27 14:26:13 +02:00
Fabien Potencier
4addb2dd04 merged branch hason/locale_tests (PR #5584)
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
2012-09-27 14:25:23 +02:00
Fabien Potencier
ef6ee6b638 merged branch hason/config_tests (PR #5583)
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
2012-09-27 14:23:27 +02:00
Fabien Potencier
93637fbd8d merged branch stof/fix_tests (PR #5591)
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.
2012-09-27 14:20:55 +02:00
Fabien Potencier
15e61435fe merged branch shieldo/ignore_generated_icu_files (PR #5595)
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.
2012-09-27 14:20:04 +02:00
Fabien Potencier
7306ef67e1 merged branch xavierlacot/ticket_5596 (PR #5597)
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 :-)
2012-09-27 14:18:54 +02:00
Fabien Potencier
96225654f7 merged branch stof/phpunit_3_6 (PR #5598)
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.
2012-09-27 14:17:03 +02:00
Rafał
335aa862de Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
polish translation patch
I think translator should choose first translation if other (seccond/third form) does not exist.
2012-09-27 14:14:35 +02:00
Xavier Lacot
530bd225d2 fixed issue #5596 (Broken DOM with the profiler's toolbar set in position top) 2012-09-25 23:28:50 +02:00
Christophe Coevoet
ef288a2613 [Form] Fixed the testsuite for PHPUnit 3.6 as travis still uses it 2012-09-25 20:53:31 +02:00
Douglas Greenshields
8ab30543da added dirs generated by build-data.php in locale component to .gitignore 2012-09-25 16:28:32 +01:00
Grégoire Pineau
27b2df9db6 [Process] Fixed bug introduced by 7bafc69f38. 2012-09-25 15:48:53 +02:00
Grégoire Pineau
7a955c0e4b [Process][Tests] Prove process fail (Add more test case) 2012-09-25 14:47:45 +02:00
Grégoire Pineau
598dcf3c57 [Process][Tests] Prove process fail 2012-09-25 14:47:33 +02:00
Christophe Coevoet
b961ee3a62 [HttpFoundation] Fixed the tests
b8a2f8c646 reverted the use of the username
and password in the getSchemeAndHost method but forgot to revert the
corresponding tests.
2012-09-25 14:32:56 +02:00
Martin Hasoň
d7623ae2af [DomCrawler] Added test for supported encodings by mbstring 2012-09-25 11:03:23 +02:00
Martin Hasoň
c812b9dddc [Config] Fixed preserving keys in associative arrays 2012-09-24 23:36:53 +02:00
Fabien Potencier
21d16e60fa merged branch hason/command (PR #5585)
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.
2012-09-24 14:11:50 +02:00
Martin Hasoň
c869a657d5 [Console] Fixed return value for Command::run 2012-09-24 10:41:20 +02:00
Martin Hasoň
fc1e844bed [Locale] Fixed tests 2012-09-24 10:11:13 +02:00
Fabien Potencier
7273311e1f merged branch Nanocom/console_fix_input_tests (PR #5579)
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
2012-09-23 17:31:41 +02:00
Arnaud Kleinpeter
cc46780a48 [Console] Fix some input tests 2012-09-23 16:17:15 +02:00
Martin Hasoň
2dcb2d7d82 [Filesystem] Fixed tests on Windows 2012-09-21 14:34:09 +02:00
Martin Hasoň
65281fb56c [Config] Fixed tests on Windows 2012-09-21 14:13:08 +02:00
Fabien Potencier
91699d8fd7 merged branch adrienbrault/patch-3 (PR #5572)
Commits
-------

34ca3de Improve FilterResponseEvent docblocks Response ref

Discussion
----------

Improve FilterResponseEvent docblocks Response ref

The type hinting wasn't working in PHPStorm.
2012-09-21 10:49:18 +02:00
Adrien Brault
34ca3de4f2 Improve FilterResponseEvent docblocks Response ref
The type hinting wasn't working in PHPStorm.
2012-09-21 11:33:41 +03:00
Fabien Potencier
237629ad64 Merge branch '2.0' into 2.1
* 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
2012-09-21 08:34:46 +02:00
Fabien Potencier
2ceebdcaba fixed stringification of array objects in RequestDataCollector (closes #5295) 2012-09-21 08:32:55 +02:00
Fabien Potencier
b8a2f8c646 [HttpFoundation] removed the username and password from generated URL as generated by the Request class (closes #5555)
Quoted from the ticket it solves for future reference:

"I've been having issues with using htdigest auth (requirement for me to
work with) after upgrading to 2.1. Each time a resource is loaded, a
prompt is given for the HTTP Auth username and password, and Chrome does
not automatically respond to these 401 responses with the credentials it
already has. I've traced the issue to being caused by the HttpFoundation
Component, specifically Request.php.

The request class adds the PHP_AUTH_USER/PHP_AUTH_PW parameters to the
request URI (changes http://www.mysite.com requests to
http://user:pw@www.mysite.com) in getSchemeAndHttpHost(). This behaviour
is not specified in the HTTP RFC, and is incompatible with Chrome as of
Chrome 19, IE (as of IE 9) and has special behaviour in Firefox (prompts
the user to confirm they know they're logging into the site, which is an
ambiguous behaviour at best, but at least it's something if they're
going to support it for now).

This functionality was added about to HttpFoundation about a year ago,
but it really should be removed and standard protocol practices should
be followed. This practice makes it possible for cross-site tracking and
other malicious behaviours to be performed by hiding information in the
authorization headers, which explains why most browsers no longer
support or take exception with it.

The offending line is specifically this. Replacing it with return
$this->getScheme().'://'.$this->getHttpHost(); seems to solve the
problem."
2012-09-21 08:13:47 +02:00
Fabien Potencier
c4429af6fb [Console] fixed default argument display (closes #5563) 2012-09-21 08:05:08 +02:00
Fabien Potencier
9fd2baa502 merged branch bamarni/patch-6 (PR #5548)
Commits
-------

589a8b3 composer is available in travis workers

Discussion
----------

composer is available in travis workers

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

by bamarni at 2012-09-19T09:07:30Z

reverted

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

by stof at 2012-09-19T09:59:21Z

btw, in the 2.1 branch, the ``COMPOSER_ROOT_VERSION`` varaible should be set to ``2.1.x-dev``

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

by bamarni at 2012-09-19T14:44:48Z

@stof: ok, btw I don't understand the issue, deps are solvable without this, is it a workaround to make this package known as 2.1 even though it's not guessable with the branch name (eg. when using a feature branch for a PR)? I thought this was handled by the branch-alias.

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

by stof at 2012-09-19T15:54:05Z

@bamarni It is solvable in some cases but not in all of them. Sometimes, when being in a detached head (which is the case when Travis builds PRs), the guessing of the composer root version does not work, and so symfony dev deps depending on some symfony components (Doctrine) will fail because the guessed version would not match ``2.*`` (which is the Doctrine requirement for the components).

branch aliases have nothing to do with the guessing of the version for the root package.

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

by stof at 2012-09-19T15:55:25Z

btw, the only cases where COMPOSER_ROOT_VERSION could be needed is when some of your dependencies have a requirement on your root package. Otherwise, the root version is never needed by composer to resolve deps

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

by bamarni at 2012-09-19T16:52:52Z

@stof: in detached head indeed the version can't be guessed with git, so this change avoid potential issues with reciprocal dependencies (I guess it can also be solved by specifying a "version" in composer.json).

But I still don't get why you say branch aliases have nothing to do with the root package version, isn't the purpose of a "2.1-dev" branch-alias to be matched when specifying this package as a dependency with 2.1.*, no matter the branch name or if git is in detached head?

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

by stof at 2012-09-19T18:59:13Z

@bamarni a **branch** alias is about the aliasing the version of a branch. Look at how it is written. It tells composer that for Symfony, the ``dev-master`` version (so the master branch) should receive an alias ``2.2.x-dev``.
This alias will never help you if your root version cannot be guessed as being ``dev-master``.

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

by bamarni at 2012-09-19T20:43:19Z

ahh... in my mind branch alias was only an alias for the current branch, I forgot that it was a 'branch => alias' map, indeed in that case it can't help at all.

thx for the explanations ;)
2012-09-20 10:39:30 +02:00
Fabien Potencier
8b7c00ca64 merged branch krmcbride/flash-phpdoc (PR #5557)
Commits
-------

bb0e4c3 Fixed FlashBagInterface phpdoc, clarified UPGRADE docs

Discussion
----------

Fixed FlashBagInterface phpdoc, clarified upgrade doc

The fact that multiple flash messages are now stored/retrieved per type was an additional BC break that I missed when I first went through the 2.1 update doc, and it didn't help that the phpdoc was outdated.

These changes just clarify things a little.

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

by drak at 2012-09-20T07:45:52Z

+1
2012-09-20 10:35:57 +02:00
Fabien Potencier
5db89bd9b8 bumped Symfony version to 2.1.3-DEV 2012-09-20 10:29:15 +02:00
Fabien Potencier
80ff285ae2 updated VERSION for 2.1.2 2012-09-20 09:13:00 +02:00
Fabien Potencier
756f9a408b updated CHANGELOG for 2.1.2 2012-09-20 09:12:35 +02:00
Kevin McBride
bb0e4c3090 Fixed FlashBagInterface phpdoc, clarified UPGRADE docs 2012-09-19 13:48:54 -07:00
Bilal Amarni
589a8b38d4 composer is available in travis workers 2012-09-19 16:29:32 +02:00
Fabien Potencier
f1e6063c0a [Form] removed comment now that PHPUnit 3.7 is out 2012-09-19 08:13:43 +02:00
Fabien Potencier
8cb1ff3f5d merged branch romainneutron/FixProcessStop (PR #5543)
Commits
-------

7bafc69 Add a Sigchild compatibility mode (set to false by default)

Discussion
----------

[2.1][Process] Fix stop in non-sigchild environments

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

Fix #5030 in half way.

 - `proc_terminate` now sends the `SIGTERM` to the real process, not the sh (add the exec prefix to remove the wrapper as suggested by @schmittjoh). So now, process will stop, except if you're working with a PHP compiled with `--enable-sigchild`
 - Add a Sigchild compatibility mode (activated only if PHP has been compiled with it)

This mode is required to use a hack to determine if the process finished with success when PHP has been compiled with the --enable-sigchild option

#5030 will be totally fixed in 2.2 with #5476 as it would allow to send a `SIGKILL` after timeout

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

by stof at 2012-09-18T21:19:50Z

This will also fix the error reported in Behat/MinkZombieDriver#10
The stop method was broken because of the sigchild workaround introduced in the latest 2.1-RC times
2012-09-19 05:50:06 +02:00
Fabien Potencier
5bfecef595 merged branch richardmiller/fixing_config_docblock (PR #5542)
Commits
-------

1402b42 Fixing config normalisation example in docblock

Discussion
----------

Fixing config normalisation example in docblock

Against 2.0 this time

as per @stof's comments in symfony/symfony-docs#1721

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: -
Fixes the following tickets: -
Todo: -
License of the code: MIT
2012-09-19 05:44:42 +02:00
Romain Neutron
7bafc69f38 Add a Sigchild compatibility mode (set to false by default)
This mode is required to use a hack to determine if the process finished with success when PHP has been compiled with the --enable-sigchild option
2012-09-19 00:37:29 +02:00
Richard Miller
1402b42228 Fixing config normalisation example in docblock 2012-09-18 21:29:16 +01:00
Fabien Potencier
5a4a73ef94 merged branch havvg/2.1 (PR #5540)
Commits
-------

8dd19d8 fix Fatal error: Cannot access private property

Discussion
----------

fix Fatal error: Cannot access private property

The testsuite fails with fatal error with message:

```plain
PHP Fatal error: Cannot access private property Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MongoDbSessionHandlerTest::$options
in src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php on line 85
```

on this system:

```plain
PHP 5.3.13 with Suhosin-Patch (cli) (built: Jun 20 2012 17:05:20)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans
```

```plain
PHPUnit 3.6.11 by Sebastian Bergmann
```
2012-09-18 18:44:48 +02:00
Toni Uebernickel
8dd19d8d89 fix Fatal error: Cannot access private property
PHP Fatal error: Cannot access private property Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MongoDbSessionHandlerTest::$options
in src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php on line 85
2012-09-18 18:09:52 +02:00
Fabien Potencier
ff1b990075 merged 2.0 2012-09-17 22:41:57 +02:00