Commit Graph

11464 Commits

Author SHA1 Message Date
Fabien Potencier
3d6ca62744 Merge branch '2.0' into 2.1
* 2.0:
  [Form] Excluded some tests in NumberToLocalizedStringTransformerTest which fail on ICU 4.4, but work on ICU 4.8
2012-11-08 18:38:21 +01:00
Fabien Potencier
da33e7afd3 merged branch bschussek/issue2059 (PR #5945)
This PR was merged into the 2.0 branch.

Commits
-------

8fb334f [Form] Excluded some tests in NumberToLocalizedStringTransformerTest which fail on ICU 4.4, but work on ICU 4.8

Discussion
----------

[Form] Excluded some tests in NumberToLocalizedStringTransformerTest which fail on ICU 4.4, but work on ICU 4.8

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
2012-11-08 18:37:33 +01:00
Bernhard Schussek
8fb334f7fc [Form] Excluded some tests in NumberToLocalizedStringTransformerTest which fail on ICU 4.4, but work on ICU 4.8 2012-11-08 18:34:46 +01:00
Fabien Potencier
9c38e768d9 added missing tests from previous merge 2012-11-08 18:03:02 +01:00
Fabien Potencier
e425f6cf9a Merge branch '2.0' into 2.1
* 2.0:
  [Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  Show correct class name InputArgument in error message
  shows correct class name InputOption in error message
  The exception message should say which field is not mapped
  [HttpFoundation] Fix name sanitization after perfoming move
  Add check to Store::unlock to ensure file exists

Conflicts:
	src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
	src/Symfony/Component/HttpFoundation/File/UploadedFile.php
	tests/Symfony/Tests/Component/Console/Input/InputArgumentTest.php
	tests/Symfony/Tests/Component/Console/Input/InputOptionTest.php
	tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
	tests/Symfony/Tests/Component/HttpFoundation/File/FileTest.php
	tests/Symfony/Tests/Component/HttpKernel/HttpCache/StoreTest.php
2012-11-08 18:02:05 +01:00
Fabien Potencier
9122260df9 merged branch bschussek/issue2059 (PR #5941)
This PR was merged into the 2.0 branch.

Commits
-------

dc80385 [Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible

Discussion
----------

[Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot

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

The behaviour after this is as follows:

* if "grouping" (thousands separators) is disabled (the default)
  * you may use comma and dot as decimal separator in all locales
* if "grouping" is enabled
  * you may use a comma as decimal separator in all locales where the thousands separator is not a comma (e.g. "de", "fr", but not "en")
  * you may use a dot as decimal separator in all locales where the thousands separator is not a dot (e.g. "en", "fr", but not "de")

If the form is displayed again, all numbers are displayed in your locale, regardless of which decimal separator you used for input.

**Example 1 (locale "fr"):**

* you enter: "1234.56"
* after submission:
  * without grouping: "1234,56"
  * with grouping: "1 234,56"

**Example 2 (locale "en"):**

* you enter "1234,56"
* after submission:
  * without grouping: "1234.56"
  * with grouping: error (because "," is the thousands separator; "1234,560" would have been accepted)
2012-11-08 17:45:21 +01:00
Bernhard Schussek
dc80385070 [Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible 2012-11-08 15:53:08 +01:00
Włodzimierz Gajda
646a714ded Fix export-ignore on Windows 2012-11-08 10:51:48 +01:00
Fabien Potencier
03f1ccc956 merged branch Herzult/fix/route_defaults_array (PR #5924)
This PR was merged into the 2.1 branch.

Commits
-------

208e134 [FrameworkBundle] Router skip defaults resolution for arrays

Discussion
----------

[FrameworkBundle] Router skip defaults resolution for arrays

The router should not resolve complex defaults/options parameters but it is not the case for arrays. So this small PR simply adds a check for arrays to prevent array-to-string fatal errors with deep array defaults.

```
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
```
2012-11-07 07:47:25 +01:00
Antoine Hérault
208e134945 [FrameworkBundle] Router skip defaults resolution for arrays 2012-11-06 16:30:03 +01:00
Fabien Potencier
5c57bbb435 merged branch pgodel/2.0 (PR #5914)
This PR was merged into the 2.0 branch.

Commits
-------

9aec4c8 Show correct class name InputArgument in error message

Discussion
----------

[Console] Show correct class name InputArgument in error message

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
2012-11-05 21:19:14 +01:00
Pablo Godel
9aec4c8d04 Show correct class name InputArgument in error message 2012-11-05 14:52:03 -05:00
Fabien Potencier
3d99374014 removed unused use statements 2012-11-04 09:29:19 +01:00
Fabien Potencier
e1c031f166 merged branch pgodel/bugfix/InputOption (PR #5905)
This PR was merged into the 2.0 branch.

Commits
-------

762649f shows correct class name InputOption in error message

Discussion
----------

[Console] shows correct class name InputOption in error message

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

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

by pborreli at 2012-11-04T03:59:58Z

👍
2012-11-04 09:26:55 +01:00
Pablo Godel
762649f5c3 shows correct class name InputOption in error message 2012-11-03 23:51:02 -04:00
Fabien Potencier
313e4e5fd6 merged branch lyrixx/fix-request-get (PR #5894)
This PR was merged into the 2.1 branch.

Commits
-------

b9f6cac [2.1][HttpFoundation] Fixed Php doc in Request::get

Discussion
----------

[2.1][HttpFoundation] Fixed Php doc in Request::get

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

According to php code, `Request::get` method does not seek in cookies.

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

by pborreli at 2012-11-02T11:02:26Z

your PR is full of reSquest typo :)

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

by lyrixx at 2012-11-02T11:25:31Z

@pborreli Fixed
2012-11-02 19:00:55 +01:00
Fabien Potencier
c589982df6 merged branch bschussek/datetimeimpr (PR #5896)
This PR was merged into the 2.1 branch.

Commits
-------

a0af8bf [Form] Adapted HTML5 format in DateTimeType as response to a closed ICU ticket

Discussion
----------

[Form] Adapted HTML5 format in DateTimeType as response to a closed ICU ticket

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
2012-11-02 18:59:59 +01:00
Bernhard Schussek
a0af8bfb5b [Form] Adapted HTML5 format in DateTimeType as response to a closed ICU ticket 2012-11-02 14:54:19 +01:00
Grégoire Pineau
b9f6cac033 [2.1][HttpFoundation] Fixed Php doc in Request::get 2012-11-02 12:13:22 +01:00
Fabien Potencier
297e00afb4 bumped Symfony version to 2.1.4-DEV 2012-10-30 10:44:33 +01:00
Fabien Potencier
fd36aa0605 updated VERSION for 2.1.3 2012-10-30 09:14:14 +01:00
Fabien Potencier
787114bb4c update CONTRIBUTORS for 2.1.3 2012-10-30 09:13:54 +01:00
Fabien Potencier
359e3d0eae updated CHANGELOG for 2.1.3 2012-10-30 09:13:22 +01:00
Fabien Potencier
c4c5d3c02d merged branch jakzal/yamlDoubleQuotesDumperFix (PR #4320)
Commits
-------

b631073 [Yaml] Fixed double quotes escaping in Dumper.

Discussion
----------

[Yaml] Fixed double quotes escaping in Dumper

Issue #4308 is caused by Dumper::escapeWithDoubleQuotes() which uses [str_replace()](http://php.net/str_replace).

From the php docs:

> Because str_replace() replaces left to right, it might replace a previously inserted value when doing multiple replacements.

We should be very careful in deciding about the order of elements in $escapees array. I'd really appreciate if someone reviewed my fix. Tests say I didn't break anything but I'm not sure what percentage of Yaml specification is covered by tests.

Bug fix: yes
Feature addition: no
Backwards compatibility break: not that I know
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/jakzal/symfony.png?branch=yamlDoubleQuotesDumperFix)](http://travis-ci.org/jakzal/symfony)
Fixes the following tickets: #4308

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

by travisbot at 2012-05-18T08:53:51Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1364279) (merged 5192722c into a04acc89).

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

by travisbot at 2012-05-18T23:19:49Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1371539) (merged ecaa1aab into fc3c609b).

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

by dinamic at 2012-05-19T07:35:21Z

Something is really wrong with this method. You can see clearly that multiple characters would fail proper escaping.

Here's an example:
```
$value = '\\\\"some value\n \"some quoted string\" and \'some single quotes one\'"';
var_dump(Escaper::escapeWithDoubleQuotes($value));
string(72) ""\\\"some value\n \\some quoted string\\ and 'some single quotes one'\"""
```

To begin with the backslash - in the initial value you have 2 (escaped ones), that after escaping should result in 4, not in 1 (escaped). I guess this behavior has to be verified with the importer, but imho it does not seem right.

Does anyone know why this escaping wasn't done using a regular expression in first place?

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

by clemens-tolboom at 2012-05-19T10:18:58Z

Searching for https://duckduckgo.com/?q=what+is+\xc2\x85 the table on http://stackoverflow.com/questions/6609895/efficiently-replace-bad-characters is interesting enough to decide we need way more documentation on this file.

\xc2\x85 seems to be triple dot (ellipses)
\xe2\x80\xa9 seems to be paragraph separator see http://drupal.org/node/914360#comment-3468550

Conflicts:
	src/Symfony/Component/Yaml/Escaper.php
2012-10-29 12:15:41 +01:00
Fabien Potencier
a09319df75 merged branch mvrhov/patch-2 (PR #5857)
This PR was merged into the 2.0 branch.

Commits
-------

6b42c8c The exception message should say which field is not mapped

Discussion
----------

The exception message should tell which field is not mapped
2012-10-29 09:25:35 +01:00
Miha Vrhovnik
6b42c8cc04 The exception message should say which field is not mapped 2012-10-28 23:16:09 +01:00
Fabien Potencier
a2a60c194b merged branch helios-ag/patch (PR #5496)
This PR was squashed before being merged into the 2.0 branch (closes #5496).

Commits
-------

9872d26 [HttpFoundation] Fix name sanitization after perfoming move

Discussion
----------

[HttpFoundation] Fix name sanitization after perfoming move

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2577
License of the code: MIT

Further work on #2577, fixes name sanitization, after moving file name with new name with non latin characters in the beginning.

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

by stloyd at 2012-09-12T09:52:05Z

You must revert chmod changes.

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

by helios-ag at 2012-09-12T14:30:36Z

@stloyd fixed

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

by stof at 2012-10-13T21:12:43Z

@fabpot what is the status of this PR ?
2012-10-27 21:28:00 +02:00
Al Ganiev
9872d26c9c [HttpFoundation] Fix name sanitization after perfoming move 2012-10-27 21:28:00 +02:00
Fabien Potencier
649872be85 merged branch jonathaningram/issue_5375 (PR #5376)
This PR was merged into the 2.0 branch.

Commits
-------

a094f7e Add check to Store::unlock to ensure file exists

Discussion
----------

[2.0] [HttpKernel] Add check to Store::unlock to ensure file exists

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

I was seeing this error in my logs when using an `AppCache`:

```
Error 2: /var/www/beta.example.com/shared/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php line 92: unlink(/var/www/beta.example.com/releases/20120827020525/app/cache/beta/http_cache/md/c2/88/66a911b5266a57bdd55131a47895b8861dfd.lck): No such file or directory
```

It was only occurring when the `http_cache` file was being primed (i.e. first load).

I've added a simple check to ensure that the file is a valid file before trying to unlink. I also added a missing `@return` docblock. Note: I've chosen to return `false` if the file does not exist as this seems to be the behaviour of the `purge` method.

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

by jonathaningram at 2012-08-29T06:46:52Z

@henrikbjorn done and rebased. Thanks.

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

by jonathaningram at 2012-09-17T22:38:47Z

@henrikbjorn any news on this one? It's currently not possible to use the HTTP Cache without the first request failing.

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

by jonathaningram at 2012-09-25T01:28:38Z

ping @fabpot sorry to keep pushing this, but any chance you could take a look at this?
2012-10-27 18:34:13 +02:00
Fabien Potencier
43aa20fcb6 Merge branch '2.0' into 2.1
* 2.0:
  [ClassLoader] fixed unbracketed namespaces (closes #5747)

Conflicts:
	src/Symfony/Component/ClassLoader/ClassCollectionLoader.php
	tests/Symfony/Tests/Component/ClassLoader/ClassCollectionLoaderTest.php
2012-10-27 17:59:21 +02:00
Fabien Potencier
6f15c4780f [ClassLoader] fixed unbracketed namespaces (closes #5747) 2012-10-27 17:55:46 +02:00
Fabien Potencier
e3ceb56b48 merged branch Burgov/doctrine_orm_type_guesser_tests (PR #5793)
This PR was merged into the 2.1 branch.

Commits
-------

5d2525b [Form] Created test for DoctrineOrmTypeGuesser see #5790
b844d6b [Form] Fixed DoctrineOrmTypeGuesser to guess the "required" option for to-one associations

Discussion
----------

[Form] Doctrine orm type guesser tests

This PR adds tests to https://github.com/symfony/symfony/pull/5790

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

by Tobion at 2012-10-20T10:53:56Z

Using real test entities would be better IMO. Using mocks ties it pretty much to the implementation.

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

by sstok at 2012-10-21T10:38:53Z

@Tobion thats true, but Doctrine Class meta data takes quite some coding to set-up.
For instance you need the EntityManager to get even get the meta data set!

So you'd end having more code to set-up then your actually testing.

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

by Burgov at 2012-10-21T12:58:58Z

I wasn't sure whether do use a test entity manager, or do it the way I finally did it.

@sstok true, it's quite some work to set it up, but on the other hand there's the base OrmTestCase class which does it for you, so it'd actually mean I'd only have to create one entity for all the cases: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php

@Tobion on the other hand I tend to use a test EM only when I actually need to test persisting and loading, while this test case here is so isolated that I didn't really feel it would be necessary.

I'd like to know which method is preferred though, I'll change it if necessary, and other tests can be added to test the rest of this specific class
2012-10-27 15:36:11 +02:00
Fabien Potencier
5155aecb3a merged branch Tobion/patch-2 (PR #5843)
This PR was merged into the 2.1 branch.

Commits
-------

7447ef7 slight refactoring in UrlMatcher

Discussion
----------

slight refactoring in UrlMatcher

bc break: no
bug fix: no
feature addition: no

saving a variable
2012-10-26 14:49:15 +02:00
Tobias Schultze
7447ef7171 slight refactoring in UrlMatcher 2012-10-26 12:26:42 +03:00
Simon Terrien
2d9a6fcc19 Use Norm Data instead of Data
This listener is triggered when normalized data are binded.

We have to use $event->getForm()->getNormData() instead of $event->getForm()->getData().
2012-10-26 12:03:13 +03:00
Fabien Potencier
1277e6746b Merge branch '2.0' into 2.1
* 2.0:
  bumped Symfony version to 2.0.19-DEV
  updated VERSION for 2.0.18
  update CONTRIBUTORS for 2.0.18
  updated CHANGELOG for 2.0.18
  updated vendors for 2.0.18
  Add to DateFormats 'D M d H:i:s Y T' (closes #5830)

Conflicts:
	CONTRIBUTORS.md
	src/Symfony/Component/HttpKernel/Kernel.php
	tests/Symfony/Tests/Bridge/Monolog/Processor/WebProcessorTest.php
	vendors.php
2012-10-25 15:11:50 +02:00
Fabien Potencier
887207402b bumped Symfony version to 2.0.19-DEV 2012-10-25 15:09:46 +02:00
Fabien Potencier
f31c6f97b6 merged branch greg0ire/fix_upgrade_prototype_name_option (PR #5833)
This PR was merged into the 2.1 branch.

Commits
-------

6fb4a1b Remove § about prototype_name customization in 2.0
8a347fd fix option name

Discussion
----------

Fix upgrade prototype name option
2012-10-25 15:04:22 +02:00
Fabien Potencier
03fbb485e0 updated VERSION for 2.0.18 2012-10-25 10:56:58 +02:00
Fabien Potencier
12dd94804c update CONTRIBUTORS for 2.0.18 2012-10-25 10:56:32 +02:00
Fabien Potencier
065512db62 updated CHANGELOG for 2.0.18 2012-10-25 10:56:03 +02:00
Fabien Potencier
4250c033d0 updated vendors for 2.0.18 2012-10-25 10:54:02 +02:00
Grégoire Paris
6fb4a1bbdc Remove § about prototype_name customization in 2.0
I don't think this was even possible in 2.0
2012-10-25 10:33:18 +02:00
Grégoire Paris
8a347fdba6 fix option name 2012-10-25 10:33:03 +02:00
Xavier REN
20898e53a6 Add to DateFormats 'D M d H:i:s Y T' (closes #5830)
DateFormat seen on the web
2012-10-25 09:07:48 +02:00
Fabien Potencier
94f5f49894 merged branch bamarni/patch-10 (PR #5783)
This PR was merged into the 2.1 branch.

Commits
-------

3553276 [ConfigDumpReference] avoid notice for variable nodes

Discussion
----------

[ConfigDumpReference] avoid notice for variable nodes

When a variable node has an array as default value, a notice occurs later on because of an "array to string conversion", which is turned to an exception in debug mode (mandatory in order to run this command).
2012-10-24 17:35:37 +02:00
Fabien Potencier
562d3516fd merged branch nomack84/code_cleanup (PR #5818)
This PR was merged into the 2.1 branch.

Commits
-------

f06432b Code cleanup

Discussion
----------

Code cleanup

Not sure at the end if this good or not. If it is useless, just close it.
2012-10-24 17:12:48 +02:00
Stano Turza
11ba41bb17 added missing use statment (closes #5825) 2012-10-24 17:10:37 +02:00
Fabien Potencier
28482f8216 merged branch stof/timeline_panel (PR #5801)
This PR was merged into the 2.1 branch.

Commits
-------

039bdfd [WebProfilerBundle] Fixed the use of nested macros

Discussion
----------

[WebProfilerBundle] Fixed the use of nested macros

Closes #5800

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

by stof at 2012-10-22T20:03:10Z

@fabpot ping. this regression is quite annoying as I like the profiler
2012-10-22 22:20:01 +02:00
Mario A. Alvarez Garcia
f06432bc73 Code cleanup 2012-10-22 10:37:12 -04:00