Commit Graph

47663 Commits

Author SHA1 Message Date
Fabien Potencier
45f5564906 bug #35582 Missing use statement 4.4 (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Missing use statement 4.4

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

00baa290e8 [Translation] Add missing use statement
2020-02-04 08:19:53 +01:00
Fabien Potencier
00baa290e8 [Translation] Add missing use statement 2020-02-04 08:15:38 +01:00
Fabien Potencier
981a771481 feature #34925 Messenger: validate options for AMQP and Redis Connections (nikophil)
This PR was squashed before being merged into the 5.1-dev branch (closes #34925).

Discussion
----------

Messenger: validate options for AMQP and Redis Connections

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| Ticket | https://github.com/symfony/symfony/issues/32575
| New feature?  | yes
| Deprecations? | yes
| License       | MIT

This PR validates options for AMQP and Redis connections.

Regarding AMQP, I've merged symfony's specific options (`exchange`, `delay`...) with the ones available in the [AMQP Extension](https://github.com/pdezwart/php-amqp/blob/master/amqp_connection.c#L177-L192) and i've enhanced the phpdoc with the one found [here](https://github.com/pdezwart/php-amqp/blob/master/stubs/AMQPConnection.php#L27-L54)

Commits
-------

bc4f7d701f Messenger: validate options for AMQP and Redis Connections
2020-02-04 06:52:56 +01:00
Nicolas PHILIPPE
bc4f7d701f Messenger: validate options for AMQP and Redis Connections 2020-02-04 06:52:48 +01:00
Nicolas Grekas
fc30e610d5 feature #33315 [WebProfiler] Improve HttpClient Panel (ismail1432)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[WebProfiler] Improve HttpClient Panel

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | np    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #33311  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | ?

Wishlist from issue :

- [x] the panel UI could be improved I suppose, e.g. a tooltip on hover in the toolbar
- [ ] putting requests in the "Performance" tab would be great (all timings are already in the collected "info")
- [ ] ~response bodies are not collected yet~ https://github.com/symfony/symfony/pull/33315#discussion_r317353605
- [ ] when a transport error occurs, (ie the "error" info is populated) we should maybe have a better display too?
- [x] add a copy-as-curl button next to each request

**[EDIT 07 oct 19]**
This PR contains :
- Display a tooltip in Toolbar
- Add a link only for GET Request in profiler panel
![image](https://user-images.githubusercontent.com/13260307/66316799-389be480-e910-11e9-888e-7703c87c7b10.png)

Commits
-------

e2e6bd0f3a [WebProfiler] Improve HttpClient Panel
2020-02-03 18:49:40 +01:00
Smaine Milianni
e2e6bd0f3a [WebProfiler] Improve HttpClient Panel 2020-02-03 18:49:13 +01:00
Fabien Potencier
28eedb8cef bug #34123 [Form] Fix handling of empty_data's \Closure value in Date/Time form types (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fix handling of empty_data's \Closure value in Date/Time form types

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33188
| License       | MIT
| Doc PR        | -

Basically this would solve the posibility to pass a `\Closure` to the `empty_data` option for Date/Time form types.

> https://symfony.com/doc/current/reference/forms/types/form.html#empty-data
> If a form is compound, you can set empty_data as an array, object or **closure**. See the [How to Configure empty Data](https://symfony.com/doc/current/form/use_empty_data.html) for a Form Class article for more details about these options.

Also related to https://github.com/symfony/symfony/pull/29182

Commits
-------

4939f0e323 Fix handling of empty_data's \Closure value in Date/Time form types
2020-02-03 18:31:42 +01:00
Fabien Potencier
fafe576b9d feature #34298 [String] add LazyString to provide memoizing stringable objects (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[String] add LazyString to provide memoizing stringable objects

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Replaces #34190

The proposed `LazyString` class is a value object that can be used in type declarations of our libraries/apps.

Right now, when a method accepts or returns "strings|stringable-objects", the most accurate type declaration one can use is `string|object` (either in docblocks or in union types in PHP 8). The goal of `LazyString` is to allow one to use `string|LazyString` instead and gain type-accuracy, thus type-safety while doing so.

Another defining property of the proposed class is also that it memoizes the computed string value so that the computation happens only once.

Two factories are provided to create a `LazyString` instance:
- `LazyString::fromStringable($value): self` -> turns any object with `__toString()` into a `LazyString`
- `LazyString::fromCallable($callback, ...$arguments): self` -> delegates the computation of the string value to a callback (optionally calling it with arguments).

Two generic helpers are also provided to help deal with stringables:
- `LazyString::isStringable($value): bool` -> checks whether a value can be safely cast to string, considering `__toString()` too. This replaces the boilerplate we all have to write currently (`is_string($value) || is_scalar($value) || is_callable([$value, '__toString'])`)
- `LazyString::resolve($value): string` -> casts a stringable value into a string. This is similar to the casting `(string)` operator or to `strval()`, but it throws a `TypeError` instead of a PHP notice when a non stringable is passed. This helps e.g. with code that enabled strict types and want to maintain compatibility with stringable objects.

An additional feature of `LazyString` instances is that they allow exceptions thrown from the wrapped `__toString()` methods or callbacks to be propagated. This requires having the `ErrorHandler` class from the `Debug` or `ErrorHandler` components registered as a PHP error handler (already the case for any Symfony apps by default). As a reminder, throwing from `__toString()` is not possible natively before PHP 7.4.

Commits
-------

4bb19c62e2 [String] add LazyString to provide generic stringable objects
2020-02-03 18:29:28 +01:00
Thomas Calvet
7bfc27e7cf [Form] Add "is empty callback" to form config 2020-02-03 18:27:57 +01:00
Nicolas Grekas
4bb19c62e2 [String] add LazyString to provide generic stringable objects 2020-02-03 18:27:47 +01:00
Fabien Potencier
80b003f888 feature #35368 [Yaml] Deprecate using the object and const tag without a value (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Yaml] Deprecate using the object and const tag without a value

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | yes
| Tickets       | https://github.com/symfony/symfony/pull/35332#discussion_r366757204
| License       | MIT
| Doc PR        | -

WIP because it needs 3.4 merged up into master + https://github.com/symfony/symfony/pull/35332.

Commits
-------

89062b9ba0 [Yaml] Deprecate using the object and const tag without a value
2020-02-03 18:24:07 +01:00
Thomas Calvet
89062b9ba0 [Yaml] Deprecate using the object and const tag without a value 2020-02-03 18:16:03 +01:00
Nicolas Grekas
c29989d69e bug #35537 [Config][XmlReferenceDumper] Prevent potential \TypeError (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Config][XmlReferenceDumper] Prevent potential \TypeError

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/34841
| License       | MIT
| Doc PR        | -

`$key` can be null and `setName()` is now typed with `string`. Fallbacking on an empty string restores the behavior (and output) of < 5.0.

However, that shows that's a case we don't handle (yet) properly. But that's another task 😃

Commits
-------

e8ba15ed27 [Config][XmlReferenceDumper] Prevent potential \TypeError
2020-02-03 18:14:20 +01:00
Thomas Calvet
e8ba15ed27 [Config][XmlReferenceDumper] Prevent potential \TypeError 2020-02-03 18:10:04 +01:00
Fabien Potencier
435f4d5403 bug #35227 [Mailer] Fix broken mandrill http send for recipients with names (vilius-g)
This PR was submitted for the 4.3 branch but it was squashed and merged into the 4.4 branch instead (closes #35227).

Discussion
----------

[Mailer] Fix broken mandrill http send for recipients with names

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

As specified in https://mandrillapp.com/api/docs/messages.JSON.html#method=send-raw, Mandrill API expects array of email addresses for `to` parameter.

Commits
-------

fbfe1ed423 [Mailer] Fix broken mandrill http send for recipients with names
2020-02-03 18:02:27 +01:00
Vilius Grigaliūnas
fbfe1ed423 [Mailer] Fix broken mandrill http send for recipients with names 2020-02-03 18:00:21 +01:00
Fabien Potencier
7dc5d64b37 bug #35430 [Translation] prefer intl domain when adding messages to catalogue (Guite)
This PR was squashed before being merged into the 4.4 branch (closes #35430).

Discussion
----------

[Translation] prefer intl domain when adding messages to catalogue

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

This PR ensures that when adding translations to a catalogue using the `add(array $messages, string $domain = 'messages')` method internally the intl icu domain is checked first.

Otherwise it could happen that existing messages in e.g. `messages+intl-icu` are not updated but the same keys are added to `messages`.

This is a follow-up of #35370, now targeting the `4.4` branch.

Commits
-------

b72b7d3413 [Translation] prefer intl domain when adding messages to catalogue
2020-02-03 17:51:48 +01:00
Guite
b72b7d3413 [Translation] prefer intl domain when adding messages to catalogue 2020-02-03 17:51:41 +01:00
Fabien Potencier
a4544c2571 Fix CS 2020-02-03 17:40:51 +01:00
Fabien Potencier
87c11c2b4f minor #35555 [DX][TwigBridge] Show both missing packages for NotificationMail in the same error message (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

[DX][TwigBridge] Show both missing packages for NotificationMail in the same error message

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

I ran `composer req twig` expecting to be ready to use the notification mail feature. After that, it required 2 page refreshes in the browser and 2 composer commands to be ready. This PR merges both missing packages into one error message, to improve developer experience.

Commits
-------

f462285381 Show both missing packages in the same error message
2020-02-03 17:40:04 +01:00
Nicolas Grekas
74ac5421b2 feature #35566 [HttpClient] adding NoPrivateNetworkHttpClient decorator (hallboav)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] adding NoPrivateNetworkHttpClient decorator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

The purpose of NoPrivateNetworkHttpClient is for block requests to private networks by default or block one or more subnetwork if specified. NoPrivateNetworkHttpClient accepts two arguments, first one is a HttpClientInterface instance and subnetworks as a second argument.
Second argument $subnets can be null for blocking requests to private networks, or string to specify a single subnet of array for a set of subnets.

```php
<?php

use Symfony\Component\HttpClient\HttpClient;
use Symfony\Component\HttpClient\NoPrivateNetworkHttpClient;

$client = new NoPrivateNetworkHttpClient(HttpClient::create());
// You can request public networks normally using the code above
$client->request('GET', 'https://symfony.com/');

// Requests to private neworks will be blocked because second argument ($subnets) is null
$client->request('GET', 'http://localhost/');

// If we request from 104.26.14.0 to 104.26.15.255 we'll get an exception, since I'm specifying a subnetwork
$client = new NoPrivateNetworkHttpClient(HttpClient::create(), ['104.26.14.0/23']);

// Let's suppose that our DNS server resolves symfony.com to 104.26.14.6, then the following request will be blocked
$client->request('GET', 'https://symfony.com/');
```

Commits
-------

63fec805f4 [HttpClient] adding NoPrivateNetworkHttpClient decorator
2020-02-03 17:39:39 +01:00
Hallison Boaventura
63fec805f4 [HttpClient] adding NoPrivateNetworkHttpClient decorator 2020-02-03 17:39:30 +01:00
Fabien Potencier
59f0980fd9 feature #35560 [HttpKernel] allow using public aliases to reference controllers (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpKernel] allow using public aliases to reference controllers

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This PR allows referencing a controller with an alias when needed. The use case I'm targetting is using `@Route` annotations on methods of the `App\Kernel` and have them work. This PR allows it.

Sidekick of https://github.com/symfony/recipes/pull/735

Commits
-------

94bc1f7d3b [HttpKernel] allow using public aliases to reference controllers
2020-02-03 17:34:59 +01:00
Fabien Potencier
327ee1a956 Fix CS 2020-02-03 17:31:58 +01:00
Fabien Potencier
72f9e98fea bug #35497 Fail on empty password verification (without warning on any implementation) (Stefan Kruppa)
This PR was submitted for the 4.3 branch but it was merged into the 4.4 branch instead (closes #35497).

Discussion
----------

Fail on empty password verification (without warning on any implementation)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | sort of
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

When using the sodium extension, an empty $raw string will issue a warning during validation, but the standard `password_verify()` does not. This PR aims to provide identical behavior independent of the underlying implementation. Two assumptions were made (please doublecheck if they are correct):
- Empty password is never valid.
- Empty password is not that severe that anybody needs to be informed using a warning or exception.

Commits
-------

4d920f04d0 Fail on empty password verification (without warning on any implementation)
2020-02-03 17:30:43 +01:00
Stefan Kruppa
4d920f04d0 Fail on empty password verification (without warning on any implementation) 2020-02-03 17:30:37 +01:00
Nicolas Grekas
ff4892b778 bug #35573 [HttpClient] make response stream functionality consistent (kbond)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] make response stream functionality consistent

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

There are three ways of creating a stream from a response:

1. Calling `$response->toStream()` (if the response supports this)
2. Calling `StreamWrapper::createResource($response)`
3. Calling `StreamWrapper::createResource($response, $httpClient)` (note the second argument)

Currently, the 3rd method creates a stream that is not rewindable (the other two are). The first commit adds tests showing the inconsistencies (1 test fails). The second commit is a fix to make the 3 ways consistent.

See https://twitter.com/nicolasgrekas/status/1224047079422599168 for reference.

Commits
-------

64f9111686 [HttpClient] make response stream functionality consistent
2020-02-03 16:32:52 +01:00
Kevin Bond
64f9111686 [HttpClient] make response stream functionality consistent 2020-02-03 16:32:43 +01:00
Fabien Potencier
5b1a9cb51a minor #35552 [Translation][Debug] Add installation and minimal example to README (wouterj)
This PR was squashed before being merged into the 3.4 branch (closes #35552).

Discussion
----------

[Translation][Debug] Add installation and minimal example to README

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | -

At SymfonyCon, we decided to test out removing some component documentation from the official docs. These were duplicating quite some information of the main guides and were confusing people that used the components in the framework.

I think it's good to reintroduced the composer installation command and a very minimal example in the README's of the component. This doesn't require maintenance and can kickstart people to gain knowledge on how to use the component.

For now, we've (re)moved the Debug and Translation component docs, so that's why I've only modified those README's.

cc @symfony/team-symfony-docs

Commits
-------

b52b7b9fd6 [Translation][Debug] Add installation and minimal example to README
2020-02-03 16:10:46 +01:00
Wouter de Jong
b52b7b9fd6 [Translation][Debug] Add installation and minimal example to README 2020-02-03 16:10:40 +01:00
Robin Chalas
12ca64649b Merge branch '5.0'
* 5.0:
  [Phpunit] Fix running skipped tests expecting only deprecations
  Fix merge
  [Config] dont catch instances of Error
  [HttpClient] fix HttpClientDataCollector when handling canceled responses
  [FrameworkBundle] remove mention of the old Controller class
  [DependencyInjection] #35505 Fix typo in test name
  [Yaml][Inline] Fail properly on empty object tag and empty const tag
  Check non-null type for numeric type
  Check value isset to avoid PHP notice
  bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form
2020-02-03 14:51:48 +01:00
Robin Chalas
5da1bcfb5c Merge branch '4.4' into 5.0
* 4.4:
  [Phpunit] Fix running skipped tests expecting only deprecations
  Fix merge
  [Config] dont catch instances of Error
  [HttpClient] fix HttpClientDataCollector when handling canceled responses
  [DependencyInjection] #35505 Fix typo in test name
  [Yaml][Inline] Fail properly on empty object tag and empty const tag
  Check non-null type for numeric type
  Check value isset to avoid PHP notice
  bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form
2020-02-03 14:51:17 +01:00
Fabien Potencier
ef4dcdb144 bug #35546 [Validator] check for __get method existence if property is uninitialized (alekitto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] check for __get method existence if property is uninitialized

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35544
| License       | MIT

Resolve bug #35544.

On PHP 7.4, check if object implements `__get` magic method if property is reported as uninitialized before returning null.

Commits
-------

427bc3aa18 [Validator] try to call __get method if property is uninitialized
2020-02-03 12:20:41 +01:00
Nicolas Grekas
ed7bb826fb Merge branch '3.4' into 4.4
* 3.4:
  [Phpunit] Fix running skipped tests expecting only deprecations
  [DependencyInjection] #35505 Fix typo in test name
  [Yaml][Inline] Fail properly on empty object tag and empty const tag
  Check non-null type for numeric type
  Check value isset to avoid PHP notice
  bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form
2020-02-03 11:46:43 +01:00
Alessandro Chitolina
427bc3aa18
[Validator] try to call __get method if property is uninitialized 2020-02-03 11:35:42 +01:00
Nicolas Grekas
af46fd6961 minor #35507 [DependencyInjection] Fix typo in test name (signor-pedro)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Fix typo in test name

Rename testThrowsExceptionWhenAddServiceOnACompiledContainer to testNoExceptionWhenAddServiceOnACompiledContainer.

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes (technically)
| New feature?  | no
| Deprecations? | no
| Tickets       | #35505
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Commits
-------

9cbfad5853 [DependencyInjection] #35505 Fix typo in test name
2020-02-03 11:21:26 +01:00
Nicolas Grekas
f758eca8b7 bug #35332 [Yaml][Inline] Fail properly on empty object tag and empty const tag (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml][Inline] Fail properly on empty object tag and empty const tag

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Rework of https://github.com/symfony/symfony/pull/35208 to not end up in `parseScalar` with an empty string or a boolean (and thus, avoid unfriendly error such as `Trying to access array offset on value of type bool`).

Ping @xabbuh

Commits
-------

bdf02c0a7e [Yaml][Inline] Fail properly on empty object tag and empty const tag
2020-02-03 11:17:31 +01:00
Nicolas Grekas
1f053f99e4 bug #35489 [PhpUnitBridge] Fix running skipped tests expecting only deprecations (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Fix running skipped tests expecting only deprecations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

If a test class has unsatisfied `@requires` and contains test methods expecting deprecation only, you get:

> Fatal error: Uncaught Error: Call to a member function beStrictAboutTestsThatDoNotTestAnything() on null in ./symfony/symfony-dev/vendor/symfony/phpunit-bridge/Legacy/SymfonyTestsListenerTrait.php:229

Spotted in #34925's build.

Commits
-------

6b02362c5b [Phpunit] Fix running skipped tests expecting only deprecations
2020-02-03 11:14:10 +01:00
Robin Chalas
6b02362c5b [Phpunit] Fix running skipped tests expecting only deprecations 2020-02-03 11:13:58 +01:00
Fabien Potencier
51444877d1 bug #35161 [FrameworkBundle] Check non-null type for numeric type (Arman-Hosseini)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Check non-null type for numeric type

$maxAge and $sharedAge can both be zero

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

Commits
-------

2797867ae9 Check non-null type for numeric type
2020-02-03 11:04:11 +01:00
Fabien Potencier
6c96706381 bug #34059 [DomCrawler] Skip disabled fields processing in Form (sbogx)
This PR was merged into the 3.4 branch.

Discussion
----------

[DomCrawler] Skip disabled fields processing in Form

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #28179
| License       | MIT

Commits
-------

c73b042044 bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form
2020-02-03 11:01:18 +01:00
Fabien Potencier
a536342a96 bug #34114 [Console] SymonfyStyle - Check value isset to avoid PHP notice (leevigraham)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] SymonfyStyle - Check value isset to avoid PHP notice

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34093
| License       | MIT
| Doc PR        | n/a

This PR addresses the issue when a default value is not a valid choice. Currently this would throw a notice which outputs to the console.

This fix is a similar implementation to the `QuestionHelper`: https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Console/Helper/QuestionHelper.php#L63

Example console command and output can be found in the issue: #34093

Commits
-------

c9072c70ef Check value isset to avoid PHP notice
2020-02-03 10:58:05 +01:00
Nicolas Grekas
774a16150f Fix merge 2020-02-03 09:39:20 +01:00
Nicolas Grekas
a9b5fd23ef Merge branch '3.4' into 4.4
* 3.4:
  [Config] dont catch instances of Error
2020-02-03 09:22:04 +01:00
Nicolas Grekas
78641e0e88 bug #35557 [Config] dont catch instances of Error (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] dont catch instances of Error

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35445, fix #35256
| License       | MIT
| Doc PR        | -

Commits
-------

e94c3fb87d [Config] dont catch instances of Error
2020-02-03 09:12:41 +01:00
Nicolas Grekas
e94c3fb87d [Config] dont catch instances of Error 2020-02-03 09:11:57 +01:00
Nicolas Grekas
5da9cf315f minor #35561 [HttpClient] dont display any content when none has been collected (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] dont display any content when none has been collected

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

36536c94d2 [HttpClient] dont display any content when none has been collected
2020-02-03 09:08:19 +01:00
Nicolas Grekas
a2d6d11085 bug #35562 [HttpClient] fix HttpClientDataCollector when handling canceled responses (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix HttpClientDataCollector when handling canceled responses

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35458
| License       | MIT
| Doc PR        | -

Commits
-------

303f9e5be5 [HttpClient] fix HttpClientDataCollector when handling canceled responses
2020-02-03 09:07:24 +01:00
Nicolas Grekas
6bb6473489 minor #35559 [FrameworkBundle] remove mention of the old Controller class (nicolas-grekas)
This PR was merged into the 5.0 branch.

Discussion
----------

[FrameworkBundle] remove mention of the old Controller class

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This class is gone in 5.0.

Commits
-------

6620f8afd9 [FrameworkBundle] remove mention of the old Controller class
2020-02-03 09:06:11 +01:00
Nicolas Grekas
303f9e5be5 [HttpClient] fix HttpClientDataCollector when handling canceled responses 2020-02-02 18:41:51 +01:00