Commit Graph

25091 Commits

Author SHA1 Message Date
Christian Flothmann 042eac4624 [Form] fix parsing invalid floating point numbers 2017-10-08 14:45:17 +02:00
Fabien Potencier dd490af864 bumped Symfony version to 2.7.36 2017-10-05 16:05:57 -07:00
Fabien Potencier 0943a1d8f7 Merge pull request #24450 from fabpot/release-2.7.35
released v2.7.35
2017-10-05 15:52:05 -07:00
Fabien Potencier 2c907d5156 updated VERSION for 2.7.35 2017-10-05 15:51:51 -07:00
Fabien Potencier 4d3f3255dd update CONTRIBUTORS for 2.7.35 2017-10-05 15:51:49 -07:00
Fabien Potencier 88f8c6526a updated CHANGELOG for 2.7.35 2017-10-05 15:51:42 -07:00
Fabien Potencier f961aa024f bug #24448 [Session] fix MongoDb session handler to gc all expired sessions (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

[Session] fix MongoDb session handler to gc all expired sessions

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

MongoDB session handler `gc` wrongly only deleted one random expired session instead of all of them.
Care when merging to master as this will conflict with #24447

Commits
-------

e6895bfac5 [Session] fix MongoDb session handler to gc all expired sessions
2017-10-05 15:34:50 -07:00
Tobias Schultze e6895bfac5 [Session] fix MongoDb session handler to gc all expired sessions 2017-10-05 21:04:13 +02:00
Fabien Potencier cb14798178 bug #24417 [Yaml] parse references on merge keys (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] parse references on merge keys

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

Commits
-------

dab72ab9a9 [Yaml] parse references on merge keys
2017-10-05 05:28:15 -07:00
Fabien Potencier 253cde2062 bug #24421 [Config] Fix dumped files invalidation by OPCache (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Fix dumped files invalidation by OPCache

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

While demoing Flex, I've noticed that container invalidation takes a few seconds on my setup.
I've debugged that down to OPcache, which serves the legacy container while it's been overridden.
Let's invalidate the file explicitly when it changes.

Commits
-------

b1290da21b [Config] Fix dumped files invalidation by OPCache
2017-10-04 11:52:35 -07:00
Nicolas Grekas b1290da21b [Config] Fix dumped files invalidation by OPCache 2017-10-04 11:33:55 +02:00
Christian Flothmann dab72ab9a9 [Yaml] parse references on merge keys 2017-10-04 00:19:48 +02:00
Nicolas Grekas 817f594f48 fix tests 2017-10-02 10:43:16 +02:00
Fabien Potencier a11589f45c bug #23980 Tests and fix for issue in array model data in EntityType field with multiple=true (stoccc)
This PR was squashed before being merged into the 2.7 branch (closes #23980).

Discussion
----------

Tests and fix for issue in array model data in EntityType field with multiple=true

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| License       | MIT
| Fixed tickets | #23927

Provided some tests and the fix for #23927.
Rebased to 2.7, replaces #23930

Commits
-------

aaba6b4c2b Tests and fix for issue in array model data in EntityType field with multiple=true
2017-10-01 11:10:38 -07:00
stoccc aaba6b4c2b Tests and fix for issue in array model data in EntityType field with multiple=true 2017-10-01 11:10:36 -07:00
Fabien Potencier a8d5359408 bug #22586 [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible (aaa2000)
This PR was squashed before being merged into the 2.7 branch (closes #22586).

Discussion
----------

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

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| Bug fix?      | yes-ish
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | <!-- #-prefixed issue number(s), if any -->
| License       | MIT

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Implements the same behaviour that `NumberToLocalizedStringTransformer` in order to accept both comma and dot implemented in #5941

Commits
-------

f96a7f81b8 [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
2017-10-01 10:48:22 -07:00
adev f96a7f81b8 [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible 2017-10-01 10:48:20 -07:00
Fabien Potencier f73d8d26b0 bug #24157 [Intl] Fixed support of Locale::getFallback (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[Intl] Fixed support of Locale::getFallback

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

Commits
-------

256055218e [Intl] Fixed support of Locale::getFallback
2017-09-30 07:22:16 -07:00
Fabien Potencier 166f64efb1 bug #24198 [HttpFoundation] Fix file upload multiple with no files (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix file upload multiple with no files

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

```php
<form method="post" enctype="multipart/form-data">
<input type="file" multiple name="img[]">
<input type="submit">
</form>

<?php

$loader = require __DIR__ . '/../app/autoload.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
    var_export($request->files->all()['img']);
}
```

Expected result when I send the form without any files:

```
array ()
```

Actual result:

```
array ( 0 => NULL, )
```

This causes a problem later when using FileType with multiple option - if no files are sent the form data are `[0 => '']` instead of `[]`.

Of course I need to add a test for this.

Commits
-------

d4f6039dcd [HttpFoundation] Fix file upload multiple with no files
2017-09-30 07:18:14 -07:00
Fabien Potencier 72cc5df5fc minor #24342 removed useless PHPDoc (OskarStark)
This PR was squashed before being merged into the 2.7 branch (closes #24342).

Discussion
----------

removed useless PHPDoc

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | n/a

Commits
-------

5ee9043d8b removed useless PHPDoc
2017-09-30 07:00:25 -07:00
Oskar Stark 5ee9043d8b removed useless PHPDoc 2017-09-30 07:00:23 -07:00
Fabien Potencier fbbab43506 minor #24384 [Form] Fix FormInterface::submit() annotation (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix FormInterface::submit() annotation

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

`null|string|array` does not cover all possible values. For example for UploadType it is an instance of UploadedFile.

Commits
-------

c6c09e4f28 [Form] Fix FormInterface::submit() annotation
2017-09-30 06:49:47 -07:00
Jáchym Toušek c6c09e4f28 [Form] Fix FormInterface::submit() annotation 2017-09-29 22:09:03 +02:00
Fabien Potencier 59c272b312 bug #24036 [Form] Fix precision of MoneyToLocalizedStringTransformer's divisions and multiplications (Rubinum)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix precision of MoneyToLocalizedStringTransformer's divisions and multiplications

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

There is a [PHP Bug](https://bugs.php.net/bug.php?id=75004) with the accuracy of divisions and multiplications when `/=` and `*=` are used.
Here is the proof: https://3v4l.org/u1DkX
It would be better to use `bcmul()` and `bcdiv()` in the `MoneyToLocalizedStringTransformer.php` to prevent this bug.

Commits
-------

ab47c7878e Added improvement for accuracy in MoneyToLocalizedStringTransformer.
2017-09-29 09:36:28 -07:00
Fabien Potencier 5bbec9c722 bug #24367 PdoSessionHandler: fix advisory lock for pgsql (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

PdoSessionHandler: fix advisory lock for pgsql

when session.sid_bits per_character > 4 the session id can contain non-hex-characters which will be ignored by hexdec. this can potentially result in collisions on the lock key from different sessions, e.g. the session ids `aagh` and `aaij` would have the same pgsql lock because `hexdec('aagh') === hexdec('aaij')`

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #24095
| License       | MIT
| Doc PR        |

Commits
-------

0f0a6e85e3 PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
2017-09-28 17:54:35 -07:00
Tobias Schultze 0f0a6e85e3 PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4 2017-09-28 20:22:10 +02:00
Fabien Potencier e4d9bfd245 minor #24353 [Validator] minor translation text fix (darnel)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] minor translation text fix

Update validators.cs.xlf - Fix czech translation for "This field was not expected"

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

This commit fixes grammatical issue for czech translation only.

Commits
-------

fbe7148000 Fix translation for "This field was not expected"
2017-09-28 06:20:28 -07:00
Fabien Potencier d178a9b2c5 bug #24243 HttpCache does not consider ESI resources in HEAD requests (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #24243).

Discussion
----------

HttpCache does not consider ESI resources in HEAD requests

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

Due to this shortcut:
3b42d8859e/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php (L634-L642)
... the `HttpCache` never looks at the response body for `HEAD` requests. This makes it completely miss ESI-related tweaks like computing the correct TTL, removing validation headers or updating the `Content-Length`.

From RFC2616 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4):

> The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request.

Although it says "SHOULD", I think it can be misleading at best when HEAD requests do, for example, return different (greater) `s-maxage` values than a corresponding GET request.

Commits
-------

4dd0e53171 HttpCache does not consider ESI resources in HEAD requests
2017-09-28 05:20:58 -07:00
Matthias Pigulla 4dd0e53171 HttpCache does not consider ESI resources in HEAD requests 2017-09-28 05:20:56 -07:00
Christophe Coevoet 9ed6dd4391 minor #24351 [Routing] Enhance Route(Collection) docblocks (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Enhance Route(Collection) docblocks

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

5b4308e9e1 [Routing] Enhance Route(Collection) docblocks
2017-09-28 10:05:10 +02:00
darnel fbe7148000 Fix translation for "This field was not expected"
Update validators.cs.xlf - Fix czech translation for "This field was not expected"
2017-09-28 08:55:08 +02:00
Maxime Steinhausser 5b4308e9e1 [Routing] Enhance Route(Collection) docblocks 2017-09-27 23:22:30 +02:00
Tim Jabs ab47c7878e Added improvement for accuracy in MoneyToLocalizedStringTransformer. 2017-09-26 17:19:17 +02:00
Christophe Coevoet 7ea18247f5 minor #24328 Use correct verb form in the pull request template (pamil)
This PR was merged into the 2.7 branch.

Discussion
----------

Use correct verb form in the pull request template

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

When "forget" is used with a gerund, it refers to an action that has already happened.

Commits
-------

484e3fd3f2 Use correct verb form in the pull request template
2017-09-26 12:11:58 +02:00
Nicolas Grekas dd8cc88942 minor #24329 Removed unused private property in the ContextListener (iltar)
This PR was merged into the 2.7 branch.

Discussion
----------

Removed unused private property in the ContextListener

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23882#discussion_r141007315
| License       | MIT
| Doc PR        | ~

The context property is unused, the local variable (constructor argument) is only concatenated to a string inside (session key).

Commits
-------

6522c05 Removed unused private property
2017-09-26 12:07:11 +02:00
Iltar van der Berg 6522c05876 Removed unused private property 2017-09-26 12:02:43 +02:00
Nicolas Grekas b90ce05c24 minor #24316 Added null as explicit return type (?TokenInterface) (iltar)
This PR was merged into the 2.7 branch.

Discussion
----------

Added null as explicit return type (?TokenInterface)

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23882#discussion_r140704737
| License       | MIT
| Doc PR        | ~

This fixes the returntype in the `ContextListener` so it can be merged upwards.

/cc @chalasr

Commits
-------

1ba4dd9 Added null as explicit return type (?TokenInterface)
2017-09-26 12:00:14 +02:00
Kamil Kokot 484e3fd3f2 Use correct verb form in the pull request template
When "forget" is used with a gerund, it refers to an action that has already happened.
2017-09-26 11:35:56 +02:00
Nicolas Grekas 3128cfd723 minor #24317 Use PHP_MAXPATHLEN in Filesystem.php (edoger)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #24317).

Discussion
----------

Use PHP_MAXPATHLEN in Filesystem.php

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

Relative to the use of fixed values, I think the use of PHP_MAXPATHLEN will be more robust.

Commits
-------

7a47559 Use PHP_MAXPATHLEN in Filesystem.
2017-09-26 11:21:42 +02:00
Qingshan Luo 7a475595e2 Use PHP_MAXPATHLEN in Filesystem. 2017-09-26 11:21:42 +02:00
Nicolas Grekas 4129fd2a83 bug #24304 [FrameworkBundle] Fix Routing\DelegatingLoader (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix Routing\DelegatingLoader

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

Spotted while reviewing: the default controller is not always a string, so parsing should only be done conditionally.

Commits
-------

a69c1b2 [FrameworkBundle] Fix Routing\DelegatingLoader
2017-09-25 11:27:18 +02:00
Iltar van der Berg 1ba4dd9b44 Added null as explicit return type (?TokenInterface) 2017-09-25 09:46:32 +02:00
Nicolas Grekas a69c1b2ae1 [FrameworkBundle] Fix Routing\DelegatingLoader 2017-09-24 15:55:14 +02:00
Robin Chalas a40c94d8e3 bug #24219 [Console] Preserving line breaks between sentences according to the exception message (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Preserving line breaks between sentences according to the exception message

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

Commits
-------

e2d4904 Render all line breaks according to the exception message
2017-09-20 15:00:12 +02:00
Yonel Ceruto e2d4904a84 Render all line breaks according to the exception message 2017-09-19 16:27:25 -04:00
Maxime Steinhausser 139398faf7 minor #24258 [Form] Fix phpdoc (hason)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix phpdoc

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

Commits
-------

f13081d12c [Form] Fix phpdoc
2017-09-19 19:12:22 +02:00
Martin Hasoň f13081d12c [Form] Fix phpdoc 2017-09-19 13:52:15 +02:00
Maxime Steinhausser a6f01a38eb minor #24249 [DI] remove confusing code (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] remove confusing code

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

This code is a no-op. I guess the intention was to resolve a parametrized alias target, yet this never worked and we don't want to make it work.

Commits
-------

3da645efed [DI] remove confusing code
2017-09-18 19:54:25 +02:00
Maxime Steinhausser c3518b59ef bug #23722 [Form] Fixed GroupSequence with "constraints" option (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed GroupSequence with "constraints" option

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

Commits
-------

e39e7a4fa9 [Form] Fixed GroupSequence with "constraints" option
2017-09-18 19:51:43 +02:00
Nicolas Grekas 3da645efed [DI] remove confusing code 2017-09-18 17:50:14 +02:00