Commit Graph

11677 Commits

Author SHA1 Message Date
Fabien Potencier
28add1210e updated CHANGELOG for 2.1.7 2013-01-17 17:21:31 +01:00
Fabien Potencier
a25fad847b Merge branch '2.0' into 2.1
* 2.0:
  [Yaml] fixed default value
  Added Yaml\Dumper::setIndentation() method to allow a custom indentation level of nested nodes.
  added a way to enable/disable object support when parsing/dumping
  added a way to enable/disable PHP support when parsing a YAML input via Yaml::parse()
  [Console] fixed input bug when the value of an option is empty (closes #6649, closes #6689)

Conflicts:
	src/Symfony/Component/Yaml/Dumper.php
	src/Symfony/Component/Yaml/Parser.php
	src/Symfony/Component/Yaml/Tests/DumperTest.php
	src/Symfony/Component/Yaml/Tests/ParserTest.php
	src/Symfony/Component/Yaml/Yaml.php
2013-01-17 16:20:05 +01:00
Fabien Potencier
e17e2327b1 [Yaml] fixed default value 2013-01-17 16:16:00 +01:00
sun
3c87e2ea18 Added Yaml\Dumper::setIndentation() method to allow a custom indentation level of nested nodes.
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
2013-01-17 16:12:58 +01:00
Fabien Potencier
ba6e3159c0 added a way to enable/disable object support when parsing/dumping
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);
2013-01-17 16:07:25 +01:00
Fabien Potencier
ac756bf39e added a way to enable/disable PHP support when parsing a YAML input via Yaml::parse()
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.
2013-01-17 16:07:24 +01:00
Fabien Potencier
2dfe9660a2 fixed CS 2013-01-16 10:27:54 +01:00
Fabien Potencier
4c366252a5 merged branch stloyd/bugfix/process_phpdocs (PR #6626)
This PR was merged into the 2.1 branch.

Commits
-------

a62e04f [Process] Fix docblocks, remove `return` from `PhpProcess#start()` as parent returns nothing, cleaned up `ExecutableFinder`

Discussion
----------

[2.1][Process] Fix docblocks, remove `return` from `PhpProcess#start()`
2013-01-16 10:23:50 +01:00
Fabien Potencier
da0b0426ef merged branch schmittjoh/exFix (PR #6716)
This PR was merged into the 2.1 branch.

Commits
-------

785d365 fixes a bug when output/error output contains a % character

Discussion
----------

fixes a bug when output/error output contains a % character
2013-01-12 21:28:26 +01:00
Joseph Bielawski
a62e04f8d1 [Process] Fix docblocks, remove return from PhpProcess#start() as parent returns nothing, cleaned up ExecutableFinder 2013-01-12 13:49:05 +01:00
Johannes M. Schmitt
785d3655dd fixes a bug when output/error output contains a % character 2013-01-12 11:09:29 +01:00
Fabien Potencier
dc2cc6b13c [Console] fixed input bug when the value of an option is empty (closes #6649, closes #6689) 2013-01-11 14:49:52 +01:00
Fabien Potencier
92f951fd7a merged branch LawnGnome/PHP-5.5-compat (PR #6647)
This PR was merged into the 2.1 branch.

Commits
-------

4991607 Fix version_compare() calls for PHP 5.5.
34def9f Handle the deprecation of IntlDateFormatter::setTimeZoneId() in PHP 5.5.

Discussion
----------

[Form] [Locale] PHP 5.5 compatibility fixes

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: N/A
Todo: None
License of the code: MIT
Documentation PR: N/A

IntlDateFormatter::setTimeZoneId() is deprecated in PHP 5.5, which results in E_DEPRECATED errors when using the date form type. This PR works around that.

Furthermore, the version_compare() tests used in locale to detect PHP 5.5 are broken with snapshot and Git builds of PHP. I've also committed a fix for those tests in this PR.

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

by stof at 2013-01-10T08:24:15Z

shouldn't it even be done in 2.0 as it is a bugfix ?

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

by LawnGnome at 2013-01-11T00:49:11Z

Possibly — I don't know enough about Symfony's release management to know whether this is appropriate for 2.0, and I was mostly scratching my own itch, honestly.

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

by stof at 2013-01-11T01:51:35Z

well, it is a bugfix and 2.0 is also impacted, so it should be done in it.

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

by LawnGnome at 2013-01-11T02:52:21Z

The diff for 2.0 looks like it'll be just the StubIntlDateFormatter.php changes — the deprecated method isn't called in DateType on that branch, and there aren't any StubIntlDateFormatter tests on 2.0. How do you want that submitted — as a separate PR against 2.0?

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

by fabpot at 2013-01-11T07:20:18Z

@LawnGnome A separate pull request would be good. Thanks.

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

by LawnGnome at 2013-01-11T08:29:48Z

2.0 PR added as #6699.
2013-01-11 14:37:17 +01:00
Fabien Potencier
e463a63906 Merge branch '2.0' into 2.1
* 2.0:
  Fix version_compare() calls for PHP 5.5.
  [Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)

Conflicts:
	src/Symfony/Component/Form/Extension/Core/ChoiceList/MonthChoiceList.php
2013-01-11 14:37:04 +01:00
Fabien Potencier
b4c6972025 merged branch LawnGnome/PHP-5.5-compat-2.0 (PR #6699)
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.
2013-01-11 14:35:59 +01:00
Fabien Potencier
9b92e8ecd3 merged branch stephpy/redis_profiler_sort (PR #6703)
This PR was merged into the 2.1 branch.

Commits
-------

9257b03 [Profiler] [Redis] Fix sort of profiler rows.

Discussion
----------

[Profiler] [Redis] Fix sort of redis storage profiler rows.

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

Redis profiler rows are not sorted as expected.

We have in redis:

```
- 2011-01-01 ...
- 2011-01-02 ...
- 2011-01-03 ...
```

If we limit to 2, we'll have:

```
- 2011-01-02 ...
- 2011-01-01 ...
```

Fixed this bug by reversing array.
2013-01-11 12:37:16 +01:00
Stéphane PY
9257b0371c [Profiler] [Redis] Fix sort of profiler rows. 2013-01-11 11:35:43 +01:00
Adam Harvey
c7bfce9116 Fix version_compare() calls for PHP 5.5.
Until PHP 5.5 hits beta, the version number for Git builds is still 5.5.0-dev,
which is less than 5.5.0alpha1 according to version_compare(). This means that
the branches for 5.5 aren't being executed on 5.5 snapshots at present.
2013-01-11 16:02:30 +08:00
Fabien Potencier
3095765bb1 merged branch jakzal/no-underscored-methods-in-tests-2.1 (PR #6695)
This PR was merged into the 2.1 branch.

Commits
-------

8024262 Removed underscores from test method names to be consistent with other components.

Discussion
----------

Removed underscores from test method names to be consistent with other components

This is just a cosmetic change. It is more common (in Symfony) to use fully camel-cased names for test methods. Only some of the test methods contain underscores. To avoid confusion it is better to be consistent.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
2013-01-11 07:55:32 +01:00
Jakub Zalas
802426272f Removed underscores from test method names to be consistent with other components.
It is more common to use fully camel-cased names for test methods. Only some of the test methods are called with underscore notation. To avoid confusion it is better to be consistent.
2013-01-11 00:31:43 +00:00
Fabien Potencier
f9ed2bc3c7 merged branch stloyd/bugfix/process_cwd (PR #6620)
This PR was merged into the 2.0 branch.

Commits
-------

880da01 [Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)

Discussion
----------

[2.0][Process] In edge cases `getcwd()` can return `false`

Bug fix: yes
Feature addition: no
BC break: no
Symfony2 tests pass: yes

In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process).

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

by stloyd at 2013-01-08T12:43:40Z

I guess that this could be related to #6496, as error code `267` at Windows means:
[`ERROR_DIRECTORY - The directory name is invalid.`](http://msdn.microsoft.com/en-us/library/ms681382%28v=vs.85%29.aspx#error_directory)

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

by Seldaek at 2013-01-08T12:57:38Z

If null already uses the current working directory, what's the point of calling getcwd() at all?

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

by stloyd at 2013-01-08T13:03:06Z

@Seldaek TBH. I don't have idea =) It seems that it's there _from the beginning_, but yeah, I was a bit confused by usage of it too...

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

by fabpot at 2013-01-09T08:13:24Z

What about removing the code altogether?

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

by stloyd at 2013-01-09T08:22:55Z

@fabpot I'm ok with that, just not sure it will not be an BC break...

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

by Seldaek at 2013-01-09T08:24:57Z

php.net says `or NULL if you want to use the default value (the working
dir of the current PHP process)` which sounds like getcwd() to me.

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

by Seldaek at 2013-01-09T08:26:32Z

For full BC though, `getWorkingDirectory` should `return $this->cwd ?:
getcwd();` Then at least if that call fails the whole process isn't
failing. I don't see why anyone would use that getter though.

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

by stloyd at 2013-01-10T12:43:59Z

@fabpot @Seldaek What do you think about this now?

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

by Seldaek at 2013-01-10T12:58:39Z

👍
2013-01-10 14:32:53 +01:00
Joseph Bielawski
880da01c49 [Process] In edge cases getcwd() can return false, then proc_open() should get null to use default value (the working dir of the current PHP process) 2013-01-10 12:59:53 +01:00
Adam Harvey
4991607f00 Fix version_compare() calls for PHP 5.5.
Until PHP 5.5 hits beta, the version number for Git builds is still 5.5.0-dev,
which is less than 5.5.0alpha1 according to version_compare(). This means that
the branches for 5.5 aren't being executed on 5.5 snapshots at present.
2013-01-10 12:41:59 +08:00
Adam Harvey
34def9f94f Handle the deprecation of IntlDateFormatter::setTimeZoneId() in PHP 5.5.
Optionally use the new IntlDateFormatter::setTimeZone() method if it exists.
2013-01-10 12:41:51 +08:00
Fabien Potencier
b33d5bc352 removed the .gitattributes files (closes #6605, reverts #5674) 2013-01-09 09:51:07 +01:00
Fabien Potencier
d0dc59c7b2 merged branch igorw/exception-listener-comment (PR #6611)
This PR was squashed before being merged into the 2.1 branch (closes #6611).

Commits
-------

bde5a7f [HttpKernel] Clarify misleading comment in ExceptionListener

Discussion
----------

[HttpKernel] Clarify misleading comment in ExceptionListener

Regression from 295860dfaf.

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

by fabpot at 2013-01-08T09:02:53Z

The comment is right. Returning without a Response will re-throw the exception (in HttpKernel).

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

by staabm at 2013-01-08T11:00:36Z

so the comment should point out, that the httpkernel will rethrow the exception in that case?

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

by igorw at 2013-01-08T13:38:43Z

I missed that on the commit I linked. I've updated the patch to re-introduce the comment but clarify that `throw` is in HttpKernel.
2013-01-09 09:17:23 +01:00
Igor Wiedler
bde5a7f51a [HttpKernel] Clarify misleading comment in ExceptionListener 2013-01-09 09:17:22 +01:00
Fabien Potencier
8321127cda Merge branch '2.0' into 2.1
* 2.0:
  [Bundle] [FrameworkBundle] fixed indentation in esi.xml services file.
  [TwigBundle] There is no CSS visibility of display, should be visible instead
  [DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)
  [HttpFoundation] Check if required shell functions for `FileBinaryMimeTypeGuesser` are not disabled
  [CssSelector] added css selector with empty string
  [HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia
  [DependencyInjection] refactored code to avoid logic duplication

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml
	src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
	src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php
2013-01-08 19:16:44 +01:00
Fabien Potencier
1949ce0ed7 merged branch hhamon/cs_fix (PR #6621)
This PR was merged into the 2.1 branch.

Commits
-------

2155719 [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class.

Discussion
----------

[2.1] [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
License of the code: MIT
2013-01-08 17:57:17 +01:00
Fabien Potencier
835c1b8615 merged branch hhamon/indentation_fix_esi_services_file (PR #6622)
This PR was merged into the 2.0 branch.

Commits
-------

113271c [Bundle] [FrameworkBundle] fixed indentation in esi.xml services file.

Discussion
----------

[2.x] [Bundle] [FrameworkBundle] fixed indentation in esi.xml services file.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
License of the code: MIT
2013-01-08 17:57:06 +01:00
Fabien Potencier
f24e32c486 merged branch Seldaek/stylefix (PR #6623)
This PR was merged into the 2.1 branch.

Commits
-------

eb93e66 [Console] Fix style escaping parsing
8ca1b80 [Console] Make style formatter matching less greedy to avoid having to escape when not needed

Discussion
----------

[Console] Fix output formatting issues

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
2013-01-08 17:56:37 +01:00
Jordi Boggiano
eb93e66aa7 [Console] Fix style escaping parsing 2013-01-08 17:21:26 +01:00
Jordi Boggiano
8ca1b805ce [Console] Make style formatter matching less greedy to avoid having to escape when not needed 2013-01-08 17:05:32 +01:00
Hugo Hamon
113271c2df [Bundle] [FrameworkBundle] fixed indentation in esi.xml services file. 2013-01-08 16:05:00 +01:00
Hugo Hamon
2155719398 [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class. 2013-01-08 15:45:08 +01:00
Fabien Potencier
87160a7051 merged branch bschussek/issue6610 (PR #6617)
This PR was merged into the 2.1 branch.

Commits
-------

55aa012 [Form] Fixed EntityChoiceList when loading objects with negative integer IDs

Discussion
----------

[Form] Fixed EntityChoiceList when loading objects with negative integer IDs

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6610
Todo: -
License of the code: MIT
Documentation PR: -

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

by stof at 2013-01-08T10:21:57Z

wouldn't you need to do the opposite replacement when loading the result ? And shouldn't it be done in the propel bridge too ?

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

by bschussek at 2013-01-08T10:25:29Z

@stof No, indices aren't used for loading the result, just values. Yes this should be done for the propel bridge, but that bridge is missing even the tests for the ID-as-identifier usage. Do you want to create a PR?
2013-01-08 13:06:20 +01:00
Bernhard Schussek
55aa0120cf [Form] Fixed EntityChoiceList when loading objects with negative integer IDs 2013-01-08 11:08:32 +01:00
Fabien Potencier
05448056d6 merged branch igorw/visibility-display (PR #6612)
This PR was merged into the 2.0 branch.

Commits
-------

8da2b41 [TwigBundle] There is no CSS visibility of display, should be visible instead

Discussion
----------

[TwigBundle] There is no CSS visibility of display, should be visible instead
2013-01-08 09:57:07 +01:00
Fabien Potencier
850cda1e7b merged branch shieldo/patch-9 (PR #6609)
This PR was merged into the 2.1 branch.

Commits
-------

ae3d454 [Form] corrected source node for a Danish translation

Discussion
----------

[Form] corrected source node for a Danish translation
2013-01-08 09:55:29 +01:00
Igor Wiedler
8da2b412b4 [TwigBundle] There is no CSS visibility of display, should be visible instead 2013-01-08 02:14:26 +01:00
Douglas Greenshields
ae3d4541a9 [Form] corrected source node for a Danish translation 2013-01-07 22:34:59 +00:00
Fabien Potencier
a538c42df1 merged branch fabpot/strict-flag-bug (PR #6608)
This PR was merged into the 2.0 branch.

Commits
-------

1d362b8 [DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)

Discussion
----------

[DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)
2013-01-07 22:47:08 +01:00
Fabien Potencier
1d362b8849 [DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607) 2013-01-07 22:36:09 +01:00
Fabien Potencier
37c495207b merged branch stloyd/bugfix/mimeguesser_functions (PR #6601)
This PR was merged into the 2.0 branch.

Commits
-------

3195122 [HttpFoundation] Check if required shell functions for `FileBinaryMimeTypeGuesser` are not disabled

Discussion
----------

[HttpFoundation] Check if required shell functions are not disabled

Rebased to `2.0` & squashed version of #6526.
2013-01-07 17:01:04 +01:00
Fabien Potencier
cd04bd7a12 merged branch drak/flashcount (PR #6423)
This PR was merged into the 2.1 branch.

Commits
-------

8513777 [HttpFoundation] Update docblock for non-working method

Discussion
----------

[HttpFoundation] Update docblock for non-working method

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Rerences the following tickets: #6408
Todo: -
License of the code: MIT
Documentation PR: -

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

by piotrpasich at 2012-12-19T21:32:24Z

I think that we shouldn't comment it as not working but add new methods called countFlashes and countFlashesTypes. CountFlashesTypes should return count($this->flashBag) and countFlashes should count all items in every array inside flashbag.

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

by drak at 2012-12-20T17:43:38Z

ping @fabpot
2013-01-07 16:55:04 +01:00
Fabien Potencier
87a85b6696 merged branch bschussek/issue6558 (PR #6578)
This PR was merged into the 2.1 branch.

Commits
-------

33e9d00 [Form] Deleted references in FormBuilder::getFormConfig() to improve performance

Discussion
----------

[Form] Deleted references in FormBuilder::getFormConfig() to improve performance

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6558
Todo: -
License of the code: MIT
Documentation PR: -

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

by vicb at 2013-01-07T11:09:24Z

> Backwards compatibility break: no

Really ?

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

by vicb at 2013-01-07T12:27:37Z

Adding a public method is a BC break.

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

by bschussek at 2013-01-07T12:42:14Z

The method is inherited from the parent class, so the change should not affect BC.

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

by vicb at 2013-01-07T13:27:21Z

my bad.
2013-01-07 16:44:13 +01:00
srsbiz
3195122905 [HttpFoundation] Check if required shell functions for FileBinaryMimeTypeGuesser are not disabled 2013-01-07 14:18:29 +01:00
Fabien Potencier
886f721dc0 merged branch stloyd/feature/request_phpdoc (PR #6599)
This PR was merged into the 2.0 branch.

Commits
-------

666283c [HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia

Discussion
----------

[2.0][HttpFoundation] Docblock for Request::isXmlHttpRequest()

Docblock now points to [Wikipedia entry](http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript) instead of pointing all known JS frameworks.

Replacement for #6444.
2013-01-07 12:13:42 +01:00
Fabien Potencier
5ec6b2a050 merged branch kosssi/bugfix/css-selector-empty (PR #6271)
This PR was squashed before being merged into the 2.0 branch (closes #6271).

Commits
-------

dbafc2c [CssSelector] added css selector with empty string

Discussion
----------

[CssSelector] added css selector with empty string

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

by kosssi at 2012-12-14T18:29:40Z

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

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

by stloyd at 2013-01-07T08:21:56Z

@fabpot ping

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

by fabpot at 2013-01-07T10:28:54Z

Sorry, but I don't understand the use case.

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

by kosssi at 2013-01-07T10:36:31Z

if you have this code :
    \<img src="..." alt="">

you can find
    $this->assertCount(1, $crawler->filter('img[alt=""]'));

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

by fabpot at 2013-01-07T10:40:12Z

Then, can you change the unit test with the real use case?

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

by kosssi at 2013-01-07T11:05:50Z

I don't know if it suits you

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

by fabpot at 2013-01-07T11:07:11Z

thanks
2013-01-07 12:07:21 +01:00
Simon Constans
dbafc2c365 [CssSelector] added css selector with empty string 2013-01-07 12:07:20 +01:00