Commit Graph

17265 Commits

Author SHA1 Message Date
Fabien Potencier 75ccdb0e37 minor #10923 [Security] removed an unused parameter in some private methods (issei-m)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Security] removed an unused parameter in some private methods

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

f9f3852 [Security] removed an unused parameter in some private methods
2014-05-17 11:54:34 +02:00
Issei.M f9f385252d [Security] removed an unused parameter in some private methods 2014-05-17 17:07:33 +09:00
Fabien Potencier 825867208e feature #10882 Fix issue #10867 (umpirsky)
This PR was merged into the 2.5-dev branch.

Discussion
----------

Fix issue #10867

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10867
| License       | MIT

Commits
-------

0cc9746 Fix issue #10867
2014-05-16 16:54:34 +02:00
Fabien Potencier 3c179454f6 minor #10900 Update MessageSelector.php to show which value was passed (t3chn0r)
This PR was merged into the 2.5-dev branch.

Discussion
----------

Update MessageSelector.php to show which value was passed

When the translator can't find a correct match using transChoice() a string is logged today with the following text:

<em>Unable to choose a translation for "[string]" with locale "[locale]". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").</em>

This change introduces the value that was passed to transChoice() so the developer will have more information as to what value did not match any of the translation options:

<em>Unable to choose a translation for "[string]" with locale "[locale]" for value "[value]". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").</em>

Commits
-------

af99997 Update MessageSelector.php to show which value was passed
2014-05-16 16:53:25 +02:00
Fabien Potencier 0eddb84a93 bug #10902 [Yaml] Fixed YAML Parser does not ignore duplicate keys, violating YAML spec. (sun)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Yaml] Fixed YAML Parser does not ignore duplicate keys, violating YAML spec.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | **mayhaps**
| Deprecations? | no
| Tests pass?   | yes
| Needs merge to | 2.4
| Fixed tickets | —
| License       | MIT
| Doc PR        | —

The current [YAML 1.2] specification clearly states:

> JSON's RFC4627 requires that mappings keys merely “SHOULD” be unique, while YAML insists they “MUST” be.

The outdated [YAML 1.1] spec contained a crystal clear note on how the error of duplicate keys is to be handled by parsers, which is (sadly) no longer contained in the latest 1.2 spec (only leaving the requirement):

> It is an error for two equal keys to appear in the same mapping node.  In such a case the YAML processor may continue, ignoring the second `key: value` pair and issuing an appropriate warning.  This strategy preserves a consistent information model for one-pass and random access applications.

[YAML 1.2]: http://yaml.org/spec/1.2/spec.html#id2759572
[YAML 1.1]: http://yaml.org/spec/1.1/#id932806

Commits
-------

951acca Fixed YAML Parser does not ignore duplicate keys, violating YAML spec.
2014-05-16 16:51:09 +02:00
Fabien Potencier a61fddb202 minor #10916 [Validator] Updated outdated dependencies. (csarrazi)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Validator] Updated outdated dependencies.

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

Fixes tests for the ```Validator``` component when using it as a standalone library (when running ```phpunit``` from the ```src/Symfony/Component/Form``` directory.

Commits
-------

1984a36 [Validator] Updated outdated dependencies.
2014-05-16 16:48:43 +02:00
Fabien Potencier 5a4bf3e938 feature #10912 [Form] Added support for injecting HttpFoundation's Request in ServerParams for the Validator extension (csarrazi)
This PR was merged into the 2.4-dev branch.

Discussion
----------

[Form] Added support for injecting HttpFoundation's Request in ServerParams for the Validator extension

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

The Request object should be injected in the ```ServerParams``` object before using it in the extension, if one wishes to use Symfony2's ```Request``` to fetch the server parameters.

Commits
-------

86f9cb9 Added support for injecting HttpFoundation's RequestStack in ServerParams
2014-05-16 16:46:17 +02:00
Charles Sarrazin 86f9cb90eb Added support for injecting HttpFoundation's RequestStack in ServerParams 2014-05-16 16:44:46 +02:00
Charles Sarrazin 1984a364f8 [Validator] Updated outdated dependencies. 2014-05-16 16:25:29 +02:00
sun 951acca387 Fixed YAML Parser does not ignore duplicate keys, violating YAML spec.
The current [YAML 1.2] specification clearly states:

> JSON's RFC4627 requires that mappings keys merely “SHOULD” be unique, while YAML insists they “MUST” be.

The outdated [YAML 1.1] spec contained a crystal clear note on how the error of duplicate keys is to be handled by parsers, which is (sadly) no longer contained in the latest 1.2 spec (only leaving the requirement):

> It is an error for two equal keys to appear in the same mapping node.  In such a case the YAML processor may continue, ignoring the second `key: value` pair and issuing an appropriate warning.  This strategy preserves a consistent information model for one-pass and random access applications.

[YAML 1.2]: http://yaml.org/spec/1.2/spec.html#id2759572
[YAML 1.1]: http://yaml.org/spec/1.1/#id932806
2014-05-16 16:25:18 +02:00
Fabien Potencier be1b917d21 Merge branch '2.4'
* 2.4:
  [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed
  Fixed incorrect regular plural for -ves words
  [HttpKernel] Replace sha1 with sha256 in recently added tests.
2014-05-16 13:54:37 +02:00
Fabien Potencier c94f69ddcb Merge branch '2.3' into 2.4
* 2.3:
  [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed
  Fixed incorrect regular plural for -ves words
2014-05-16 13:54:29 +02:00
Fabien Potencier 0762bae059 bug #10777 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed (tucksaun)
This PR was squashed before being merged into the 2.3 branch (closes #10777).

Discussion
----------

[Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9976, #10203
| License       | MIT
| Doc PR        | none

Same issue as #9976 and #10203: when you add a `time` field to a form with options `single_text` (so HTML5) and `with_seconds`, the generated input does not contain the `step` attribute, therefore the browser does not show them, leading to an error at the submit because of an invalid format.

Compared to #9976/#10203:
* Unit testable
* Available directly in the component
* Available in other templating format than twig
* Still able to customise the step attribute by hand

Commits
-------

a379298 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed
2014-05-16 13:54:17 +02:00
Tugdual Saunier a379298db9 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed 2014-05-16 13:54:15 +02:00
Fabien Potencier 912a72f555 bug #10909 [PropertyAccess] Fixed plurals for -ves words (csarrazi)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Fixed plurals for -ves words

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

Fixes singularization for words like caves (cave), staves (staff).

Commits
-------

c7a77c5 Fixed incorrect regular plural for -ves words
2014-05-16 12:09:36 +02:00
Charles Sarrazin c7a77c55b7 Fixed incorrect regular plural for -ves words
Fixes singularization for words like caves (cave), staves (staff).
2014-05-16 11:27:00 +02:00
Fabien Potencier 68f83c9270 minor #10906 [Console] Update test fixtures to match the new way we handle colors. (jakzal)
This PR was merged into the 2.4-dev branch.

Discussion
----------

[Console] Update test fixtures to match the new way we handle colors.

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

The other failing tests were fixed by #10904. Builds should be passing again when 2.4 is merged to master.

Commits
-------

8e2d69e [Console] Update test fixtures to match the new way we handle colors.
2014-05-15 11:10:29 +02:00
Jakub Zalas 8e2d69e458 [Console] Update test fixtures to match the new way we handle colors. 2014-05-15 09:56:35 +01:00
Fabien Potencier be3c0dcfc0 bug #10904 [HttpKernel] Replace sha1 with sha256 in recently added tests (jakzal)
This PR was merged into the 2.4 branch.

Discussion
----------

[HttpKernel] Replace sha1 with sha256 in recently added tests

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

Tests were introduced in #10896 and are broken starting with 2.4, since the hashing algorithm has changed (introduced in #8609).

Commits
-------

255544f [HttpKernel] Replace sha1 with sha256 in recently added tests.
2014-05-15 09:59:49 +02:00
Jakub Zalas 255544f194 [HttpKernel] Replace sha1 with sha256 in recently added tests. 2014-05-15 08:35:53 +01:00
Fabien Potencier c0187c1465 Merge branch '2.4'
* 2.4:
  Explicitly define the encoding.
2014-05-14 23:48:41 +02:00
Fabien Potencier 35a0ee6f03 Merge branch '2.3' into 2.4
* 2.3:
  Explicitly define the encoding.
2014-05-14 23:48:29 +02:00
Fabien Potencier 6207389a6d bug #10899 Explicitly define the encoding. (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

Explicitly define the encoding.

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

Credits for discovering it go to @nicolas-grekas. Cheers!

Travis for PHP 5.6 cannot be enabled yet as there's one more test failing.

re #10714 #10714

Commits
-------

619ff58 Explicitly define the encoding.
2014-05-14 15:50:58 +02:00
Jakub Zalas 619ff5818f Explicitly define the encoding. 2014-05-14 14:35:53 +01:00
t3chn0r af999971b4 Update MessageSelector.php to show which value was passed
When the translator can't find a correct match using transChoice() a string is logged today with the following text:
<code>Unable to choose a translation for "<string>" with locale "<locale>". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").</code>
This change introduces the value that was passed to transChoice() to the developer will have more information as to what value did not match any of the translation options:
<code>Unable to choose a translation for "<string>" with locale "<locale>" for value "<value>". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").</code>
2014-05-14 09:24:58 -04:00
Fabien Potencier f50c382979 Merge branch '2.4'
* 2.4:
  Disable 5.6 until it is stable again.
  Update the fixtures.
  fixed CS
  [HttpKernel] fixed default TTL not applied under certain conditions
  Added test when TTL has expired
  [DomCrawler] Fixed image input case sensitive
2014-05-14 08:54:00 +02:00
Fabien Potencier fad6a591fc Merge branch '2.3' into 2.4
* 2.3:
  Disable 5.6 until it is stable again.
  Update the fixtures.
  [HttpKernel] fixed default TTL not applied under certain conditions
  Added test when TTL has expired
2014-05-14 08:53:52 +02:00
Fabien Potencier 7b93db5ba8 bug #10897 [Console] Fix a console test (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Fix a console test

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

re #10714

Every wide character in the fixture file is actually 3 ansi-characters long.

Commits
-------

61108b9 Disable 5.6 until it is stable again.
8cadb49 Update the fixtures.
2014-05-14 08:44:39 +02:00
Jakub Zalas 61108b9185 Disable 5.6 until it is stable again. 2014-05-13 22:34:13 +01:00
Fabien Potencier a44945a306 bug #10896 [HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined (alquerci, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | #8232, #10822, #9919
| License       | MIT

From #9919:

"When the cache is stale the `validate` method `forward` the request to the backend. A new response will be created with or without TTL configuration. If the TTL was not set then the default one should be set like in the `fetch` method."

This PR fixes this issue, the tests provided in #9919 pass, and I've tweaked them to avoid the costly sleep calls.

Commits
-------

e3983e8 [HttpKernel] fixed default TTL not applied under certain conditions
bc42dae Added test when TTL has expired
2014-05-13 17:22:15 +02:00
Jakub Zalas 8cadb49613 Update the fixtures. 2014-05-13 14:44:05 +01:00
Fabien Potencier c56c198e52 Merge branch '2.3' into 2.4
* 2.3:
  fixed CS
  [DomCrawler] Fixed image input case sensitive
2014-05-13 10:58:07 +02:00
Fabien Potencier 46725c9cc8 fixed CS 2014-05-13 10:47:23 +02:00
Fabien Potencier e3983e8ec5 [HttpKernel] fixed default TTL not applied under certain conditions 2014-05-12 17:25:47 +02:00
alquerci bc42dae162 Added test when TTL has expired 2014-05-12 17:07:07 +02:00
Fabien Potencier 792b956540 bug #10841 [DomCrawler] Fixed image input case sensitive (geoffrey-brier)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10841).

Discussion
----------

[DomCrawler] Fixed image input case sensitive

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

I'm currently testing the payment workflow in a project. The problem is that when I reach the credit card type selection (CB, VISA ...) I cannot submit the desired one because its name is in uppercase (take a look at the screenshot).

![](http://s22.postimg.org/oz5cm3fwh/example.png)

Commits
-------

ab1198f [DomCrawler] Fixed image input case sensitive
2014-05-12 11:38:27 +02:00
Geoffrey Brier ab1198f4da [DomCrawler] Fixed image input case sensitive 2014-05-12 11:38:26 +02:00
Fabien Potencier 7e4b4a7ebb Merge branch '2.4'
* 2.4:
  Lower mbstring dependency
  [Console]Improve formatter for double-width character
  Lower mbstring dep, remove it for Yaml and CssSelector components
  [Security] Add check for supported attributes in AclVoter
  [Form] Fixed TrimListenerTest as of PHP 5.5
  Added more IDE links
  [DependencyInjection] Fix parameter description in ConfigurationExtensionInterface
  [Security] fixed wrong PHPDoc of the TokenGeneratorInterface
  [Finder] fixed typehint of the Finder::addAdapter() method
  [TwigBridge][Transchoice] set %count% from the current context.
  [DependencyInjection] Fix travis unit tests
  Update PHPUnit before run
  [Validator] fixed wrong test
  [WebProfilerBundle] added test case for #10773
  [WebProfilerBundle] fixed profiler homepage, fixed #10806
  [WebProfilerBundle] Added test case for #10806
  changed travis to run on the nightly builds of HHVM until everything gets stable
  Fixed issue #5427
  Allow URLs that don't contain a path

Conflicts:
	.travis.yml
	src/Symfony/Component/Console/Application.php
2014-05-12 11:28:39 +02:00
Fabien Potencier 934cd28ba6 Merge branch '2.3' into 2.4
* 2.3:
  [Console]Improve formatter for double-width character
  Lower mbstring dep, remove it for Yaml and CssSelector components
  [Security] Add check for supported attributes in AclVoter
  [Form] Fixed TrimListenerTest as of PHP 5.5
  Added more IDE links
  [DependencyInjection] Fix parameter description in ConfigurationExtensionInterface
  [Finder] fixed typehint of the Finder::addAdapter() method
  [TwigBridge][Transchoice] set %count% from the current context.
  [DependencyInjection] Fix travis unit tests
  Update PHPUnit before run
  [Validator] fixed wrong test
  [WebProfilerBundle] added test case for #10773
  [WebProfilerBundle] fixed profiler homepage, fixed #10806
  [WebProfilerBundle] Added test case for #10806
  changed travis to run on the nightly builds of HHVM until everything gets stable
  Fixed issue #5427
  Allow URLs that don't contain a path

Conflicts:
	.travis.yml
2014-05-12 11:27:48 +02:00
Fabien Potencier 174bf3eb5e minor #10891 Lower mbstring dependency (nicolas-grekas)
This PR was merged into the 2.4 branch.

Discussion
----------

Lower mbstring dependency

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

Follow up of #10890

Commits
-------

6ab6713 Lower mbstring dependency
2014-05-12 11:26:41 +02:00
Fabien Potencier d9fec7065b minor #10890 Lower mbstring dep, remove it for Yaml and CssSelector components (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Lower mbstring dep, remove it for Yaml and CssSelector components

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

Commits
-------

a4b805d Lower mbstring dep, remove it for Yaml and CssSelector components
2014-05-12 11:26:07 +02:00
Nicolas Grekas 6ab671361b Lower mbstring dependency 2014-05-12 11:22:51 +02:00
Fabien Potencier a29a60debd bug #10714 [Console]Improve formatter for double-width character (denkiryokuhatsuden)
This PR was squashed before being merged into the 2.3 branch (closes #10714).

Discussion
----------

[Console]Improve formatter for double-width character

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes for one that expecting current broken output
| Deprecations? | no
| Fixed tickets |
| Tests pass?   | yes
| License       | MIT
| Doc PR        |

EDIT: fixed the table above not to remove irrelevant line

As mb_strlen just returns "how many chars in the string",
formatting with double-width character is bit broken.

The test I add is skipped when mbstring extension is not loaded.
I'm afraid if some of you cannot properly display japanese string.
(表示するテキスト just means "Some text to display")

Commits
-------

a52f41d [Console]Improve formatter for double-width character
2014-05-12 11:19:00 +02:00
Daisuke Ohata a52f41d414 [Console]Improve formatter for double-width character 2014-05-12 11:16:18 +02:00
Nicolas Grekas a4b805dbf2 Lower mbstring dep, remove it for Yaml and CssSelector components 2014-05-12 11:13:35 +02:00
Fabien Potencier 1a64fef828 bug #10872 [Form] Fixed TrimListenerTest as of PHP 5.5 (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed TrimListenerTest as of PHP 5.5

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

Commits
-------

b0bc83d [Form] Fixed TrimListenerTest as of PHP 5.5
2014-05-12 11:08:11 +02:00
Fabien Potencier fe75bc6248 feature #10880 [DependencyInjection] GraphvizDumper now displays unresolved parameters (rosstuck)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[DependencyInjection] GraphvizDumper now displays unresolved parameters

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

Previously, the graphviz dumper would throw an exception if given a container with an unresolved parameter. This change allows it to render the parameter name instead of the class name if the class can not be resolved. This is also closer to the other DI dumpers which do not error out in these circumstances but simply carry the parameter name over.

For a practical use case, see: https://github.com/rosstuck/TuckConverterBundle/issues/1

Commits
-------

f800e15 GraphizDumper now displays unresolved parameters
2014-05-09 17:34:01 +02:00
umpirsky 0cc9746f87 Fix issue #10867 2014-05-09 17:32:36 +02:00
Fabien Potencier 295be74c34 bug #10876 [Console] Make `Helper\Table::setStyle()` chainable again (stloyd)
This PR was merged into the 2.4-dev branch.

Discussion
----------

[Console] Make `Helper\Table::setStyle()` chainable again

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10874
| License       | MIT

Commits
-------

de2410a [Console] Make `Helper\Table::setStyle()` chainable
2014-05-09 17:29:38 +02:00
Fabien Potencier 894b4a09b5 bug #10762 [BrowserKit] Allow URLs that don't contain a path when creating a cookie from a string (thewilkybarkid)
This PR was merged into the 2.3 branch.

Discussion
----------

[BrowserKit] Allow URLs that don't contain a path when creating a cookie from a string

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

The Cookie class doesn't require a path, but the `fromString()` static method does, so when URL given is something like http://www.example.com (ie no trailing slash) it currently throws an exception. This PR removes the requirement.

Commits
-------

fc1223f Allow URLs that don't contain a path
2014-05-09 17:26:55 +02:00