Commit Graph

25909 Commits

Author SHA1 Message Date
Fabien Potencier ed70281d49 Merge branch '2.7' into 2.8
* 2.7:
  updated LICENSE year
  Fixed `@return self` with `$this`
2017-01-02 12:30:24 -08:00
Fabien Potencier 9879c8193f updated LICENSE year 2017-01-02 12:30:00 -08:00
Nicolas Grekas 0507d4a657 minor #21137 Fixed `@return self` with `$this` in FormConfigBuilderInterface (wouterj)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixed `@return self` with `$this` in FormConfigBuilderInterface

| 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 tiny bug introduced by https://github.com/symfony/symfony/pull/21054 . `FormConfigBuilder` methods actually return `$this` and not `self`. This is important, as the `FormBuilder` (extending `FormConfigBuilder`) methods can also be called (e.g. `$builder->setDataMapper(...)->add()` is perfectly possible).

Commits
-------

505e84d Fixed `@return self` with `$this`
2017-01-02 17:29:15 +01:00
Nicolas Grekas b47915c34e [Form] Fix forward compat of AbstractLayoutTest 2017-01-02 17:04:05 +01:00
WouterJ 505e84d9f3 Fixed `@return self` with `$this` 2017-01-02 16:57:42 +01:00
Nicolas Grekas 23590eb51a Merge branch '2.7' into 2.8
* 2.7:
  do not depend on a fixed date in layout tests
  [Console] Escape default value when dumping help
  [Console] OS X Can't call cli_set_process_title php without superuser
  Polish translation improvement in Validator component
  [Console] Descriptors should use Helper::strlen
  [Config] Improve PHPdoc / IDE autocomplete
  [Debug] Wrap call to ->log in a try catch block
  [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
  [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
2017-01-02 15:44:49 +01:00
Nicolas Grekas 770ed8d44e minor #21119 [Form][FrameworkBundle][TwigBridge] do not depend on a fixed date in layout tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form][FrameworkBundle][TwigBridge] do not depend on a fixed date in layout 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        |

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.

Commits
-------

97b7fab do not depend on a fixed date in layout tests
2017-01-02 15:17:04 +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
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
Nicolas Grekas 6faa8abe04 bug #21078 [Console] Escape default value when dumping help (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Escape default value when dumping help

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

c242690 [Console] Escape default value when dumping help
2016-12-30 15:17:32 +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
Fabien Potencier fd8750e992 minor #21100 Fixed @return when returning this or static #bis (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

Fixed @return when returning this or static #bis

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

For some reasons these weren't fixed before https://github.com/symfony/symfony/pull/21059 was merged despite the review comments 😆

Commits
-------

20d8c74 Fixed @return when returning this or static #bis
2016-12-30 07:18:01 +01:00
Maxime Steinhausser 20d8c74bfe Fixed @return when returning this or static #bis 2016-12-29 22:47:05 +01:00
Fabien Potencier afa1f45477 minor #21059 fixed @return when returning this or static (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

fixed @return when returning this or static

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

Follow-up of #21054 for the 2.8 branch.

Commits
-------

7808b67 fixed @return when returning this or static
2016-12-29 22:39:04 +01:00
Fabien Potencier 6daebcb434 minor #21091 Polish translation improvement in Validator component (szepczynski)
This PR was squashed before being merged into the 2.7 branch (closes #21091).

Discussion
----------

Polish translation improvement in Validator component

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!--see comment below-->
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | no
| 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.
-->

Commits
-------

7a603df Polish translation improvement in Validator component
2016-12-29 22:17:54 +01:00
Marcin Szepczynski 7a603df71d Polish translation improvement in Validator component 2016-12-29 22:17:52 +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
Nicolas Grekas b4ed15a447 bug #21064 [Debug] Wrap call to ->log in a try catch block (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Wrap call to ->log in a try catch block

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

---

If something goes wrong in the logger, the application ends up with a blank page. Let's display the original exception.

Commits
-------

18dfef1 [Debug] Wrap call to ->log in a try catch block
2016-12-28 08:43:34 +01: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
Fabien Potencier 7808b675fc fixed @return when returning this or static 2016-12-27 11:52:11 +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 9a64d83436 Merge branch '2.7' into 2.8
* 2.7:
  fixed @return when returning this or static
  override property constraints in child class
  [Console] improved code coverage of Command class
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:39:57 +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
Fabien Potencier 0c1260ca89 bug #21053 [Validator] override property constraints in child class (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] override property constraints in child class

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

Commits
-------

8b281fe override property constraints in child class
2016-12-26 11:59:28 +01:00
Christian Flothmann 8b281fe401 override property constraints in child class 2016-12-25 18:58:48 +01:00
Fabien Potencier e5ce4c9383 removed unneeded comment 2016-12-23 22:13:36 +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
Fabien Potencier f1d8575d38 bug #21034 [FrameworkBundle] Make TemplateController working without the Templating component (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Make TemplateController working without the Templating component

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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 template controller was missed during #15502. Btw I've added some tests for this controller.

Commits
-------

89ccbc4 [FrameworkBundle] Make TemplateController working without the Templating component
2016-12-23 21:28:53 +01:00
Christian Flothmann 8a27d79a10 Merge branch '2.7' into 2.8
* 2.7:
  use HHVM 3.15 to run tests
  [TwigBridge] fix Twig 2.x compatibility
  removed some PHP CS Fixer rules
  Improve language
  [Console] SymfonyStyle: Escape trailing backslashes in user texts
  Mention the community review guide
  [Form] fix group sequence based validation
  [Console] Fix question formatting using SymfonyStyle::ask()
2016-12-23 17:32:24 +01:00
Christian Flothmann 9f1858580e minor #21033 use HHVM 3.15 to run tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

use HHVM 3.15 to run tests

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

For some reason, tests with the latest HHVM release fail on Travis CI. Neither do I have an idea why they are failing nor do I have the ability to trace the issue down so far to be able to open an issue for them. However, as tests pass with HHVM 3.15 I suggest that we use this version to run tests on Travis until we figure out the reason or tests pass again with a more recent release.

Commits
-------

a70b389 use HHVM 3.15 to run tests
2016-12-23 16:55:58 +01:00
Kévin Dunglas 89ccbc450c
[FrameworkBundle] Make TemplateController working without the Templating component 2016-12-23 16:30:22 +01:00
Christian Flothmann a70b389c38 use HHVM 3.15 to run tests 2016-12-23 15:46:49 +01:00
Fabien Potencier 7fa18ba1b9 minor #21030 [TwigBridge] fix Twig 2.x compatibility (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] fix Twig 2.x compatibility

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

Commits
-------

08e5747 [TwigBridge] fix Twig 2.x compatibility
2016-12-23 13:31:39 +01:00
Christian Flothmann 08e5747ce1 [TwigBridge] fix Twig 2.x compatibility 2016-12-23 12:20:51 +01:00
Fabien Potencier d559e26e0b removed some PHP CS Fixer rules 2016-12-23 08:00:05 +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
Fabien Potencier e13e3f0d0c minor #21016 [Validator][Translation] Improve Norwegian language (tarjei)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #21016).

Discussion
----------

[Validator][Translation] Improve Norwegian 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.

| Q             | A
| ------------- | ---
| Branch?       | master
| 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-->

I suspect the change can be applied to lower branches as well :)

Commits
-------

1255786 Improve language
2016-12-22 11:26:53 +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 948b44c461 minor #20982 Mention the community review guide (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

Mention the community review guide

| 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 think it's a good idea to reference this guide on the repository main page and contributing guide. Especially as it explains processes for reviewing that are specific to Symfony (Carson Bot).

Commits
-------

313defa Mention the community review guide
2016-12-19 18:00:57 +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