Commit Graph

36054 Commits

Author SHA1 Message Date
Nicolas Grekas
cdf86bb303 Merge branch '2.8' into 3.4
* 2.8:
  KernelInterface can return null container
  [Ldap] Use shut up operator on connection errors at ldap_start_tls
  [HttpFoundation] don't override StreamedResponse::setNotModified()
  Added relevent links for parsing to the phpdoc
  Add stricter checking for valid date time string
  [Form] Fix DateTimeType html5 input format
2018-09-18 14:35:56 +02:00
Nicolas Grekas
a6a6dc2c1d minor #28470 Fix symfony/console (optional) dependency for MonologBridge (mpdude)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix symfony/console (optional) dependency for MonologBridge

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

Since 278c26f589, `ConsoleHandler` tries to pass a verbosity level into `Output::write()`.

In order to make this work, the change 749fba54f9 is required which was first released in 2.8.0.

When using MonologBridge ^3.3 with a lower version of symfony/console than 2.8, an `InvalidArgumentException` with the message `Unknown output type given` will be thrown.

Not sure how to add a test for this... 🤷‍♂️

Commits
-------

d6f5d6bccd Fix symfony/console (optional) dependency for MonologBridge
2018-09-18 14:28:20 +02:00
Nicolas Grekas
48acf9eef7 minor #28460 Think positive (umpirsky)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #28460).

Discussion
----------

Think positive

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

No need to invert condition.

Commits
-------

0b43738162 Think positive
2018-09-18 14:24:04 +02:00
Saša Stamenković
0b43738162 Think positive 2018-09-18 14:23:51 +02:00
Nicolas Grekas
ed8dd86e20 minor #28463 KernelInterface can return null for getContainer method (gmponos)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #28463).

Discussion
----------

KernelInterface can return null for getContainer method

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

According to [this](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Client.php#L45) a KernelInterface can return null if it is shutdown.

Commits
-------

7cb340a2db KernelInterface can return null container
2018-09-18 12:26:56 +02:00
Mponos George
7cb340a2db KernelInterface can return null container 2018-09-18 12:26:43 +02:00
Nicolas Grekas
e597dba77d bug #28495 [PhpUnitBridge] Implement startTest rather than startTestSuite (greg0ire)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Implement startTest rather than startTestSuite

Passing a TestSuite instance to CoverageListenerTrait::testStart() will
have no effect.

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Closes #28481

Commits
-------

63671d1633 Implement startTest rather than startTestSuite
2018-09-18 12:00:20 +02:00
Nicolas Grekas
c4c29814d5 bug #28480 [DI] Detect circular references with ChildDefinition parent (Seb33300)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #28480).

Discussion
----------

[DI] Detect circular references with ChildDefinition parent

| Q             | A
| ------------- | ---
| Branch?       | 3.4 (be careful when merging)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28312
| License       | MIT
| Doc PR        |

I will provide a test case if the fix looks good for you :)

Commits
-------

2a59c8e3e6 [DI] Detect circular references with ChildDefinition parent
2018-09-18 11:39:32 +02:00
Sébastien ALFAIATE
2a59c8e3e6 [DI] Detect circular references with ChildDefinition parent 2018-09-18 11:39:25 +02:00
Nicolas Grekas
7a19350fa8 bug #28497 [VarDumper] Fix global dump function return value for PHP7 (patrickcarlohickman)
This PR was squashed before being merged into the 3.4 branch (closes #28497).

Discussion
----------

[VarDumper] Fix global dump function return value for PHP7

Retarget of PR #28491. Reposting description below, with relevant updates.

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

In 3.4, the global `dump()` helper function in the VarDumper component was updated to return the arguments passed in to it. However, due to reusing the argument variable in the function, this introduces a bug in PHP7 in the return value of the function.

The variable used in the `foreach` loop overwrites the value passed in by the first argument. In PHP5, this is okay. In PHP7, even though the argument is passed by value, the value returned by `func_get_args()` is affected by changes to the arguments inside the function. This is a change from PHP5.

From the documentation for [`func_get_args()`](http://php.net/manual/en/function.func-get-args.php):

> If the arguments are passed by reference, any changes to the arguments will be reflected in the values returned by this function. As of PHP 7 the current values will also be returned if the arguments are passed by value.

This PR simply changes the name of the variable used in the `foreach` loop. It also adds a test file to test the return value of the global `dump()` function.

This is my first contribution to Symfony, so please let me know if the issue should be resolved in a different manner, or if the test should be modified in any way.

Thanks,
Patrick

Commits
-------

0def211b9b [VarDumper] Fix global dump function return value for PHP7
2018-09-18 10:06:14 +02:00
Patrick Carlo-Hickman
0def211b9b [VarDumper] Fix global dump function return value for PHP7 2018-09-18 10:05:59 +02:00
Nicolas Grekas
c75b1edf78 bug #28499 [Ldap] Use shut up operator on connection errors at ldap_start_tls (Andras Debreczeni)
This PR was merged into the 2.8 branch.

Discussion
----------

[Ldap] Use shut up operator on connection errors at ldap_start_tls

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

Added shut-up operator to php function `ldap_start_tls()` so connection errors are ignored.

Commits
-------

af54189dfc [Ldap] Use shut up operator on connection errors at ldap_start_tls
2018-09-18 10:04:20 +02:00
Andras Debreczeni
af54189dfc [Ldap] Use shut up operator on connection errors at ldap_start_tls 2018-09-18 09:27:02 +02:00
Fabien Potencier
a9004b3208 minor #28483 [HttpFoundation] don't override StreamedResponse::setNotModified() (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] don't override StreamedResponse::setNotModified()

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

Alternative implementation to #27937, because `Response::setNotModified()` has been made final in 4.0 so we shouldn't override it.

Commits
-------

9ef7f7038d [HttpFoundation] don't override StreamedResponse::setNotModified()
2018-09-18 06:45:48 +02:00
Grégoire Paris
63671d1633
Implement startTest rather than startTestSuite
Passing a TestSuite instance to CoverageListenerTrait::testStart() will
have no effect.
2018-09-17 22:28:24 +02:00
Nicolas Grekas
8d90df7ff7 bug #28372 [Form] Fix DateTimeType html5 input format (franzwilding, mcfedr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fix DateTimeType html5 input format

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

Fix DateTimeType' HTML input format according to HTML specs. Currently `DateTimeType` produces html with format `yyyy-MM-dd'T'HH:mm:ssZ` but the HTML5 spec expects `yyyy-MM-dd'T'HH:mm:ss` (i.e. no `Z`). Chrome presents an empty date picker meaning edits or having a default date are broken.

Also the reverseTransform was expect to have a timezone attached, which it does not - and incorrectly marks it as being a UTC time in this case, instead of using the Transformers output TZ.

This is same as @franzwilding https://github.com/symfony/symfony/pull/27254 but with change to just straight use of `DateTime::format` and handling TZ in reverseTransform

Commits
-------

e21a1a4df1 Added relevent links for parsing to the phpdoc
4f06f1524d Add stricter checking for valid date time string
253d0a683b [Form] Fix DateTimeType html5 input format
2018-09-17 20:11:48 +02:00
Nicolas Grekas
4957fa0c83 minor #28458 [OptionsResolver] remove dead code and useless else (ronfroy)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #28458).

Discussion
----------

[OptionsResolver] remove dead code and useless else

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

<!--
remove dead method and useless else
-->

Commits
-------

0c1484b849 [OptionsResolver] remove dead code and useless else
2018-09-17 19:29:41 +02:00
Rudy Onfroy
0c1484b849 [OptionsResolver] remove dead code and useless else 2018-09-17 19:29:18 +02:00
Nicolas Grekas
9ef7f7038d [HttpFoundation] don't override StreamedResponse::setNotModified() 2018-09-16 21:50:20 +02:00
Robin Chalas
5d75f14d7b Merge branch '2.8' into 3.4
* 2.8:
  [Validator] Add Japanese translations
  [Console] Fix input values allowed types
2018-09-16 13:50:16 +02:00
Fred Cox
e21a1a4df1 Added relevent links for parsing to the phpdoc 2018-09-15 14:33:50 +03:00
Fred Cox
4f06f1524d Add stricter checking for valid date time string 2018-09-15 14:25:16 +03:00
Robin Chalas
d4cddac14d Merge branch '2.8' into 3.4
* 2.8:
  [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
  [Console] fixed corrupt error output for unknown multibyte short option
  [Console] fixed PHPDoc for setArgument/setOption in InputInterface
  [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-15 11:59:15 +02:00
Fabien Potencier
e40bb0fa5f minor #28472 [Validator] Add Japanese translations (issei-m)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #28472).

Discussion
----------

[Validator] Add Japanese translations

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

7d78e3672b [Validator] Add Japanese translations
2018-09-15 07:41:57 +02:00
Issei.M
7d78e3672b [Validator] Add Japanese translations 2018-09-15 07:41:47 +02:00
Matthias Pigulla
d6f5d6bccd
Fix symfony/console (optional) dependency for MonologBridge
Since 278c26f589, `ConsoleHandler` tries to pass a verbosity level into `Output::write()`. 

In order to make this work, the change 749fba54f9 is required which was first released in 2.8.0.

When using MonologBridge ^3.3 with a lower version of symfony/console than 2.8, an `InvalidArgumentException` with the message `Unknown output type given` will be thrown.

Not sure how to add a test for this... 🤷‍♂️ :
2018-09-14 18:15:55 +02:00
Christian Flothmann
ee4ce43e91 fail reverse transforming invalid RFC 3339 dates 2018-09-14 13:46:25 +02:00
Christian Flothmann
5318e2eb15 forward the invalid_message option in date types 2018-09-14 09:49:37 +02:00
Fabien Potencier
d5a366faa1 minor #28448 [Console] Fix input values allowed types (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fix input values allowed types

| 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

Continuation of #28374

Commits
-------

0c16cd9fae [Console] Fix input values allowed types
2018-09-12 07:05:17 +02:00
Robin Chalas
b4bbc254b5 minor #28450 [Console] Fix typo in tests (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix typo in tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Spotted in #28373

cc @chalasr

Commits
-------

01e491e [Console] Fix typo in tests
2018-09-11 19:18:51 +02:00
Roland Franssen
01e491ec86
[Console] Fix typo in tests 2018-09-11 19:16:23 +02:00
Robin Chalas
0c16cd9fae [Console] Fix input values allowed types 2018-09-11 18:38:57 +02:00
Robin Chalas
86a5d92ce7 minor #28409 [Console] Document what is validated before and after Command::initialize() (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Document what is validated before and after Command::initialize()

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

Commits
-------

b1aff99 [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
2018-09-10 19:22:51 +02:00
Nicolas Grekas
444e7b9886 bug #28396 [Intl] Blacklist Eurozone and United Nations in Region Data Generator (gregurco)
This PR was merged into the 2.8 branch.

Discussion
----------

[Intl] Blacklist Eurozone and United Nations in Region Data Generator

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

Commits
-------

e2e4049721 [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2018-09-10 18:51:10 +02:00
Robin Chalas
b1aff9993c [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions 2018-09-10 11:03:26 +02:00
Robin Chalas
0417d6caad bug #28393 [Console] fixed corrupt error output for unknown multibyte short option (downace)
This PR was squashed before being merged into the 2.8 branch (closes #28393).

Discussion
----------

[Console] fixed corrupt error output for unknown multibyte short option

| Q             | A
| ------------- | ---
| Branch?       | 2.8 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28320   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

[Console] Fixed #28320 by using mb_substr instead of index access
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

0f86156 [Console] fixed corrupt error output for unknown multibyte short option
2018-09-10 10:47:57 +02:00
downace
0f861568aa [Console] fixed corrupt error output for unknown multibyte short option 2018-09-10 10:47:50 +02:00
Fabien Potencier
1c759a1719 minor #28374 [Console] fixed PHPDoc for setArgument/setOption in InputInterface (liarco)
This PR was squashed before being merged into the 2.8 branch (closes #28374).

Discussion
----------

[Console] fixed PHPDoc for setArgument/setOption in InputInterface

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

Methods now accept a value of any type except objects not implementing __toString().

**Example use case:** when using array arguments/options I can't set them programmatically without getting errors about type mismatch (from the IDE). With this patch it now works as expected.

Commits
-------

61529f3cd7 [Console] fixed PHPDoc for setArgument/setOption in InputInterface
2018-09-10 10:11:29 +02:00
Marco Lipparini
61529f3cd7 [Console] fixed PHPDoc for setArgument/setOption in InputInterface 2018-09-10 10:11:22 +02:00
Vlad Gregurco
e2e4049721 [Intl] Blacklist Eurozone and United Nations in Region Data Generator 2018-09-09 13:16:33 +02:00
Nicolas Grekas
90e79450d3 bug #28411 [Debug] fix detecting overriden final/internal methods implemented using traits (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] fix detecting overriden final/internal methods implemented using traits

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

Commits
-------

d638237f09 [Debug] fix detecting overriden final/internal methods implemented using traits
2018-09-09 11:20:33 +02:00
Nicolas Grekas
be05bbf4b7 bug #28404 [Controller][ServiceValueResolver] Making method access case insensitive (nicoweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Controller][ServiceValueResolver] Making method access case insensitive

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

Fix #28254 by making the method access insensitive in `ServiceValueResolver`.

Commits
-------

cc6f82769b [Controller][ServiceValueResolver] Making method access case insensitive
2018-09-09 11:18:43 +02:00
Nicolas Grekas
d638237f09 [Debug] fix detecting overriden final/internal methods implemented using traits 2018-09-09 11:07:24 +02:00
Robin Chalas
49992c5dfb Merge branch '2.8' into 3.4
* 2.8:
  [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 21:02:09 +02:00
Robin Chalas
d32d7685c2 bug #28401 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default

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

There is an inconsistency between `SymfonyStyle::askQuestion(new ChoiceQuestion(...))` and `SymfonyStyle::choice(...)`, the former does not support to have a choice value as default instead of a choice key while the latter handles both.
This is causing an `undefined index` notice breaking interactive command testing, fixed here.

Commits
-------

c51dda0 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 20:52:26 +02:00
nicoweb
cc6f82769b [Controller][ServiceValueResolver] Making method access case insensitive 2018-09-08 16:49:17 +02:00
Nicolas Grekas
8bc014c211 Merge branch '2.8' into 3.4
* 2.8:
  Consistently throw exceptions on a single line
  fix fopen calls
  Update .editorconfig
2018-09-08 15:15:14 +02:00
Nicolas Grekas
f408a676c5 minor #28403 Consistently throw exceptions on a single line (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

Consistently throw exceptions on a single line

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

Just to be consistent. Prepared using php-cs-fixer + manual  tweaks.

Commits
-------

721dc8661f Consistently throw exceptions on a single line
2018-09-08 15:00:18 +02:00
Nicolas Grekas
5e237db55e bug #28388 [DI] configure inlined services before injecting them when dumping the container (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] configure inlined services before injecting them when dumping the container

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

#28060 introduced a change in the way inline services are dumped: these instances could end up being configured *after* being injected. This breaks e.g. using Doctrine's Configuration instances, which are expected to be fully defined before being injected into their consumers.

Fixing this required a significant refactorization because I was just unable to reason with the heavily scrambled logic in place right now. The new logic is still non-trivial, but at least it's manageable, thus easier to get correct.

(Replaces #28385 which is the same applied to 4.1 - should help with merges.)

Commits
-------

e5c54053c4 [DI] configure inlined services before injecting them when dumping the container
2018-09-08 14:58:42 +02:00
Nicolas Grekas
e5c54053c4 [DI] configure inlined services before injecting them when dumping the container 2018-09-08 14:51:51 +02:00