Commit Graph

11690 Commits

Author SHA1 Message Date
Fabien Potencier
84c6b486d1 merged branch stof/debug_class_loader (PR #6803)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6803).

Commits
-------

be05741 Added an error message in the DebugClassLoader when using / instead of \.

Discussion
----------

Added an error message in the DebugClassLoader when using / instead of \.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | n/a

Using ``/`` instead of ``\`` when writing class names in a configuration seems to happen regularly. See aba8f1e180 (commitcomment-2461266) for the latest case I saw. I guess it may come from the fact that SensioGeneratorBundle allows using both for convenience in the CLI to get rid of escaping issues.
This will give people a better error message when they use a ``/`` instead of having them figure that the class name in the message using ``/`` and not ``\`` and this is the reason of the issue.
2013-01-19 08:47:26 +01:00
Christophe Coevoet
11aaa2e672 Added an error message in the DebugClassLoader when using / instead of \. 2013-01-19 08:47:26 +01:00
Fabien Potencier
9223c5acfd merged branch vicb/php5.3.16 (PR #6795)
This PR was merged into the 2.1 branch.

Commits
-------

5aa83ad KNOWN_ISSUES with php 5.3.16

Discussion
----------

KNOWN_ISSUES with php 5.3.16

see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php#L137

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

by vicb at 2013-01-18T12:33:57Z

SymfonyRequirements is already updated with this
2013-01-18 17:11:07 +01:00
Victor
5aa83ad1eb KNOWN_ISSUES with php 5.3.16 2013-01-18 13:28:05 +01:00
Fabien Potencier
9155a2382e bumped Symfony version to 2.1.8-DEV 2013-01-18 00:11:33 +01:00
Fabien Potencier
f53784913b Merge branch '2.0' into 2.1
* 2.0:
  [Yaml] fixed unneeded BC break
  [DependencyInjection] fixed a bug in the YAML dumper where references where not converted to the @ notation
  [Yaml] fixed typo
  updated VERSION for 2.0.22
  update CONTRIBUTORS for 2.0.22
  updated CHANGELOG for 2.0.22

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2013-01-17 22:21:51 +01:00
Fabien Potencier
0138c2d0b3 [Yaml] fixed unneeded BC break 2013-01-17 22:16:19 +01:00
Fabien Potencier
972e1b7a16 [DependencyInjection] fixed a bug in the YAML dumper where references where not converted to the @ notation 2013-01-17 22:13:26 +01:00
Fabien Potencier
51d1948327 [Yaml] fixed typo 2013-01-17 17:53:40 +01:00
Fabien Potencier
3444290cd6 updated VERSION for 2.1.7 2013-01-17 17:21:47 +01:00
Fabien Potencier
28add1210e updated CHANGELOG for 2.1.7 2013-01-17 17:21:31 +01:00
Fabien Potencier
08ccc62aa5 updated VERSION for 2.0.22 2013-01-17 16:40:40 +01:00
Fabien Potencier
e1d415ae0f update CONTRIBUTORS for 2.0.22 2013-01-17 16:40:10 +01:00
Fabien Potencier
6645d303cc updated CHANGELOG for 2.0.22 2013-01-17 16:39:41 +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