Commit Graph

14047 Commits

Author SHA1 Message Date
Fabien Potencier
72d961847f fixed version 2013-11-13 15:28:11 +01:00
Fabien Potencier
2866bd4956 bug #9499 Request::overrideGlobals() may call invalid ini value (denkiryokuhatsuden)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9499).

Discussion
----------

Request::overrideGlobals() may call invalid ini value

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

According to http://php.net/manual/ja/ini.core.php ,
there's not variable_order, but variables_order (with trailing "s").

Perhaps it breaks BC for some developer who unsets (sets falsy value to )
'request_order' ini value and sets 'variable_order' manually?

Commits
-------

7f43fb8 Request::overrideGlobals() may call invalid ini value
2013-11-13 09:30:53 +01:00
Daisuke Ohata
9bc76ca13d Request::overrideGlobals() may call invalid ini value
According to http://php.net/manual/ja/ini.core.php ,
there's not variable_order, but variables_order (with trailing "s").

Perhaps it breaks BC for some developer who unsets
'request_order' ini value and sets 'variable_order' manually?
2013-11-13 09:30:53 +01:00
Fabien Potencier
bde28cb3b3 bug #9212 [Validator] Force Luhn Validator to only work with strings (Richtermeister)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9212).

Discussion
----------

[Validator] Force Luhn Validator to only work with strings

The Luhn Validator fails to work with float or large integers (internally turned into float by php, depending on precision setting). This is problematic because developers might use number or integer form fields to capture credit card data, which will lead to a validation error even though the form input itself was valid. This commit makes validator throw UnexpectedTypeException on non-string input to avoid this confusion.

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

Commits
-------

a9dfd37 Force Luhn Validator to only work with strings
2013-11-09 16:57:10 +01:00
Daniel Richter
1e410c7bcb Force Luhn Validator to only work with strings
The Luhn Validator fails to work with float or large integers (internally turned into float by php, depending on precision setting).
This is problematic because developers might use number or integer form fields to capture credit card data, which will lead to a validation error even though the form input itself was valid. This commit makes validator throw UnexpectedTypeException on non-string input to avoid this confusion.
2013-11-09 16:57:10 +01:00
Fabien Potencier
78e9acbbc5 minor #9477 [Translation] fixed the error in the dumper test as described in #9475 (andremaha)
This PR was merged into the 2.2 branch.

Discussion
----------

[Translation] fixed the error in the dumper test as described in #9475

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

Commits
-------

853404a [Translation] fixed the error in the dumper test as described in #9475
2013-11-09 16:48:40 +01:00
Andrey Esaulov
853404a11e [Translation] fixed the error in the dumper test as described in #9475 2013-11-09 13:40:25 +01:00
Fabien Potencier
527269a7b6 minor #9467 [Console] fix phpdoc and constructor default value (Tobion)
This PR was merged into the 2.2 branch.

Discussion
----------

[Console] fix phpdoc and constructor default value

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

Commits
-------

fa4075e [Console] fix phpdoc and constructor default value
2013-11-09 12:36:54 +01:00
Tobias Schultze
fa4075e6d1 [Console] fix phpdoc and constructor default value 2013-11-08 01:49:34 +01:00
Fabien Potencier
99f3b3fefe minor #9436 Slovenian translations fixed for Symfony 2.2 (peterkokot)
This PR was merged into the 2.2 branch.

Discussion
----------

Slovenian translations fixed for Symfony 2.2

Some fixes for Slovenian translations.

Commits
-------

0819130 slovenian translations fixed
2013-11-04 07:09:30 +01:00
Peter Kokot
08191303cd slovenian translations fixed 2013-11-04 02:00:27 +01:00
Fabien Potencier
eacddd2599 bug #9431 [DependencyInjection] fixed YamlDumper did not make services private. (realityking)
This PR was merged into the 2.2 branch.

Discussion
----------

[DependencyInjection] fixed YamlDumper did not make services private.

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

The YamlDumper class (unlike the XmlDumper) currently doesn't make services private. This pull request fixes this.

Commits
-------

e8c2082 [DependencyInjection] fixed YamlDumper did not make services private.
2013-11-03 08:36:38 +01:00
Rouven Weßling
e8c2082c04 [DependencyInjection] fixed YamlDumper did not make services private. 2013-11-03 00:57:38 +01:00
Fabien Potencier
143af6d626 minor #9370 [FrameworkBundle] add test for #5135 and simplify routing container parameter resolution (Tobion)
This PR was merged into the 2.2 branch.

Discussion
----------

[FrameworkBundle] add test for #5135 and simplify routing container parameter resolution

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixes   | #5135
| Tests pass?   | yes
| license?      | MIT

1. [FrameworkBundle] added working test case for issue #5135
2. [FrameworkBundle] fix routing container parameter exception message which did not really make sense and improve regex performance

Commits
-------

719e037 [FrameworkBundle] fix routing container parameter exception message
8513ac9 [Routing] added working test case for issue #5135
2013-10-31 16:51:38 +01:00
Tobias Schultze
719e0377bb [FrameworkBundle] fix routing container parameter exception message
also improve regex performance and fix implementation-specific written tests and typo
2013-10-31 16:19:00 +01:00
Fabien Potencier
eac8e3a3b2 update CONTRIBUTORS 2013-10-30 19:11:43 +01:00
Fabien Potencier
ee0ffc5c61 bug #9412 [HttpFoundation] added content length header to BinaryFileResponse (kbond)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9412).

Discussion
----------

[HttpFoundation] added content length header to BinaryFileResponse

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

Commits
-------

e75a556 added content length header to BinaryFileResponse
2013-10-30 17:57:35 +01:00
Kevin Bond
2b8029e469 added content length header to BinaryFileResponse 2013-10-30 17:57:35 +01:00
Fabien Potencier
0211c387d3 fixed CS 2013-10-30 09:27:36 +01:00
Fabien Potencier
4bff07956a bug #9388 [Form] Fixed: The "data" option is taken into account even if it is NULL (bschussek)
This PR was merged into the 2.2 branch.

Discussion
----------

[Form] Fixed: The "data" option is taken into account even if it is NULL

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

Commits
-------

c1a3eb3 [Form] Fixed: The "data" option is taken into account even if it is NULL
2013-10-28 14:27:57 +01:00
Fabien Potencier
ef695655f5 bug #9391 [Serializer] Fixed the error handling when decoding invalid XML to avoid a Warning (stof)
This PR was merged into the 2.2 branch.

Discussion
----------

[Serializer] Fixed the error handling when decoding invalid XML to avoid a Warning

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

Without the exception being thrown here, the call to ``simplexml_import_dom`` throws a warning saying ``Invalid Nodetype to import``.
This has been reported by @Tobion after we refactored FOSRestBundle to use this XmlEncoder instead of a duplication of a previous version of the class: https://github.com/FriendsOfSymfony/FOSRestBundle/pull/583/files#r7221045

Commits
-------

b2550b9 Fixed the error handling when decoding invalid XML to avoid a Warning
2013-10-28 14:03:08 +01:00
Christophe Coevoet
b2550b90ae Fixed the error handling when decoding invalid XML to avoid a Warning 2013-10-28 13:20:44 +01:00
Bernhard Schussek
c1a3eb3f2e [Form] Fixed: The "data" option is taken into account even if it is NULL 2013-10-28 10:50:26 +01:00
Fabien Potencier
6fcb06034a bug #9378 [DomCrawler] [HttpFoundation] Make Content-Type attributes identification case-insensitive (matthieuprat)
This PR was merged into the 2.2 branch.

Discussion
----------

[DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive

According to [section 3.7 of RFC 2616][], media-type attribute names in the `Content-Type` header are case-insensitive.
Therefore, identification of the `text` type and the `charset` parameter in the `Content-Type` header should be case-insensitive.

[section 3.7 of RFC 2616]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7

Commits
-------

17a2d66 [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
2013-10-26 10:02:56 +02:00
Fabien Potencier
ed799c96af bug #9354 [2.2][Process] Fix #9343 : revert file handle usage on Windows platform (romainneutron)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Process] Fix #9343 : revert file handle usage on Windows platform

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

Hello,

I propose to revert the use of file handles only for `STDOUT` on Windows platform (see implementation in 2.2.6 [here](4059720232/src/Symfony/Component/Process/Process.php (L231-L242))).

When I decoupled pipes management from `Process` in #8924, I used file handles for both `STDOUT` and `STDERR`. This was an error as it introduced random failure in reading the handles (reported as [PHP#65650](https://bugs.php.net/bug.php?id=65650)).

Reverting to the previous implementation solves the issue. My apologies for the issues it introduced.

Versions that have been affected by the bug are 2.2.7, 2.2.8, 2.2.9, 2.3.4, 2.3.5 and 2.3.6.

Side note : I thought about testing the file handles implementation on *nix, but it fails most of the time where as Windows is okay. Unit testing on windows is okay (AbstractProcessTest::testProcessPipes tests it), but I don't provide a travis compatible test.

Commits
-------

e9dd408 [Process] Fix #9343 : revert file handle usage on Windows platform
2013-10-26 09:51:51 +02:00
Matthieu Prat
17a2d66456 [DomCrawler] [HttpFoundation] Make Content-Type attributes identification case-insensitive 2013-10-25 15:49:57 +00:00
Fabien Potencier
6ef251392f git push #9372 Fixed English usage for existing users. (mgenereu)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9372).

Discussion
----------

Fixed English usage for existing users.

Commits
-------

b674e44 Fixed English usage for existing users.
2013-10-24 21:28:54 +02:00
Michael Genereux
95bca6cbf0 Fixed English usage for existing users. 2013-10-24 21:28:54 +02:00
Tobias Schultze
8513ac9a10 [Routing] added working test case for issue #5135 2013-10-24 15:23:46 +02:00
Romain Neutron
e9dd408881 [Process] Fix #9343 : revert file handle usage on Windows platform 2013-10-21 13:56:16 +02:00
Fabien Potencier
2a637b12b4 bug #9333 [2.2][Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty (bschussek)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty

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

ping @stof

follow-up PR to #9327

Commits
-------

219e44d [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
2013-10-18 16:57:55 +02:00
Fabien Potencier
4dbe623903 bug #9338 [DoctrineBridge] Added type check to prevent calling clear() on arrays (bschussek)
This PR was merged into the 2.2 branch.

Discussion
----------

[DoctrineBridge] Added type check to prevent calling clear() on arrays

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

Commits
-------

4ff59d7 [DoctrineBridge] Added type check to prevent calling clear() on arrays
2013-10-18 16:57:09 +02:00
Bernhard Schussek
4ff59d77a8 [DoctrineBridge] Added type check to prevent calling clear() on arrays 2013-10-18 16:04:39 +02:00
Bernhard Schussek
219e44d610 [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty 2013-10-18 13:07:56 +02:00
Fabien Potencier
1b97ad44e9 minor #9312 [Security] Fix docblock typo (adrienbrault)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9312).

Discussion
----------

[Security] Fix docblock typo

Commits
-------

bff65b2 [Security] Fix docblock typo
2013-10-17 23:27:39 +02:00
Adrien Brault
fd869cf295 Fix docblock typo 2013-10-17 23:27:38 +02:00
Fabien Potencier
04c3f25e6a bug #9327 [2.2][Form] Changed FormTypeCsrfExtension to use the form's name as default intention (bschussek)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Form] Changed FormTypeCsrfExtension to use the form's name as default intention

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

Before, every form used the same "intention"/"csrf_token_id" value by default, namely "unknown". This PR fixes the default value to the form's name, which is at least different for forms with (a) explicit names and (b) different types, where the implicit name equals the type's name.

Commits
-------

b07c618 [Form] Changed FormTypeCsrfExtension to use the form's name as default intention
2013-10-17 23:23:35 +02:00
Bernhard Schussek
b07c618bf4 [Form] Changed FormTypeCsrfExtension to use the form's name as default intention 2013-10-17 17:52:50 +02:00
Fabien Potencier
0080399b7d bug #9308 [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays (bschussek)
This PR was merged into the 2.2 branch.

Discussion
----------

[DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays

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

Previously, writing an association getter like this was impossible:

```php
public function addTag(Tag $tag) { ... }
public function removeTag(Tag $tag) { ... }

public function getTags()
{
    return $this->tags->toArray();
}
```

Using `toArray()` is a useful way to restrict modifications of the collection to the specified methods. But previously, CollectionToArrayTransformer failed in this case, because it did not accept arrays as input.

Commits
-------

55001ab [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
2013-10-16 16:55:16 +02:00
Fabien Potencier
3e684b4d4f minor #9304 Dead code v2.2 (hhamon)
This PR was merged into the 2.2 branch.

Discussion
----------

Dead code v2.2

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

Commits
-------

0946be6 Removed unused use statements.
2013-10-16 16:51:43 +02:00
Bernhard Schussek
55001abd1a [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays 2013-10-16 16:40:09 +02:00
Hugo Hamon
0946be6c5b Removed unused use statements. 2013-10-16 14:19:20 +02:00
Fabien Potencier
729b41f7af minor #9276 [Stopwatch] Fix tests on Travis (also vagrant) (brikou)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9276).

Discussion
----------

[Stopwatch] Fix tests on Travis (also vagrant)

Travis often fails to run tests related to the Stopwatch Component, check it yourself:

- https://travis-ci.org/symfony/symfony/jobs/12340378
- https://travis-ci.org/symfony/symfony/jobs/12365787
- https://travis-ci.org/symfony/symfony/jobs/12365790
- https://travis-ci.org/symfony/symfony/jobs/12367771
- https://travis-ci.org/symfony/symfony/jobs/12367844
- https://travis-ci.org/symfony/symfony/jobs/12368619
- https://travis-ci.org/symfony/symfony/jobs/12371316
- https://travis-ci.org/symfony/symfony/jobs/12375730

This is because Travis is just slow as hell. So I just multiply the used usleep by 10.

Commits
-------

bf65483 Make usleep longer and simplify assertions
2013-10-15 18:59:36 +02:00
Brikou Carré
beae3b1a8b Make usleep longer and simplify assertions 2013-10-15 18:59:35 +02:00
Fabien Potencier
879305e104 minor #9283 [Security] Added japanese translation resource for security component. (hidenorigoto)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9283).

Discussion
----------

[Security] Added japanese translation resource for security component.

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

Commits
-------

4176cf1 Added japanese translation resource for security component.
2013-10-15 18:57:17 +02:00
hidenorigoto
26e50fff97 Added japanese translation resource for security component. 2013-10-15 18:57:17 +02:00
Fabien Potencier
b599598bb3 bug #9274 [Yaml] Fixed the escaping of strings starting with a dash when dumping (stof)
This PR was merged into the 2.2 branch.

Discussion
----------

[Yaml] Fixed the escaping of strings starting with a dash when dumping

Dashes need to be escaped in character sets in regexes as they are used to specify a range otherwise.
It fixes the dumper bug reported in #9039 (the parsing issue is not fix here)

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

Commits
-------

af369ae [Yaml] Fixed the escaping of strings starting with a dash when dumping
2013-10-11 06:56:07 +02:00
Christophe Coevoet
af369aee64 [Yaml] Fixed the escaping of strings starting with a dash when dumping
Dashes need to be escaped in character sets in regexes as they are used to
specify a range otherwise.
Refs #9039
2013-10-11 00:23:27 +02:00
Fabien Potencier
9f8867376f bug #9270 [Templating] Fix in ChainLoader.php (janschoenherr)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9270).

Discussion
----------

[Templating] Fix in ChainLoader.php

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

The LoaderInterface requires the _time_ parameter to be passed.

Commits
-------

2631eb3 [Templating] Fix in ChainLoader.php
2013-10-10 17:51:38 +02:00
janschoenherr
e2ecc0fd23 Fix in ChainLoader.php
The LoaderInterface requires the time to be passed.
2013-10-10 17:51:38 +02:00