Commit Graph

19851 Commits

Author SHA1 Message Date
Nicolas Grekas
49fb0c033c Remove dead code 2017-01-12 20:18:32 +01:00
Grégoire Pineau
7f15bc39ea [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
The test suite does not pass locally because I use a custom
file_link_format. I do it because it works everywhere.

Then, Symfony tries to read this value before the default one.
We could use ini_set before the test but unfortunatelly there are no way
to define the "cfg_var". For recall, get_cfg_var allows to return the
configuration value even if the extension is not loaded. And again it's
my case: I don't enable xdebug to have better performance.
2017-01-12 19:58:07 +01:00
Fabien Potencier
5cf600dfbd bug #21218 [Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only (magnetik)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only

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

The `DateTimeToLocalizedStringTransformer` when used with a pattern that have only date (in `DateType` for instance) does not convert the result in the desired output

Reproduction steps:
- Use `DateType` in a form
- Set the `model_timezone` to `Pacific/Tahiti`, having default timezone to `Europe/Berlin`.
- Enter the date `2017-01-10`
- Submit the form
- Notice that the received data is `2017-01-10 00:00 Europe/Berlin`, whereas it should be `2017-01-10 11:00 Europe/Berlin`

Commits
-------

031d8c2c8b [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
2017-01-12 10:42:17 -08:00
Baptiste Lafontaine
031d8c2c8b [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date 2017-01-12 15:37:51 +01:00
Nicolas Grekas
d7bc68a3ed bug #21104 [FrameworkBundle] fix IPv6 address handling in server commands (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] fix IPv6 address handling in server commands

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

This fixes https://github.com/symfony/symfony/pull/21039#discussion_r93915788 as reported by @sstok for the existing commands by backporting @fabpot's patch from #21039.

Commits
-------

2bb4713 fix IPv6 address handling in server commands
2017-01-12 14:01:00 +01:00
Nicolas Grekas
4769ca2164 bug #20793 [Validator] Fix caching of constraints derived from non-serializable parents (uwej711)
This PR was squashed before being merged into the 2.7 branch (closes #20793).

Discussion
----------

[Validator] Fix caching of constraints derived from non-serializable parents

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

This change allows to still cache constraints even when an uncachable constraint (i.e. Callback)
is added to a parent class at runtime.

This is achived by caching only the constraints that are loaded for the class in question only
and merging parent and interface constraints after reading from cache.

Commits
-------

9dd6b0c [Validator] Fix caching of constraints derived from non-serializable parents
2017-01-12 13:52:00 +01:00
Uwe Jäger
9dd6b0cf64 [Validator] Fix caching of constraints derived from non-serializable parents 2017-01-12 13:51:22 +01:00
Fabien Potencier
17ce5f55d1 bug #19586 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account (wesleylancel)
This PR was squashed before being merged into the 2.7 branch (closes #19586).

Discussion
----------

[TwigBundle] Fix bug where namespaced paths don't take parent bundles in account

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

Currently namespaced paths for templates such as `{% extends '@App/Layout/layout.html.twig' %}` do not work with bundles that have overruled templates using the `getParent()` method in another bundle. See attached ticket. This change prepends the path of the bundle implementing `getParent()` to the paths of the namespace of bundle returned as a parent.

Commits
-------

0c77ce2355 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
2017-01-11 10:19:59 -08:00
Wesley Lancel
0c77ce2355 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account 2017-01-11 10:19:56 -08:00
Nicolas Grekas
5441e9bc90 [FrameworkBundle] Fix relative paths used as cache keys 2017-01-11 16:18:12 +01:00
Fabien Potencier
f83ad56b1b bug #21183 [Validator] respect groups when merging constraints (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] respect groups when merging constraints

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

Commits
-------

9a60057f42 respect groups when merging constraints
2017-01-10 07:40:08 -08:00
Nicolas Grekas
c5847696ea [DI] Add missing legacy group on testLegacy 2017-01-10 15:26:05 +01:00
Nicolas Grekas
f03073c103 bug #21179 [TwigBundle] Fixing regression in TwigEngine exception handling (Bertalan Attila)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fixing regression in TwigEngine exception handling

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

Fixing regression after #20831 in TwigEngine exception handling.

Commits
-------

390cb33 Fixing regression in TwigEngine exception handling.
2017-01-10 14:51:20 +01:00
Nicolas Grekas
d18c2cadfc minor #21226 Fix Container and PhpDumper test inaccuracies (nikita2206)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix Container and PhpDumper test inaccuracies

| 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        |

Stumbled upon and fixed some minor inaccuracies in tests for DI container, they might have lead to undetected changes of `Container`'s behavior

Commits
-------

24b93cc Fix Container and PhpDumper test inaccuracies
2017-01-10 14:43:59 +01:00
Nicolas Grekas
e355739b83 minor #21225 [DI] Dont share service when no id provided (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Dont share service when no id provided

| 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        | -

Commits
-------

814f633 [DI] Dont share service when no id provided
2017-01-10 14:43:16 +01:00
Nicolas Grekas
814f63390d [DI] Dont share service when no id provided 2017-01-10 14:32:11 +01:00
Nikita Nefedov
24b93cc75c Fix Container and PhpDumper test inaccuracies 2017-01-10 14:19:58 +03:00
Christian Flothmann
9a60057f42 respect groups when merging constraints 2017-01-10 10:32:28 +01:00
Maxime Steinhausser
101a165d0d [DI] Fix missing new line after private alias 2017-01-09 19:49:53 +01:00
Grégoire Pineau
3c887da4f3 [ClassLoader] Throw an exception if the cache is not writeable 2017-01-09 15:44:50 +01:00
Bertalan Attila
390cb335fa Fixing regression in TwigEngine exception handling. 2017-01-09 10:33:51 +01:00
Fabien Potencier
6aa98d163d [TwigBundle] fixed usage when Templating is not installed 2017-01-08 12:32:10 -08:00
Fabien Potencier
23294e59ca bug #21155 [Validator] Check cascasdedGroups for being countable (scaytrase)
This PR was squashed before being merged into the 2.7 branch (closes #21155).

Discussion
----------

[Validator] Check cascasdedGroups for being countable

Prevents notice for PHP 7.2

| 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        |

Just repeated for this place https://github.com/symfony/symfony/pull/20859
Waiting travis to fill in the `Tests pass` field

`cascasdedGroups` can be null at this point (according to failures and phpdoc)

Commits
-------

8fa45a130b [Validator] Check cascasdedGroups for being countable
2017-01-08 08:16:04 -08:00
Pavel Batanov
8fa45a130b [Validator] Check cascasdedGroups for being countable 2017-01-08 08:16:02 -08:00
Robin Chalas
dbc4148535
[Filesystem] Check that the directory is writable after created it in dumpFile() 2017-01-08 13:55:49 +01:00
Christian Flothmann
bd3a90a0c3 [Validator] do not guess getter method names 2017-01-07 09:40:27 +01:00
Fabien Potencier
182dd8f7e6 minor #20972 [HttpFoundation] Improved set cookie header tests (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #20972).

Discussion
----------

[HttpFoundation] Improved set cookie header tests

| Q             | A
| ------------- | ---
| Branch?       | 2.7 (already in master)
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Separated from #20569

Commits
-------

05bce71d7a [HttpFoundation] Improved set cookie header tests
2017-01-06 09:20:46 -08:00
Roland Franssen
05bce71d7a [HttpFoundation] Improved set cookie header tests 2017-01-06 09:20:45 -08:00
Nicolas Grekas
1038221d51 minor #21124 [Console] increased code coverage of Output classes (ShinDarth)
This PR was squashed before being merged into the 2.7 branch (closes #21124).

Discussion
----------

[Console] increased code coverage of Output classes

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

This PR increases the coverage of Output classes of the Console component from 80.81% to 94.95%

Commits
-------

ab4ba23 [Console] increased code coverage of Output classes
2017-01-06 14:13:12 +01:00
ShinDarth
ab4ba23931 [Console] increased code coverage of Output classes 2017-01-06 14:13:10 +01:00
Fabien Potencier
da88e6b1d7 bug #21113 [FrameworkBundle][HttpKernel] Fix resources loading for bundles with custom structure (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][HttpKernel] Fix resources loading for bundles with custom structure

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/18563
| License       | MIT
| Doc PR        |  n/a

This fixes twig/translator/validator/serializer resource loading for bundles overriding `Bundle::getPath()`, adding a kernel parameter containing the bundle metadata (i.e. `path`, `namespace` and `parent`).

Fixes #18563 and unlocks https://github.com/symfony/symfony/pull/19586

Commits
-------

fef3146b3b Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:50:28 -08:00
Robin Chalas
fef3146b3b
Fix serializer/translations/validator resources loading for bundles overriding getPath() 2017-01-04 20:27:15 +01:00
Nicolas Grekas
aae4f6d9e7 Minor fixes found while ugrading the CI 2017-01-03 16:43:07 +01:00
Fabien Potencier
942e0c1706 bug #21084 [Yaml] handle empty lines inside unindented collection (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] handle empty lines inside unindented collection

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

Commits
-------

bbfe6f73b5 handle empty lines inside unindented collection
2017-01-03 05:44:39 -08:00
Fabien Potencier
5fdf0e9a60 bug #20925 [HttpFoundation] Validate/cast cookie expire time (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Validate/cast cookie expire time

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Commits
-------

8215dbdb31 [HttpFoundation] Validate/cast cookie expire time
2017-01-02 19:24:33 -08:00
Fabien Potencier
9879c8193f updated LICENSE year 2017-01-02 12:30:00 -08:00
WouterJ
505e84d9f3 Fixed @return self with $this 2017-01-02 16:57:42 +01:00
Christian Flothmann
97b7fabf51 do not depend on a fixed date in layout tests
By default, the `DateType` as well as the `DateTimeType` set the choices
being available for the year to a range starting five years in the past.
After some time, this will make tests fail when the year of the fixed
date being used as the initial data is before the first year being part
of the choices.
2017-01-01 13:43:56 +01:00
HeahDude
9e0d531d36 [Form] Fixed DateType format option 2016-12-31 16:53:20 +01:00
Fabien Potencier
6699928cfd bug #21032 [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService

| 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        | -

Commits
-------

8227593 [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
2016-12-31 09:30:48 +01:00
Christian Flothmann
2bb47136df fix IPv6 address handling in server commands 2016-12-30 11:19:53 +01:00
Grégoire Pineau
c24269005b [Console] Escape default value when dumping help 2016-12-30 11:17:25 +01:00
Fabien Potencier
7e8e9e3a6e bug #21076 [Console] OS X Can't call cli_set_process_title php without superuser (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] OS X Can't call cli_set_process_title php without superuser

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

The console component test suite is failing on OS X (10.12.2) as the `cli_set_process_title` function seems not to be allowed to be called without superuser. It seems to be an OS X limitation.
At least, the test suite should pass and a warning should be shown when using the component with this feature on OS X.

---

refs:

- http://stackoverflow.com/questions/27803120/cannot-set-process-title-in-a-php-command-line-script-using-cli-set-process-titl
- https://github.com/liip/php-osx/issues/139
- https://github.com/zfcampus/zf-console/pull/22

Commits
-------

9928c0d [Console] OS X Can't call cli_set_process_title php without superuser
2016-12-30 09:19:58 +01:00
Maxime Steinhausser
9928c0d44e [Console] OS X Can't call cli_set_process_title php without superuser 2016-12-30 09:09:55 +01:00
Marcin Szepczynski
7a603df71d Polish translation improvement in Validator component 2016-12-29 22:17:52 +01:00
Roland Franssen
142416b7d4 [DI] Auto register extension configuration classes as a resource 2016-12-29 09:41:04 +00:00
Christian Flothmann
bbfe6f73b5 handle empty lines inside unindented collection 2016-12-28 19:56:06 +01:00
Nicolas Grekas
f1f5bff78f bug #20900 [Console] Descriptors should use Helper::strlen (ogizanagi)
This PR was squashed before being merged into the 2.7 branch (closes #20900).

Discussion
----------

[Console] Descriptors should use Helper::strlen

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

Commits
-------

8e9a5f8 [Console] Descriptors should use Helper::strlen
2016-12-28 09:27:59 +01:00
Maxime STEINHAUSSER
8e9a5f8009 [Console] Descriptors should use Helper::strlen 2016-12-28 09:27:57 +01:00
Nicolas Grekas
d85febc5f8 minor #21047 [Config] Improve PHPdoc / IDE autocomplete (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Improve PHPdoc / IDE autocomplete

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes-ish
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

The missing pieces for fixing the autocomplete in IDE's (tested in `PhpStorm 2016.3.2`).

Each method seems to be found now for the framework bundle configuration 😱

Actually uses #20923 where needed, but i think we should go with it consistently.

Relates to https://github.com/symfony/symfony/pull/20290#issuecomment-257303145

Commits
-------

3f3c6e0 [Config] Improve PHPdoc / IDE autocomplete
2016-12-28 09:11:03 +01:00
Roland Franssen
8215dbdb31 [HttpFoundation] Validate/cast cookie expire time 2016-12-27 23:08:58 +00:00
Roland Franssen
3f3c6e0e53 [Config] Improve PHPdoc / IDE autocomplete 2016-12-27 15:12:49 +00:00
Grégoire Pineau
18dfef1e2b [Debug] Wrap call to ->log in a try catch block
If something goes wrong in the logger, the application ends up
with a blank page. Let's display the original exception.
2016-12-27 15:50:31 +01:00
Nicolas Grekas
ee69018bf4 bug #21010 [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes (SpacePossum)
This PR was squashed before being merged into the 2.7 branch (closes #21010).

Discussion
----------

[Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes

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

When trying to call a method on an anonymous class (with or without methods) the `UndefinedMethodFatalErrorHandler` tries to iterate `null`.

For ref.: https://3v4l.org/l26u1

Commits
-------

ed713ae [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
2016-12-27 14:43:30 +01:00
SpacePossum
ed713aef2b [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes 2016-12-27 14:43:27 +01:00
Grégoire Pineau
8227593604 [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService 2016-12-27 11:44:08 +01:00
Fabien Potencier
eeb9192cf3 minor #21054 Fix @return statements to use $this or static when relevant (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix @return statements to use $this or static when relevant

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

see #20290

Commits
-------

3c0693d fixed @return when returning this or static
2016-12-27 11:38:09 +01:00
Fabien Potencier
3c0693de23 fixed @return when returning this or static 2016-12-27 08:23:47 +01:00
Fabien Potencier
2e0b61eaff bug #20859 Avoid warning in PHP 7.2 because of non-countable data (wouterj)
This PR was merged into the 2.7 branch.

Discussion
----------

Avoid warning in PHP 7.2 because of non-countable data

| 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        | -

Recently, the "[Counting of non-countable objects][1]" RFC was merged in PHP 7.2-dev. This means `count()` now causes a warning when passing anything that's not countable (e.g. `null` or `''`).

As PHP does not lazily execute conditions, `FormUtil::isEmtpy($data) || 0 === count($data)` will cause *both* conditions to be executed. This means `count($data)` errors when `$data` is empty.

Splitting it up in 2 statements avoids the warning being triggered in PHP 7.2.

See https://travis-ci.org/symfony-cmf/content-bundle/jobs/181815895 for a failing test caused by this bug.

 [1]: https://wiki.php.net/rfc/counting_non_countables

Commits
-------

94253e8 Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-26 12:09:56 +01:00
Christian Flothmann
8b281fe401 override property constraints in child class 2016-12-25 18:58:48 +01:00
Fabien Potencier
a4ac1a785e minor #20817 [Console] improved code coverage of Command class (ShinDarth)
This PR was squashed before being merged into the 2.7 branch (closes #20817).

Discussion
----------

[Console] improved code coverage of Command class

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

This PR increases the code coverage of the Command class from ``86.82%`` to ``96.90%``.

Commits
-------

d393113 [Console] improved code coverage of Command class
2016-12-23 21:36:17 +01:00
ShinDarth
d39311385f [Console] improved code coverage of Command class 2016-12-23 21:36:12 +01:00
Christian Flothmann
08e5747ce1 [TwigBridge] fix Twig 2.x compatibility 2016-12-23 12:20:51 +01:00
mlpo
442a304292 [Console] Updated phpdoc on return types 2016-12-23 02:05:25 +01:00
Fabien Potencier
0bb7eafba0 bug #20970 [Console] Fix question formatting using SymfonyStyle::ask() (chalasr, ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix question formatting using SymfonyStyle::ask()

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

Given
```php
$io = new SymfonyStyle($input, $output);
$io->ask('Do you want to use Foo\\Bar <comment>or</comment> Foo\\Baz\\?', 'Foo\\Bar');
```

Before output
![before](http://image.prntscr.com/image/af3806f866654deda2dec79b50d1ffa2.png)

After output
![after](http://image.prntscr.com/image/59c031d9e02949cebeae7a4734c7043f.png)

Commits
-------

e189183 [Console] SymfonyStyle: Escape trailing backslashes in user texts
9d46712 [Console] Fix question formatting using SymfonyStyle::ask()
2016-12-22 13:18:06 +01:00
Tarjei Huse
1255786811 Improve language
I suspect the file has been updated from the Danish translation and thus some of the sentences sound weird in Norwegian. Here's a suggested update.
2016-12-22 11:26:53 +01:00
Fabien Potencier
2f24e690f6 bug #20975 [Form] fix group sequence based validation (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fix group sequence based validation

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

Commits
-------

fb91f74 [Form] fix group sequence based validation
2016-12-19 17:50:42 +01:00
Fabien Potencier
71d059cad1 fixed obsolete getMock() usage 2016-12-19 16:22:46 +01:00
Maxime Steinhausser
e189183689 [Console] SymfonyStyle: Escape trailing backslashes in user texts 2016-12-19 11:07:02 +01:00
Roland Franssen
257a856f9f [WebProfilerBundle] Display multiple HTTP headers in WDT 2016-12-18 15:34:37 +00:00
Christian Flothmann
fb91f74b34 [Form] fix group sequence based validation 2016-12-17 23:43:59 +01:00
Fabien Potencier
3e874dc878 bug #20799 [TwigBundle] do not try to register incomplete definitions (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] do not try to register incomplete definitions

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

Commits
-------

2c9dc66 do not try to register incomplete definitions
2016-12-17 18:59:13 +01:00
Robin Chalas
9d46712103
[Console] Fix question formatting using SymfonyStyle::ask() 2016-12-17 14:04:43 +01:00
Fabien Potencier
0a4a92b05b bug #20961 [Validator] phpize default option values (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] phpize default option values

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

This makes the behavior for default constraints inline with the behavior
when the option is given explicitly.

Commits
-------

d65679b [Validator] phpize default option values
2016-12-17 08:46:09 +01:00
Fabien Potencier
2344c2204b bug #20934 [FrameworkBundle] Fix PHP form templates on translatable attributes (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix PHP form templates on translatable attributes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20365#issuecomment-267333293
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Separated from #20365

Commits
-------

10806e0 [FrameworkBundle] Fix PHP form templates on translatable attributes
2016-12-17 08:43:35 +01:00
Christian Flothmann
d65679b302 [Validator] phpize default option values
This makes the behavior for default constraints inline with the behavior
when the option is given explicitly.
2016-12-16 16:54:54 +01:00
Christian Flothmann
fb9b08396b test for the Validator component to be present 2016-12-16 14:02:12 +01:00
Maxime Steinhausser
e66d3da91a [DependencyInjection] Fix on-invalid attribute type in xsd 2016-12-15 15:48:03 +01:00
Roland Franssen
10806e056e [FrameworkBundle] Fix PHP form templates on translatable attributes 2016-12-15 14:04:46 +00:00
Nicolas Grekas
28ec36140d [VarDumper] Fix dumping by-ref variadics 2016-12-15 08:56:57 +01:00
Christian Flothmann
2c9dc66665 do not try to register incomplete definitions 2016-12-15 08:06:17 +01:00
Indra Gunawan
ca4c35164f [Validator] add Indonesian translation 2016-12-14 09:12:43 +01:00
Fabien Potencier
482e9edc50 bug #20734 [Security] AbstractVoter->supportsAttribute gives false positive if attribute is zero (0) (martynas-foodpanda)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] AbstractVoter->supportsAttribute gives false positive if attribute is zero (0)

| 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        |

Issue is easy to reproduce with test giving negative data set.
0 should not pass as supported attribute for any set of attributes but it does as in_array in the method does not use flag 'strict' set to true.

As this is abstract voter and is used by users with their code flag 'strict' should be set to true.
Since is there in 2.7 and 2.8 (LTS) IMHO it should be fixed.

Commits
-------

8306530 [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
2016-12-14 09:11:55 +01:00
Fabien Potencier
92423e77ac fixed CS 2016-12-14 09:03:29 +01:00
Michael Lee
b587a7294f [config] Fix issue when key removed and left value only
When a key attribute is mapped and the key is removed from the value array, if
only 'value' element is left in the array, it should replace its wrapper
array.

Assume the original value array is as follows (key attribute is 'id').

```php
array(
    'things' => array(
        array('id' => 'option1', 'value' => 'value1'),
        array('id' => 'option2', 'value' => 'value2')
    )
)
```

After normalized, the above shall be converted to the following array.

```php
array(
    'things' => array(
        'option1' => 'value1',
        'option2' => 'value2'
    )
)
```

It's also possible to mix 'value-only' and 'none-value-only' elements in
the array:

```php
array(
    'things' => array(
        array('id' => 'option1', 'value' => 'value1'),
        array('id' => 'option2', 'value' => 'value2', 'foo' => 'foo2')
    )
)
```

The above shall be converted to the following array.
```php
array(
    'things' => array(
        'option1' => 'value1',
        'option2' => array('value' => 'value2','foo' => 'foo2')
    )
)
```

The 'value' element can also be array:

```php
array(
    'things' => array(
        array(
            'id' => 'option1',
            'value' => array('foo'=>'foo1', 'bar' => 'bar1')
        )
    )
)
```
The above shall be converted to the following array.
```php
array(
    'things' => array(
        'option1' => array('foo' => 'foo1', 'bar' => 'bar1')
    )
)
```

When using VariableNode for value element, it's also possible to mix
different types of value elements:
```php
array(
    'things' => array(
        array('id' => 'option1', 'value' => array('foo'=>'foo1', 'bar' => 'bar1')),
        array('id' => 'option2', 'value' => 'value2')
    )
)
```

The above shall be converted to the following array.
```php
array(
    'things' => array(
        'option1' => array('foo'=>'foo1', 'bar' => 'bar1'),
        'option2' => 'value2'
    )
)
```

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15270
| License       | MIT
| Doc PR        | n/a
2016-12-14 09:02:51 +01:00
Fabien Potencier
7f85f6dc1e minor #20813 [Console] Review Application docblocks (ogizanagi)
This PR was squashed before being merged into the 2.7 branch (closes #20813).

Discussion
----------

[Console] Review Application docblocks

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

~I know there must be a lot of other places in the core where there is some repeated or useless informations in docblocks, but everytime I dig into the `Application` class, I see this, and I don't want to repeat things for consistency when adding new methods 😅  (for instance in #20808, the `setCatchThrowables / areThrowablesCaught ` methods do not need a docblock description IMHO).~

~This PR adapts docblocks where:~

- ~A docblock description is not required, as everything can be expressed in the `@return / @param` argument (the case mentioned above)~
- ~Information is redundant between description and tags, and the context does not have to be reminded again:~

```diff

    /**
     * Adds an array of command objects.
     *
     * If a Command is not enabled it will not be added.
     *
-     * @param Command[] $commands An array of commands
+     * @param Command[] $commands
     */
    public function addCommands(array $commands)
    {
        foreach ($commands as $command) {
            $this->add($command);
        }
    }
```

Commits
-------

d8c18cc [Console] Review Application docblocks
2016-12-13 16:27:53 +01:00
Maxime STEINHAUSSER
d8c18cc3cd [Console] Review Application docblocks 2016-12-13 16:27:52 +01:00
Fabien Potencier
f22a505629 bumped Symfony version to 2.7.23 2016-12-13 13:12:22 +01:00
Fabien Potencier
bdb6bf985f updated VERSION for 2.7.22 2016-12-13 11:53:27 +01:00
Fabien Potencier
708b9a2214 minor #20729 [Finder] Refine phpdoc about argument for NumberComparator (vlakoff)
This PR was merged into the 2.7 branch.

Discussion
----------

[Finder] Refine phpdoc about argument for NumberComparator

| 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        | -

The most important being the addition of "string" to `Finder::depth()`.

Commits
-------

9b9d339 [Finder] Refine phpdoc about argument for NumberComparator
2016-12-13 09:47:45 +01:00
Fabien Potencier
a495947447 minor #20849 Write an exception message in a one heading line (bocharsky-bw)
This PR was merged into the 2.7 branch.

Discussion
----------

Write an exception message in a one heading line

| 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        | -

It allows quickly `grep`-ing exception messages in console, for example:

```bash
curl localhost/any-path-which-throws-uncaught-exception | grep '<h1>'
```

But it's impossible to use `grep` filter when exception message goes on the next line after `<h1>` tag.

Commits
-------

21925da Write an exception message in a one heading line
2016-12-13 09:34:02 +01:00
Fabien Potencier
cd0bb3d528 bug #20714 [FrameworkBundle] Fix unresolved parameters from default configs in debug:config (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix unresolved parameters from default configs in debug:config

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

When using the `debug:config` command, if the dumped configuration is explicitly defined by the user, then parameters are properly resolved in the output. If it is not, and values come from the bundle default configuration directly, they are not.

Steps to reproduce:
- Checkout the symfony demo
- Run `debug:config twig`
- Look at the `debug` key, it is the `kernel.debug` parameter properly resolved: `true`
- Look at the `cache` key, it is not resolved: `'%kernel.cache_dir%/twig'`

This fixes it by resolving the configs once again after processing the configuration.
ping @weaverryan

Commits
-------

26f588a Fix unresolved parameters from default bundle configs in debug:config
2016-12-13 08:41:32 +01:00
WouterJ
94253e8a23 Only count on arrays or countables to avoid warnings in PHP 7.2 2016-12-10 19:18:03 +01:00
Fabien Potencier
3113f3f93f minor #20852 Skip test when iconv extension is missing (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

Skip test when iconv extension is missing

| 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
-------

ae7377d Skip test when iconv extension is missing
2016-12-10 15:23:12 +01:00
Fabien Potencier
a9d92748b5 bug #20442 [FrameworkBundle] Bundle commands are not available via find() (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Bundle commands are not available via find()

| 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        | -

The `Symfony\Bundle\FrameworkBundle\Console\Application::find()` method does not retrieve the bundle commands and only checks the ones that were added manually.

Commits
-------

dd69b88 Fix bundle commands are not available via find()
2016-12-10 15:19:05 +01:00
Julien Falque
ae7377d128
Skip test when iconv extension is missing 2016-12-09 19:19:27 +01:00
Victor Bocharsky
21925da88b Write an exception message in a one heading line 2016-12-09 17:28:59 +02:00
Christian Flothmann
292ae7c3eb [Config] fix dev dependencies 2016-12-09 09:40:53 +01:00
Fabien Potencier
be72520fc3 minor #20827 [Config] Do not skip YamlReferenceDumperTest entirely (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Do not skip YamlReferenceDumperTest entirely

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

The test is now completed in 3.2, but for older branch, any changes in the `YamlReferenceDumper` is not tested on travis and requires to test it manually or comment the `markTestIncomplete` line.

`assertEquals` should still be used on 3.2.

Commits
-------

1ed9335 [Config] Do not skip YamlReferenceDumperTest entirely
2016-12-09 08:38:58 +01:00
Fabien Potencier
42929dde2b minor #20826 [Config] Fix YamlReferenceDumper extra space (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Fix YamlReferenceDumper extra space

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes (minor rendering issue)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Simply fixes a minor rendering issue when using the `YamlReferenceDumper`.

<details>
<summary>For reference, see the difference with this fix on the framework configuration</summary>

```diff
diff --git a/framework_before.yml b/framework_after.yml
index f28ffd0..0486709 100644
--- a/framework1.txt
+++ b/framework2.txt
@@ -3,7 +3,7 @@ framework:
     secret:               ~

     # Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. Note: When using the HttpCache, you need to call the method in your front controller instead
-    http_method_override:  true
+    http_method_override: true
     trusted_proxies:      []
     ide:                  null
     test:                 ~
@@ -37,7 +37,7 @@ framework:
         enabled:              false
         collect:              true
         only_exceptions:      false
-        only_master_requests:  false
+        only_master_requests: false
         dsn:                  'file:%kernel.cache_dir%/profiler'
         matcher:
             enabled:              false
@@ -97,7 +97,7 @@ framework:
         save_path:            '%kernel.cache_dir%/sessions'

         # seconds to wait between 2 session metadata updates, it will also prevent the session handler to write if the session has not changed
-        metadata_update_threshold:  '0'
+        metadata_update_threshold: '0'

     # request configuration
     request:
@@ -110,7 +110,7 @@ framework:
     # templating configuration
     templating:
         enabled:              false
-        hinclude_default_template:  null
+        hinclude_default_template: null
         cache:                ~
         form:
             resources:
@@ -180,7 +180,7 @@ framework:
     # Property access configuration
     property_access:
         magic_call:           false
-        throw_exception_on_invalid_index:  false
+        throw_exception_on_invalid_index: false

     # Property info configuration
     property_info:
@@ -198,9 +198,9 @@ framework:
         # System related cache pools configuration
         system:               cache.adapter.system
         directory:            '%kernel.cache_dir%/pools'
-        default_doctrine_provider:  ~
-        default_psr6_provider:  ~
-        default_redis_provider:  'redis://localhost'
+        default_doctrine_provider: ~
+        default_psr6_provider: ~
+        default_redis_provider: 'redis://localhost'
         pools:

             # Prototype
```
</details>

---

(tests failures are unrelated)

Commits
-------

685a9b9 [Config] Fix YamlReferenceDumper extra space
2016-12-09 08:35:05 +01:00
Fabien Potencier
d9738a497d bug #20840 [WebProfilerBundle] add dependency on Twig (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] add dependency on Twig

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

Requiring a specific minimum version of the TwigBridge just to be sure
that we end up with the required Twig version does not make much sense
if can simply specify the required version instead (we do in fact depend
on Twig in the WebProfilerBundle).

Commits
-------

91689a7 add dependency on Twig
2016-12-09 08:33:13 +01:00
Christian Flothmann
91689a7961 add dependency on Twig
Requiring a specific minimum version of the TwigBridge just to be sure
that we end up with the required Twig version does not make much sense
if can simply specify the required version instead (we do in fact depend
on Twig in the WebProfilerBundle).
2016-12-09 07:11:54 +01:00
Nicolas Grekas
56c3eef724 minor #20832 [WebProfilerBundle] Fix whitespace control in layout.html.twig (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Fix whitespace control in layout.html.twig

| 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
-------

d052fa9 [WebProfilerBundle] Fix whitespace control in layout.html.twig
2016-12-08 16:57:52 +01:00
Nicolas Grekas
0aa80f25d7 bug #20828 [Validator] Fix init of YamlFileLoader::$classes for empty files (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Fix init of YamlFileLoader::$classes for empty files

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

Commits
-------

073a1da [Validator] Fix init of YamlFileLoader::$classes for empty files
2016-12-08 16:57:04 +01:00
Nicolas Grekas
d052fa933c [WebProfilerBundle] Fix whitespace control in layout.html.twig 2016-12-08 16:53:03 +01:00
Nicolas Grekas
28a0be8a4f bug #20539 Cast result to int before adding to it (alcaeus)
This PR was merged into the 2.7 branch.

Discussion
----------

Cast result to int before adding to it

| 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        |

This fixes the occasional warning about non-numeric values when using PHP 7.1.

Commits
-------

70c42f2 Cast result to int before adding to it
2016-12-08 15:35:57 +01:00
Nicolas Grekas
9218cacf31 [Twig] Fix deprecations with Twig 1.29 2016-12-08 15:02:33 +01:00
Nicolas Grekas
073a1dae13 [Validator] Fix init of YamlFileLoader::$classes for empty files 2016-12-08 13:07:24 +01:00
Maxime STEINHAUSSER
1ed9335e88 [Config] Do not skip YamlReferenceDumperTest entirely 2016-12-08 11:59:24 +01:00
Maxime STEINHAUSSER
685a9b9d9a [Config] Fix YamlReferenceDumper extra space 2016-12-08 11:42:33 +01:00
Fabien Potencier
7a07c1b464 minor #20800 [Security] fix the docblock in regard to the role argument (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] fix the docblock in regard to the role argument

| 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        |

Makes the docblocks consistent with the `UserInterface` since #17525.

Commits
-------

4e563ae fix the docblock in regard to the role argument
2016-12-07 09:06:36 +01:00
Christian Flothmann
4e563aee02 fix the docblock in regard to the role argument 2016-12-06 21:51:50 +01:00
ShinDarth
488ebbfe5d [VarDumper] fix tests when xdebug is enabled 2016-12-06 17:03:37 +01:00
Nicolas Grekas
bfe149fdc6 [Cache] Fix dumping SplDoublyLinkedList iter mode 2016-12-05 18:21:04 +01:00
Fabien Potencier
f9bceb832f bug #20736 [Console] fixed PHP7 Errors when not using Dispatcher (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #20736).

Discussion
----------

[Console] fixed PHP7 Errors when not using Dispatcher

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17257, #20110, #20111
| License       | MIT
| Doc PR        | n/a

Original fix, #19813, works only when there is event dispatcher available.
This PR fix the issue also for scenario without event dispatcher.

Closes #20110 issue and #20111 PR connected to it.
Closing #17257 , as everywhere the error is converted to exception and it should be handled

Commits
-------

899fa79 [Console] fixed PHP7 Errors when not using Dispatcher
2016-12-05 14:00:59 +01:00
Dariusz Ruminski
899fa7936b [Console] fixed PHP7 Errors when not using Dispatcher 2016-12-05 14:00:57 +01:00
Iltar van der Berg
d1a7164626 Regression test for missing controller arguments 2016-12-05 08:37:23 +01:00
Martynas Narbutas
8306530e60 [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0) 2016-12-03 15:43:25 +01:00
Christian Flothmann
aea0478451 fix a test checking for a value 2016-12-03 14:58:39 +01:00
Fabien Potencier
7ef0951daf bug #20418 [Form][DX] FileType "multiple" fixes (yceruto)
This PR was squashed before being merged into the 2.7 branch (closes #20418).

Discussion
----------

[Form][DX] FileType "multiple" fixes

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

# (1st) Derive "data_class" option from passed "multiple" option

Information
-------------

Following this tutorial ["How to Upload Files"][1] but storing many `brochures` instead of one, i.e.:

```php
// src/AppBundle/Entity/Product.php

class Product
{
    /**
     * @var string[]
     *
     * @ORM\Column(type="array")
     */
    private $brochures;

    //...
}
```

```php
//src/AppBundle/Form/ProductType.php

$builder->add('brochures', FileType::class, array(
    'label' => 'Brochures (PDF files)',
    'multiple' => true,
));
```

The Problem
--------------

I found a pain point here when the form is loaded again after save some brochures (Exception):

> The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is a(n) array. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms a(n) array to an instance of Symfony\Component\HttpFoundation\File\File.

The message is very clear, but counter-intuitive in this case, because the form field (`FileType`) was configured with `multiple = true`, so IMHO it shouldn't expect a `File` instance but an array of them at all events.

The PR's effect
---------------

**Before:**

```php
$form = $this->createFormBuilder($product)
    ->add('brochures', FileType::class, [
        'multiple' => true,
	'data_class' => null, // <---- mandatory
    ])
    ->getForm();
```

**After:**

```php
$form = $this->createFormBuilder($product)
    ->add('brochures', FileType::class, [
        'multiple' => true,
    ])
    ->getForm();
```

# (2nd) Return empty `array()` at submit no file

Information
-------------

Based on the same information before, but adding some constraints:

```php
// src/AppBundle/Entity/Product.php

use Symfony\Component\Validator\Constraints as Assert;

class Product
{
    /**
     * @var string[]
     *
     * @ORM\Column(type="array")
     *
     * @Assert\Count(min="1") // or @Assert\NotBlank()
     * @Assert\All({
     *     @Assert\File(mimeTypes = {"application/pdf", "application/x-pdf"})
     * })
     *
     */
    private $brochures;
}
```

This should require at least one file to be stored.

The Problem
--------------

But, when no file is uploaded at submit the form, it's valid completely. The submitted data for this field was `array(null)` so the constraints pass without any problem:

* `@Assert\Count(min="1")` pass! because contains at least one element (No matter what)
* `@Assert\NotBlank()` it could pass! because no `false` and no `empty()`
* `@Assert\File()` pass! because the element is `null`

Apart from that really we expecting an empty array instead.

The PR's effect
----------------

**Before:**

```php
// src/AppBundle/Entity/Product.php

use Symfony\Component\Validator\Constraints as Assert;

class Product
{
    /**
     * @var string[]
     *
     * @ORM\Column(type="array")
     *
     * @Assert\All({
     *     @Assert\NotBlank,
     *     @Assert\File(mimeTypes = {"application/pdf", "application/x-pdf"})
     * })
     *
     */
    private $brochures;
}
```

**After:**

```php
// src/AppBundle/Entity/Product.php

use Symfony\Component\Validator\Constraints as Assert;

class Product
{
    /**
     * @var string[]
     *
     * @ORM\Column(type="array")
     *
     * @Assert\Count(min="1") // or @Assert\NotBlank
     * @Assert\All({
     *     @Assert\File(mimeTypes = {"application/pdf", "application/x-pdf"})
     * })
     *
     */
    private $brochures;
}
```

  [1]: http://symfony.com/doc/current/controller/upload_file.html

Commits
-------

36b7ba6 [Form][DX] FileType "multiple" fixes
2016-12-03 12:33:29 +01:00
Yonel Ceruto
36b7ba64f4 [Form][DX] FileType "multiple" fixes 2016-12-03 12:33:12 +01:00
Fabien Potencier
fe15381a45 minor #20425 [Form] fixed "empty_value" option deprecation (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fixed "empty_value" option deprecation

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

I didn't make any profiling but a resolver instance is passed to `configureOptions()` creating locale variables including those exceptions for each field using one of the patched form types, so I guess the memory usage can grow really fast.

Commits
-------

7e84907 [Form] fixed "empty_value" option deprecation
2016-12-03 11:52:40 +01:00
Fabien Potencier
5f62f01943 fixed CS 2016-12-03 11:50:08 +01:00
Fabien Potencier
4a7fbdde5a bug #19902 [DependencyInjection] PhpDumper.php: hasReference() shouldn't search references in lazy service. (antanas-arvasevicius)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] PhpDumper.php: hasReference() shouldn't search references in lazy service.

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

more info:
https://github.com/symfony/symfony/issues/19901

Commits
-------

595a978 [DependencyInjection] PhpDumper.php: hasReference() should not search references in lazy service arguments.
2016-12-03 11:48:01 +01:00
vlakoff
9b9d33959c [Finder] Refine phpdoc about argument for NumberComparator 2016-12-03 06:31:03 +01:00
Fabien Potencier
5f4d8e9441 bug #20704 [Console] Fix wrong handling of multiline arg/opt descriptions (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix wrong handling of multiline arg/opt descriptions

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

### Before

<img width="1072" alt="screenshot 2016-11-30 a 19 23 17" src="https://cloud.githubusercontent.com/assets/2211145/20765428/8b622304-b732-11e6-911b-b169e9aed5fd.PNG">

### After

<img width="1074" alt="screenshot 2016-11-30 a 19 23 46" src="https://cloud.githubusercontent.com/assets/2211145/20765432/9159a53e-b732-11e6-909f-ec8107c78fed.PNG">

@rquadling and @leofeyer deserve the credit for reporting the issue and suggesting the proper fix. I've only executed it.

---

<details>
<summary>Show code to reproduce:</summary>

```php
<?php

use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

require __DIR__.'/../vendor/autoload.php';

(new Application())
    ->add(new class extends Command {
        protected function configure()
        {
            $description = "One of:" . array_reduce(['purge', 'truncate', 'delete', 'insert', 'select'], function ($value, $previous = '') {
                    return "$value\n- $previous";
            });

            $this
                ->setName('execute')
                ->addArgument('action', InputArgument::REQUIRED, $description)
                ->addOption('another-one', 'a', InputOption::VALUE_OPTIONAL, $description)
            ;
        }
    })
    ->getApplication()
    ->run(new ArgvInput())
;
```
</details>

Commits
-------

18fc6b5 [Console] Fix wrong handling of multiline arg/opt descriptions
2016-12-02 12:53:31 +01:00
Maxime STEINHAUSSER
2c818193c1 [TwigBundle] Fix twig loader registered twice 2016-12-02 12:00:53 +01:00
Robin Chalas
26f588a7b5 Fix unresolved parameters from default bundle configs in debug:config 2016-12-01 15:23:59 +01:00
Maxime Steinhausser
18fc6b54da [Console] Fix wrong handling of multiline arg/opt descriptions 2016-11-30 19:39:48 +01:00
Nicolas Grekas
c360a222ef bug #20671 [Config] ConfigCache::isFresh() should return false when unserialize() fails (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] ConfigCache::isFresh() should return false when unserialize() fails

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

Removes some `Warning: Class __PHP_Incomplete_Class has no unserializer` failures when clearing the cache.

Commits
-------

609245e [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
2016-11-29 11:51:46 +01:00
Nicolas Grekas
609245e953 [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class 2016-11-29 11:39:48 +01:00
Nicolas Grekas
6d1f1b5d4a [ClassLoader] Use only forward slashes in generated class map 2016-11-29 09:16:08 +01:00
Fabien Potencier
ec937cbcd9 bug #20664 [Validator] ensure the proper context for nested validations (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] ensure the proper context for nested validations

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

Commits
-------

56c8ff8 ensure the proper context for nested validations
2016-11-29 09:13:44 +01:00
Antanas Arvasevicius
595a9781e2 [DependencyInjection] PhpDumper.php: hasReference() should not search references in lazy service arguments. 2016-11-28 16:07:09 +02:00
Christian Flothmann
56c8ff8b21 ensure the proper context for nested validations 2016-11-28 10:01:58 +01:00
Jerzy Zawadzki
73cf796029 bug #20653 [WebProfilerBundle] Profiler includes ghost panels 2016-11-27 21:52:05 +00:00
Robin Chalas
2699009770
[HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable 2016-11-25 23:28:18 +01:00
Jules Pietri
7e8490715c [Form] fixed "empty_value" option deprecation 2016-11-25 20:10:28 +01:00
Andreas Braun
70c42f2676
Cast result to int before adding to it
This fixes the occasional warning about non-numeric values when using PHP 7.1
2016-11-25 15:42:00 +01:00
Nicolas Grekas
e62b602dc4 bug #20374 [FrameworkBundle] Improve performance of ControllerNameParser (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Improve performance of ControllerNameParser

| 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        |

Today I was searching for bottlenecks in my application using Blackfire. And among other things I found one in Symfony. Blackfire showed that `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser::findAlternative()` was called almost 300 times which took 28 miliseconds.

It turns out that `Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader::load()` is calling `ControllerNameParser::parse()` without actually needing to do so because `$controller` is in the class::method notation already. `ControllerNameParser` threw an exception, DelegatingLoader caught and ignored it - that's ok. The problem is that generating the exception message took a lot of time because findAlternative is slow. In my case it called the levenshtein function over 5000 times which was completely useless because the exception is ignored anyway.

Commits
-------

cf333f3 [FrameworkBundle] Improve performance of ControllerNameParser
2016-11-25 13:12:15 +01:00
Nicolas Grekas
8c2a77bbca bug #20474 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name (fancyweb)
This PR was squashed before being merged into the 2.7 branch (closes #20474).

Discussion
----------

[Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name

| 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        | https://github.com/symfony/symfony-docs/pull/7139

This is a follow up PR to https://github.com/symfony/symfony/pull/20327.

I also decided to improve the current `is_numeric()` check that is done by a truer one. The current limitation is that a PCRE subpattern name must not start with a digit which is different.

Commits
-------

73fbd08 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
2016-11-25 13:07:11 +01:00
Thomas Calvet
73fbd085f1 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name 2016-11-25 13:06:46 +01:00
Jáchym Toušek
cf333f32c5 [FrameworkBundle] Improve performance of ControllerNameParser 2016-11-25 12:34:09 +01:00
Nicolas Grekas
b550d7ebd8 minor #20587 [SecurityBundle] Fix complete config tests (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Fix complete config tests

| 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        | -

Fixes a little bug in `*CompleteConfigurationTest`: if a test fails for one format, subsequent tests for other formats will also fail. This is because subsequent tests actually use the container built from the very first tested config, which is PHP if all tests are ran.

This can be reproduced by changing a value in the PHP config fixtures. `PhpCompleteConfigurationTest` will fail as expected but `XmlCompleteConfigurationTest` and `YamlCompleteConfigurationTest` will fail too, which is not expected.

Commits
-------

b25c1d3 Fix complete config tests
2016-11-25 11:43:47 +01:00
Alexandru Bucur
25a629419a Update documentation link to the component
Update documentation link to the component since it has standalone examples
2016-11-25 11:12:25 +01:00
Nicolas Grekas
821e7bbe7e minor #20622 [WebProfilerBundle] Dont use request attributes in RouterController (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Dont use request attributes in RouterController

| 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        | -

As spotted in #20621, it makes little sense to use request attributes here, and if it were to have, the current code is broken because the returned values here have already been processed by ValueExporter in RequestDataCollector.

Commits
-------

962325a [WebProfilerBundle] Dont use request attributes in RouterController
2016-11-25 11:10:06 +01:00
Nicolas Grekas
bbddeec6d9 minor #20630 [HttpFoundation] Add links to RFC-7231 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Add links to RFC-7231

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

ping @xabbuh

Commits
-------

c17a85b [HttpFoundation] Add links to RFC-7231
2016-11-25 11:09:18 +01:00
Nicolas Grekas
7b33c0906b minor #20626 Tag missing internals (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

Tag missing internals

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

Commits
-------

97e94b4 Tag missing internals
2016-11-25 11:02:25 +01:00
Nicolas Grekas
c17a85beff [HttpFoundation] Add links to RFC-7231 2016-11-25 10:58:59 +01:00
Nicolas Grekas
e62a390ff5 bug #20566 [DI] Initialize properties before method calls (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #20566).

Discussion
----------

[DI] Initialize properties before method calls

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes-ish
| New feature?  | no
| BC breaks?    | not sure
| Deprecations? | no
| Tests pass?   | not yet (only dumps seem to fail)
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Given

```yml
services:
    handler:
        class: AppBundle\Handler
        properties:
            debug: '%kernel.debug%'
        calls:
            - [handle]
```

I totally expected `Handler::$debug` to be set before `Handler::handle` is called. It was not..  and it's really annoying :)

Commits
-------

0af433b [DI] Initialize properties before method calls
2016-11-25 10:44:34 +01:00
Roland Franssen
0af433b01f [DI] Initialize properties before method calls 2016-11-25 10:44:31 +01:00
Maxime Steinhausser
97e94b4019 Tag missing internals 2016-11-25 08:43:06 +01:00
Nicolas Grekas
962325a54e [WebProfilerBundle] Dont use request attributes in RouterController 2016-11-24 18:44:53 +01:00
Nicolas Grekas
3eb8a342f5 bug #20609 [DI] Fixed custom services definition BC break introduced in ec7e70fb… (kiler129)
This PR was squashed before being merged into the 2.7 branch (closes #20609).

Discussion
----------

[DI] Fixed custom services definition BC break introduced in ec7e70fb…

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no, fixes previous BC
| Deprecations? | no
| Tests pass?   | yes (verified on Win only)
| Fixed tickets | #20608
| License       | MIT
| Doc PR        | -

Commits
-------

7a5e11e [DI] Fixed custom services definition BC break introduced in ec7e70fb…
2016-11-24 11:37:50 +01:00
kiler129
7a5e11eb12 [DI] Fixed custom services definition BC break introduced in ec7e70fb… 2016-11-24 11:34:23 +01:00
Fabien Potencier
af9c279e23 bug #20598 [DI] Aliases should preserve the aliased invalid behavior (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Aliases should preserve the aliased invalid behavior

| 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        | -

Commits
-------

7752308 [DI] Aliases should preserve the aliased invalid behavior
2016-11-23 17:13:15 -08:00
Fabien Potencier
34b9fd681e bug #20602 [HttpKernel] Revert BC breaking change of Request::isMethodSafe() (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Revert BC breaking change of Request::isMethodSafe()

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes (reverting a previous BC break)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20562
| License       | MIT
| Doc PR        | -

As spotted in #20562, we should not have broken a minor version. Instead, we should have deprecated the bad behavior. This is done in #20603.

Commits
-------

0c3b7d7 [HttpKernel] Revert BC breaking change of Request::isMethodSafe()
2016-11-23 16:42:12 -08:00
Maxime Steinhausser
412fbe613f [DI] minor FileLoaders tests update 2016-11-23 22:37:45 +01:00
Nicolas Grekas
0c3b7d7b8d [HttpKernel] Revert BC breaking change of Request::isMethodSafe() 2016-11-23 14:53:57 +01:00
Nicolas Grekas
7752308c96 [DI] Aliases should preserve the aliased invalid behavior 2016-11-22 19:19:49 +01:00
Fabien Potencier
30d161c0ae bug #20499 [Doctrine][Form] support large integers (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Doctrine][Form] support large integers

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

Commits
-------

6954a07 [Doctrine][Form] support large integers
2016-11-21 16:16:03 -08:00
Imangazaliev
6c3150df63 [DOMCrawler] Bug fixed 2016-11-21 16:09:36 -08:00
Fabien Potencier
7047e4d31f bug #20576 [Process] Do feat test before enabling TTY mode (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Do feat test before enabling TTY mode

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

Commits
-------

69bfbbf [Process] Do feat test before enabling TTY mode
2016-11-21 15:59:43 -08:00
Julien Falque
b25c1d30f6
Fix complete config tests 2016-11-21 23:48:35 +01:00
Nicolas Grekas
69bfbbf8c2 [Process] Do feat test before enabling TTY mode 2016-11-21 10:47:03 +01:00
Fabien Potencier
2af58be68f bumped Symfony version to 2.7.22 2016-11-20 18:19:38 -08:00
Fabien Potencier
dec83adc4b updated VERSION for 2.7.21 2016-11-20 17:12:54 -08:00
Nicolas Grekas
e968d0ff5d minor #20551 [ci] Testing with UTC hides bugs (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[ci] Testing with UTC hides bugs

| 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        | -

As shown by #20550, we're having bugs because we don't in proper TZ conditions.
Let's do Europe on Travis, and America on Windows.

Commits
-------

e0f9bda [ci] Testing with UTC hides bugs
2016-11-18 15:46:21 -05:00
Nicolas Grekas
e0f9bda49a [ci] Testing with UTC hides bugs 2016-11-18 15:26:45 -05:00
Fabien Potencier
015fe87266 bug #20543 [DI] Fix error when trying to resolve a DefinitionDecorator (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix error when trying to resolve a DefinitionDecorator

| 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        | -

Instead of the currently obscure `ReflectionException: Class does not exist` message, let's throw a useful error message.

Commits
-------

8e0da2f [DI] Fix error when trying to resolve a DefinitionDecorator
2016-11-17 11:18:58 -05:00
Fabien Potencier
d34333f41d minor #20531 [Validator] improve and added more Indonesian translation. (IndraGunawan)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] improve and added more Indonesian translation.

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

- Improve some translation's grammar.
- Added translation unit no. 73 - 80.

Commits
-------

af9016f [Validator] improve and added more Indonesian translation.
2016-11-17 10:46:31 -05:00
Nicolas Grekas
8e0da2f39e [DI] Fix error when trying to resolve a DefinitionDecorator 2016-11-17 06:21:23 -05:00
Fabien Potencier
ef40651dd3 bug #20484 bumped min version of Twig to 1.28 (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

bumped min version of Twig to 1.28

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see twigphp/Twig#2236
| License       | MIT
| Doc PR        | n/a

Commits
-------

b8f7614 bumped min version of Twig to 1.28
2016-11-16 17:10:58 -05:00
Indra Gunawan
af9016fa27 [Validator] improve and added more Indonesian translation. 2016-11-16 16:46:48 +07:00
Fabien Potencier
a1afa21a8c minor #20506 DX: replace @link with @see annotation (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

DX: replace @link with @see annotation

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

Just to standardise.

```console
λ grep -r "* @see " src | wc -l
    360

λ grep -r "* @link " src | wc -l
     12
```

Commits
-------

f7326c1 DX: replace @link with @see annotation
2016-11-15 18:00:43 -05:00
Nicolas Grekas
0221ffcb8f bug #20519 [Debug] Remove GLOBALS from exception context to avoid endless recursion (Seldaek)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Remove GLOBALS from exception context to avoid endless recursion

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

This fixes a endless recursion as seen in https://github.com/felixfbecker/php-language-server/pull/137 - it only happens if you trigger an error in the global context so it's kinda hard to write a test for, but hopefully the fix can be accepted.

Commits
-------

1bb95ac [Debug] Remove GLOBALS from exception context to avoid endless recursion
2016-11-15 07:52:31 -05:00
Jordi Boggiano
1bb95acb84 [Debug] Remove GLOBALS from exception context to avoid endless recursion 2016-11-15 13:37:17 +01:00
Giorgio Premi
a60cd15850 [ClassLoader] Fix ClassCollectionLoader inlining with __halt_compiler 2016-11-15 04:22:02 -05:00
Christian Flothmann
1f1539579c [TwigBridge] fix tests
Adapt tests for null coalescing support from twigphp/Twig#2238.
2016-11-14 09:34:35 +01:00
Dariusz Ruminski
f7326c15d8 DX: replace @link with @see annotation 2016-11-13 18:41:36 +01:00
Fabien Potencier
b8f7614388 bumped min version of Twig to 1.28 2016-11-12 09:04:32 -08:00
Fabien Potencier
6648615081 minor #20500 Tag the FormFieldRegistry as being internal (stof)
This PR was merged into the 2.7 branch.

Discussion
----------

Tag the FormFieldRegistry as being internal

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

The phpdoc already describes it as being internal (since it was introduced). This adds the proper tag to mark it as internal in our standard way.

Commits
-------

0801f97 Tag the FormFieldRegistry as being internal
2016-11-12 07:52:13 -08:00
Christophe Coevoet
0801f9723b Tag the FormFieldRegistry as being internal 2016-11-12 16:48:22 +01:00
Fabien Potencier
edf5d715e3 bug #20307 [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds (LuisDeimos)
This PR was squashed before being merged into the 2.7 branch (closes #20307).

Discussion
----------

[Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds

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

Fix: When using a form with an Time type with option 'widget' => 'single_text', and 0 is selected in the seconds, we obtain an TransformationFailedException "Unable to reverse value for property path "[time]": Data missing". Check ticket #20304

Commits
-------

bcb03e0 [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds
2016-11-12 07:33:13 -08:00
Luis Ramírez +Deimos+
bcb03e0a39 [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds 2016-11-12 07:33:12 -08:00
Christian Flothmann
6954a07191 [Doctrine][Form] support large integers 2016-11-12 12:47:36 +01:00
Tobias Nyholm
f3fede2e83 [Validator] Added missing swedish translation 2016-11-10 13:05:13 -08:00
Fabien Potencier
3594877f75 bug #20466 [Translation] fixed nested fallback catalogue using multiple locales. (aitboudad)
This PR was merged into the 2.7 branch.

Discussion
----------

[Translation] fixed nested fallback catalogue  using multiple locales.

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

Commits
-------

bac217d [Translation] fixed nested fallback catalogue  using multiple locales.
2016-11-09 14:55:02 -08:00
Fabien Potencier
6953f4f779 minor #20444 [YAML] PHPDoc fixes for inline parser/dumper (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[YAML] PHPDoc fixes for inline parser/dumper

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Commits
-------

dd47295 fixed phpdoc
2016-11-09 14:52:56 -08:00
Abdellatif Ait boudad
31deea1d3d [TranslationDebug] workaround for getFallbackLocales. 2016-11-09 20:23:10 +00:00
Abdellatif Ait boudad
bac217dd83 [Translation] fixed nested fallback catalogue using multiple locales. 2016-11-09 19:27:17 +00:00
Roland Franssen
dd47295c15 fixed phpdoc 2016-11-09 17:27:48 +00:00
Karim Miladi
5a1bf6aa6e [Command] Fixed method comments as phpDoc syntax 2016-11-09 08:10:25 -08:00
Julien Falque
dd69b8875d
Fix bundle commands are not available via find() 2016-11-07 20:38:43 +01:00
Christian Flothmann
adbc529b7b prefer getSourceContext() over getSource() 2016-11-07 19:42:43 +01:00
Fabien Potencier
589d019f2e minor #20433 Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)" (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)"

| 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/20184#discussion_r85265689
| License       | MIT
| Doc PR        | n/a

This reverts commit 3f650f8 because the fix is not valid.
It is actually not possible to have an option with value optional given empty to be `empty` if this one has a default value. The default value will always be the one returned, see https://github.com/symfony/symfony/pull/20184#discussion_r85265689 for details.

Commits
-------

b2fa7c4 Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)"
2016-11-07 07:14:01 -08:00
Fabien Potencier
fd1ee25ebd minor #20275 [HttpFoundation] Avoid implicit null to array conversion in request matcher (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #20275).

Discussion
----------

[HttpFoundation] Avoid implicit null to array conversion in request matcher

| Q | A |
| --- | --- |
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any |
| License | MIT |
| Doc PR | reference to the documentation PR, if any |

`null` is allowed _and_ passed as default value from the constructor. Lets be explicit.

Commits
-------

a2c0a78 [HttpFoundation] Avoid implicit null to array conversion in request matcher
2016-11-07 07:11:09 -08:00
Roland Franssen
a2c0a785c2 [HttpFoundation] Avoid implicit null to array conversion in request matcher 2016-11-07 07:11:08 -08:00
Robin Chalas
b2fa7c4f07 Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)"
This reverts commit 3f650f864c, reversing
changes made to 962248dbd9.
2016-11-07 13:32:19 +01:00
Fabien Potencier
8668aec34e minor #20421 Twig deprecation removal (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Twig deprecation removal

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

Commits
-------

eb0d6c9 removed a deprecation notice
2016-11-06 08:13:45 -08:00