Commit Graph

32384 Commits

Author SHA1 Message Date
Fabien Potencier
88f8c6526a updated CHANGELOG for 2.7.35 2017-10-05 15:51:42 -07:00
Fabien Potencier
9568fae01f bug #23906 Added support for guards when advancing workflow from a command (GDIBass)
This PR was merged into the 3.3 branch.

Discussion
----------

Added support for guards when advancing workflow from a command

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23904
| License       | MIT
| Doc PR        | symfony/symfony-docs

Added support for advancing a workflow from the command line when the transition has guards.

Commits
-------

15fd863112 Updated Test name and exception name to be more accurate
fefc20233b newline at end of file
8f2fa6b047 changed exception message
49839e3c28 Ahh, I see.  It actually wants a newline!
2c9d1e2d42 Removed newline
92308b4815 Created new Exception to throw and modified tests.
2ebc71a616 Created new Exception to throw and modified tests
3a8b2eded1 Code standard fixes
22b44e251f Changed automatic token generation to throw an exception instead
8ab59cb1c2 Updated if statement
324c208e12 Code standards update
b044ffb4a2 Added support for guards when advancing workflow from a command
2017-10-05 15:37:15 -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
Nicolas Grekas
01644c5ff3 Merge branch '2.8' into 3.3
* 2.8:
  [Yaml] parse references on merge keys
2017-10-05 16:43:42 +02:00
Nicolas Grekas
4e897a22cb Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] parse references on merge keys
2017-10-05 16:38:30 +02:00
Fabien Potencier
7a4fe8c01b bug #24431 [FrameworkBundle] Fix bad interface hint in AbstractController (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] Fix bad interface hint in AbstractController

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

As spotted by @stof

Commits
-------

5d29dd0d28 [FrameworkBundle] Fix bad interface hint in AbstractController
2017-10-05 07:36:53 -07:00
Nicolas Grekas
5d29dd0d28 [FrameworkBundle] Fix bad interface hint in AbstractController 2017-10-05 15:44:12 +02:00
Fabien Potencier
fc9acad46e bug #24419 [Cache] Fix race condition in TagAwareAdapter (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[Cache] Fix race condition in TagAwareAdapter

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

This code is not needed, and might create a race condition (see linked issue). Let's drop it.
When no tags are set on an item, this stores an empty tags array, instead of deleting the tags array entry at all.

Commits
-------

fa24fa8a3c [Cache] Fix race condition in TagAwareAdapter
2017-10-05 05:37:15 -07:00
Fabien Potencier
417ec3a49c minor #24423 [DI] Improve some deprecation messages (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Improve some deprecation messages

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

To improve DX.

Commits
-------

3e8076023d [DI] Improve some deprecation messages
2017-10-05 05:32:56 -07: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
16107510cb bug #24416 [Yaml] treat trailing backslashes in multi-line strings (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] treat trailing backslashes in multi-line strings

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

Commits
-------

80af9b8562 treat trailing backslashes in multi-line strings
2017-10-05 05:22:24 -07:00
Fabien Potencier
0a963d2b4e Merge branch '2.8' into 3.3
* 2.8:
  [Config] Fix dumped files invalidation by OPCache
2017-10-04 11:56:58 -07:00
Fabien Potencier
8f41e336f2 Merge branch '2.7' into 2.8
* 2.7:
  [Config] Fix dumped files invalidation by OPCache
2017-10-04 11:56:36 -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
3e8076023d [DI] Improve some deprecation messages 2017-10-04 19:15:30 +02:00
Nicolas Grekas
b7f1daabed bug #24418 [DI] Allow setting any public non-initialized services (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Allow setting any public non-initialized services

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

I think we went a but too far with this deprecation and that we should relax the rule: setting a pre-defined service is OK *if* it has not already been initialized.
This will allow setting them in test cases, as reported several times (see linked issues).

Commits
-------

d314b1f [DI] Allow setting any public non-initialized services
2017-10-04 13:52:46 +02:00
Nicolas Grekas
b1290da21b [Config] Fix dumped files invalidation by OPCache 2017-10-04 11:33:55 +02:00
Nicolas Grekas
fa24fa8a3c [Cache] Fix race condition in TagAwareAdapter 2017-10-04 09:58:49 +02:00
Nicolas Grekas
d314b1ff62 [DI] Allow setting any public non-initialized services 2017-10-04 09:45:46 +02:00
Christian Flothmann
dab72ab9a9 [Yaml] parse references on merge keys 2017-10-04 00:19:48 +02:00
Christian Flothmann
80af9b8562 treat trailing backslashes in multi-line strings 2017-10-03 23:07:44 +02:00
Christian Flothmann
b87a395025 Merge branch '2.8' into 3.3
* 2.8:
  fix tests
2017-10-03 15:33:10 +02:00
Nicolas Grekas
fc6b9ec67e Merge branch '2.7' into 2.8
* 2.7:
  fix tests
2017-10-02 10:46:46 +02:00
Nicolas Grekas
817f594f48 fix tests 2017-10-02 10:43:16 +02:00
Nicolas Grekas
7fa94dc846 fix merge 2017-10-02 09:25:00 +02:00
Nicolas Grekas
e36a69710e Merge branch '2.8' into 3.3
* 2.8:
  fix merge
2017-10-02 09:18:51 +02:00
Nicolas Grekas
ef4f532395 fix merge 2017-10-02 09:17:52 +02:00
Nicolas Grekas
09e512851f Fix in simple-phpunit script 2017-10-02 08:54:00 +02:00
Nicolas Grekas
a707bbf090 Merge branch '2.8' into 3.3
* 2.8: (22 commits)
  Tests and fix for issue in array model data in EntityType field with multiple=true
  [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  removed useless PHPDoc
  [Form] Fix FormInterface::submit() annotation
  PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
  HttpCache does not consider ESI resources in HEAD requests
  Fix translation for "This field was not expected"
  [Routing] Enhance Route(Collection) docblocks
  Added improvement for accuracy in MoneyToLocalizedStringTransformer.
  Removed unused private property
  Use correct verb form in the pull request template
  Use PHP_MAXPATHLEN in Filesystem.
  Added null as explicit return type (?TokenInterface)
  [FrameworkBundle] Fix Routing\DelegatingLoader
  Render all line breaks according to the exception message
  [Form] Fix phpdoc
  [DI] remove confusing code
  [Form] Fixed GroupSequence with "constraints" option
  [Validator] Clarify UUID validator behavior
  [Filesystem] Fixed makePathRelative
  ...
2017-10-02 08:42:24 +02:00
Nicolas Grekas
d4cbc70c50 Merge branch '2.7' into 2.8
* 2.7: (22 commits)
  Tests and fix for issue in array model data in EntityType field with multiple=true
  [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  removed useless PHPDoc
  [Form] Fix FormInterface::submit() annotation
  PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
  HttpCache does not consider ESI resources in HEAD requests
  Fix translation for "This field was not expected"
  [Routing] Enhance Route(Collection) docblocks
  Added improvement for accuracy in MoneyToLocalizedStringTransformer.
  Removed unused private property
  Use correct verb form in the pull request template
  Use PHP_MAXPATHLEN in Filesystem.
  Added null as explicit return type (?TokenInterface)
  [FrameworkBundle] Fix Routing\DelegatingLoader
  Render all line breaks according to the exception message
  [Form] Fix phpdoc
  [DI] remove confusing code
  [Form] Fixed GroupSequence with "constraints" option
  [Validator] Clarify UUID validator behavior
  [Filesystem] Fixed makePathRelative
  ...
2017-10-01 23:00: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
f6d001e5fe bug #24379 [PHPUnitBridge] don't remove when set to empty string (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[PHPUnitBridge] don't remove when set to  empty string

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

Fix a bug when passing empty string symfony/yaml and phpspec/prophecy

Commits
-------

722872f4c4 [PHPUnitBridge] don't remove when set to  empty string
2017-09-30 06:53:22 -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
Amrouche Hamza
722872f4c4
[PHPUnitBridge] don't remove when set to empty string 2017-09-29 20:45:30 +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
Nicolas Grekas
006380034e bug #24191 [DependencyInjection] include file and line number in deprecation (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[DependencyInjection] include file and line number in deprecation

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

In #23108 we removed line numbers from deprecation messages created by the YAML parser because those numbers were quite useless without the file being parsed. I suggest to revert this change and add the file being parsed to the deprecation message.

Commits
-------

cf03552 include file and line number in deprecation
2017-09-29 11:52:28 +02: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
Fabien Potencier
29433fa977 bug #24189 [Yaml] parse merge keys with PARSE_OBJECT_FOR_MAP flag (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] parse merge keys with PARSE_OBJECT_FOR_MAP flag

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

Commits
-------

534eaed7ae parse merge keys with PARSE_OBJECT_FOR_MAP flag
2017-09-28 16:05:04 -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
Christian Flothmann
cf03552033 include file and line number in deprecation 2017-09-28 16:22:01 +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