Commit Graph

38312 Commits

Author SHA1 Message Date
Fabien Potencier
20bf17f6ad feature #35104 [Messenger] Log sender alias in SendMessageMiddleware (ruudk)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Messenger] Log sender alias in SendMessageMiddleware

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

This makes it easier to read which sender alias was used.

```diff
- Sending message Domain\Event\PaymentFlow\PaymentFlowFailedEvent with Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransport
+ Sending message Domain\Event\PaymentFlow\PaymentFlowFailedEvent with async sender using Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransport
```

Commits
-------

4e6626ca63 Log sender alias in SendMessageMiddleware
2020-01-07 20:50:54 +01:00
Fabien Potencier
e781cd8283 minor #35109 [FrameworkBundle] cache ClassMetadataFactory in debug (bastnic)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] cache ClassMetadataFactory in debug

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no (performance)
| New feature?  | performance...
| Deprecations? | no
| Tickets       | #35096
| License       | MIT
| Doc PR        |

Cf #35096, validator and serialization yaml/xml files are parsed at each requests. But they are already tracked by a `DirectoryResource` in
bd9dc7c573/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php (L1246-L1261)

So it only needs a real cache purge on validator / serializer sytem cache, and I use the [CachePoolClearerCacheWarmer](https://github.com/api-platform/core/blob/master/src/Bridge/Symfony/Bundle/CacheWarmer/CachePoolClearerCacheWarmer.php) from APIP that already does similar things.

Handling that sort of cache in Symfony fixes a lot of others performance issue.

![image](https://user-images.githubusercontent.com/84887/71452294-e6869480-2783-11ea-9aa8-431db3edfd8d.png)

Commits
-------

53324986cb [FrameworkBundle] cache ClassMetadataFactory in debug
2020-01-07 20:35:07 +01:00
Fabien Potencier
b9cc0c8985 bug #35200 [TwigBridge] do not render preferred choices as selected (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBridge] do not render preferred choices as selected

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

Commits
-------

c5b8190424 do not render preferred choices as selected
2020-01-07 20:31:57 +01:00
Fabien Potencier
290ce00f96 bug #35243 [HttpKernel] release lock explicitly (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] release lock explicitly

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

Commits
-------

6fb55812ab [HttpKernel] release lock explicitly
2020-01-07 20:30:23 +01:00
Fabien Potencier
aaf6915661 bug #35193 [TwigBridge] button_widget now has its title attr translated even if its label = null or false (stephen-lewis)
This PR was squashed before being merged into the 3.4 branch (closes #35193).

Discussion
----------

[TwigBridge] button_widget now has its title attr translated even if its label = null or false

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

Duplicate of #34436 but changed to bugfix and applied to 3.4. Buttons with null or false 'label' options will now have their 'title' attribute translated against the current translation domain.

Commits
-------

2a5d9cb75a [TwigBridge] button_widget now has its title attr translated even if its label = null or false
2020-01-07 20:28:14 +01:00
Stephen Lewis
2a5d9cb75a [TwigBridge] button_widget now has its title attr translated even if its label = null or false 2020-01-07 20:28:09 +01:00
Nicolas Grekas
c4c0b84366 bug #35219 [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script (oleg-andreyev)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script

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

Locally using [phpenv](https://github.com/phpenv/phpenv) together [phpenv-composer](https://github.com/ngyuki/phpenv-composer) with for managing php versions and composer installations.

`which composer` is detecting wrapper instead of binary.
Before appending PHP executable to composer path need to validate that detected composer is not a wrapper otherwise PHP will simply return the content of a wrapper

Commits
-------

25c805ed56 [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
2020-01-07 20:24:08 +01:00
Oleg Andreyev
25c805ed56 [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script 2020-01-07 20:24:01 +01:00
Fabien Potencier
47a866bf7b bug #35150 [Messenger] Added check if json_encode succeeded (toooni)
This PR was squashed before being merged into the 4.3 branch (closes #35150).

Discussion
----------

[Messenger] Added check if json_encode succeeded

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

Similar PR as https://github.com/symfony/symfony/pull/35137 but for branch 4.3.

When trying to add a message to redis transport which can not be encoded with `json_encode` there is now a `TransportException` containing the `json_last_error_msg` as the message.
I had an issue where I tried to send an email through messenger by symfony mailer which contains a pdf attachment. Instead of an error while sending i got an error `Encoded envelope should have at least a "body"` which happened because the encoded message was `false`.

This is not exactly a bugfix, but IMO also not a feature worth being mentioned in the changelog so I am not sure I've filled out the Q/A correctly.

Commits
-------

c2bdc4c4d3 [Messenger] Added check if json_encode succeeded
2020-01-07 20:21:24 +01:00
Toni Rudolf
c2bdc4c4d3 [Messenger] Added check if json_encode succeeded 2020-01-07 20:21:19 +01:00
Toni Rudolf
a16a574ca8 [Messenger] Added check if json_encode succeeded 2020-01-07 20:20:25 +01:00
Fabien Potencier
9e7a4102ad bug #35245 [HttpClient] fix exception in case of PSR17 discovery failure (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix exception in case of PSR17 discovery failure

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

On symfony.com, we need to use HTTPlug for 3rd party libs. When `nyholm/psr7` is not installed, we currently see an exception saying `No HTTPlug clients found.` from `HttpClientDiscovery`.

This fixes the message by correctly suggesting `nyholm/psr7` instead, since there *is* an HTTPlug client: `HttplugClient` from our HttpClient component.

It's quite unfortunate that `guzzle/psr7` provides no PSR17 factory yet, because that would have solved some part of this deps mess. /cc @Nyholm @sagikazarmark FYI
Note that https://packagist.org/providers/psr/http-factory-implementation lists `guzzle/psr7` but this is a wrong solution: no tagged release of it is PSR17-compatible, which means installing it doesn't solve the issue.

Commits
-------

96e70a4080 [HttpClient] fix exception in case of PSR17 discovery failure
2020-01-07 20:17:11 +01:00
Fabien Potencier
ada4c56a91 bug #35244 [Cache] fix processing chain adapter based cache pool (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] fix processing chain adapter based cache pool

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

Commits
-------

8d7fa32d15 fix processing chain adapter based cache pool
2020-01-07 20:15:45 +01:00
Fabien Potencier
c29b2a11d4 feature #35205 [Form] derive the view timezone from the model timezone (xabbuh)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Form] derive the view timezone from the model timezone

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

Commits
-------

ef5835d833 derive the view timezone from the model timezone
2020-01-07 20:12:15 +01:00
Fabien Potencier
de34f229a9 minor #35213 [Security\Guard] Fix missing typehints (chalasr)
This PR was merged into the 4.3 branch.

Discussion
----------

[Security\Guard] Fix missing typehints

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

Commits
-------

2ef8771ad7 [Security\Guard] Fix missing typehints
2020-01-07 20:10:35 +01:00
Mohamed Gamal
3e0c98836e [String] add test case for unwrap method 2020-01-07 20:08:50 +01:00
Thomas Calvet
d38cdc9dce [FrameworkBundle][ContainerLintCommand] Only skip .errored. services 2020-01-07 17:40:07 +01:00
Nicolas Grekas
96e70a4080 [HttpClient] fix exception in case of PSR17 discovery failure 2020-01-07 13:55:38 +01:00
Nicolas Grekas
ffd5d12045 bug #35225 [DependencyInjection] Handle ServiceClosureArgument for callable in container linting (shieldo)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Handle ServiceClosureArgument for callable in container linting

| Q             | A
| ------------- | ---
| Branch?       | 4.4 (+)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | (none)
| License       | MIT

Making use of `ServiceClosureArgument` instances in service definitions was not accounted for in container linting when a service type-hints for `callable` in an argument - adding this check ensures that `ServiceClosureArgument` instances are recognised correctly as callables (once they are resolved).

Commits
-------

e48829e9b6 [DependencyInjection] Handle ServiceClosureArgument for callable in container linting
2020-01-07 11:57:32 +01:00
Douglas Greenshields
e48829e9b6 [DependencyInjection] Handle ServiceClosureArgument for callable in container linting 2020-01-07 11:57:22 +01:00
Christian Flothmann
8d7fa32d15 fix processing chain adapter based cache pool 2020-01-07 11:39:48 +01:00
Nicolas Grekas
6fb55812ab [HttpKernel] release lock explicitly 2020-01-07 11:19:31 +01:00
Robin Chalas
9b711b87fe [Security] Prevent canceled remember-me cookie from being accepted 2020-01-06 22:59:17 +01:00
Nicolas Grekas
b1bee60119 Merge branch '5.0'
* 5.0:
  Fix closing tag in mailer collector template
  [Notifier] Fix two minor issues
  [HttpClient] Don't read from the network faster than the CPU can deal with
  [DI] DecoratorServicePass should keep container.service_locator on the decorated definition
2020-01-06 14:05:24 +01:00
Nicolas Grekas
8c9e27834d Merge branch '4.4' into 5.0
* 4.4:
  Fix closing tag in mailer collector template
  [HttpClient] Don't read from the network faster than the CPU can deal with
  [DI] DecoratorServicePass should keep container.service_locator on the decorated definition
2020-01-06 14:04:40 +01:00
Nicolas Grekas
b9a0b33540 minor #35221 [WebProfilerBundle] Fix closing tag in mailer collector template (norkunas)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Fix closing tag in mailer collector template

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

Commits
-------

c2d2e5a61d Fix closing tag in mailer collector template
2020-01-06 14:00:05 +01:00
Nicolas Grekas
fb2d2577d9 Merge branch '4.3' into 4.4
* 4.3:
  [HttpClient] Don't read from the network faster than the CPU can deal with
  [DI] DecoratorServicePass should keep container.service_locator on the decorated definition
2020-01-06 13:57:54 +01:00
Nicolas Grekas
f9b36c754d bug #35223 [HttpClient] Don't read from the network faster than the CPU can deal with (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Don't read from the network faster than the CPU can deal with

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

Something I spotted while working on #35115: both the curl and native clients don't play well with heavily compressed HTTP streams: they decompress faster than userland can process chunks.

The attached patch moves the decompression logic to the chunk generator. This means internally we only deal with raw compressed chunks, and they are decompressed only when passing the value to userland.

Commits
-------

ac3d77a76a [HttpClient] Don't read from the network faster than the CPU can deal with
2020-01-06 13:56:11 +01:00
Thomas Calvet
87212e41b3 [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr 2020-01-06 12:26:45 +01:00
Tomas
c2d2e5a61d Fix closing tag in mailer collector template 2020-01-06 13:23:58 +02:00
Thomas Calvet
4f80d4d639 [Notifier] Fix two minor issues 2020-01-06 11:24:48 +01:00
Nicolas Grekas
ac3d77a76a [HttpClient] Don't read from the network faster than the CPU can deal with 2020-01-06 10:53:56 +01:00
Maciej Malarz
99dab87ada [DI] DecoratorServicePass should keep container.service_locator on the decorated definition 2020-01-04 20:22:46 +01:00
Robin Chalas
2ef8771ad7 [Security\Guard] Fix missing typehints 2020-01-04 19:57:41 +01:00
Chris Tanaskoski
e2c2397f1e [HttpClient] In StreamWrapper::createResource use the more efficient Response::toStream method if safe and available 2020-01-04 15:45:34 +01:00
Nicolas Grekas
e9f0cfe9db Merge branch '5.0'
* 5.0: (31 commits)
  [HttpClient] NativeHttpClient should not send >1.1 protocol version
  [HttpClient] fix support for non-blocking resource streams
  [Mailer] Make sure you can pass custom headers to Mailgun
  [Mailer] Remove line breaks in email attachment content
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [Security-Guard] fixed 35203 missing name tag in param docblock
  [HttpClient] fix casting responses to PHP streams
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
  [FrameworkBundle] Fix getUser() phpdoc in AbstractController
  [Mailer] Fix addresses management in Sendgrid API payload
  [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
  [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
  [HttpClient] fix capturing SSL certificates with NativeHttpClient
  Update year in license files
  Update year in license files
  [TwigBridge][Form] Added missing help messages in form themes
  Update year in license files
  ...
2020-01-04 15:20:45 +01:00
Nicolas Grekas
905db59b3a minor #35186 [FrameworkBundle] Fix getUser() phpdoc in AbstractController (natewiebe13)
This PR was merged into the 5.0 branch.

Discussion
----------

[FrameworkBundle] Fix getUser() phpdoc in AbstractController

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35185
| License       | MIT
| Doc PR        | N/A

This imports the `Symfony\Component\Security\Core\User\UserInterface` as the docs state that it returns `UserInterface` but doesn't use a FQN or import the class. This makes `getUser()` appear to return `Symfony\Bundle\FrameworkBundle\Controller\UserInterface`

Commits
-------

bba9fd6ccf [FrameworkBundle] Fix getUser() phpdoc in AbstractController
2020-01-04 15:13:44 +01:00
Nicolas Grekas
f673cdc6e2 minor #35158 Update year in license files (rosier)
This PR was merged into the 5.0 branch.

Discussion
----------

Update year in license files

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

Happy new year Notifier and String

Commits
-------

ef4426ae87 Update year in license files
2020-01-04 15:09:07 +01:00
Nicolas Grekas
581b439931 Merge branch '4.4' into 5.0
* 4.4: (26 commits)
  [HttpClient] NativeHttpClient should not send >1.1 protocol version
  [HttpClient] fix support for non-blocking resource streams
  [Mailer] Make sure you can pass custom headers to Mailgun
  [Mailer] Remove line breaks in email attachment content
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [Security-Guard] fixed 35203 missing name tag in param docblock
  [HttpClient] fix casting responses to PHP streams
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
  [Mailer] Fix addresses management in Sendgrid API payload
  [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
  [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
  [HttpClient] fix capturing SSL certificates with NativeHttpClient
  Update year in license files
  [TwigBridge][Form] Added missing help messages in form themes
  Update year in license files
  Update year in license files
  fix version when "anonymous: lazy" was introduced
  ...
2020-01-04 15:08:26 +01:00
Nicolas Grekas
9d4c98ee17 bug #35209 [HttpClient] fix support for non-blocking resource streams (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix support for non-blocking resource streams

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

Commits
-------

c651f63813 [HttpClient] fix support for non-blocking resource streams
2020-01-04 15:05:21 +01:00
Nicolas Grekas
75c24bbdde Merge branch '4.3' into 4.4
* 4.3:
  [HttpClient] NativeHttpClient should not send >1.1 protocol version
2020-01-04 15:04:37 +01:00
Nicolas Grekas
ccfc4b67b3 bug #35210 [HttpClient] NativeHttpClient should not send >1.1 protocol version (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] NativeHttpClient should not send >1.1 protocol version

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

Commits
-------

8b61c95685 [HttpClient] NativeHttpClient should not send >1.1 protocol version
2020-01-04 15:04:26 +01:00
Nicolas Grekas
8b61c95685 [HttpClient] NativeHttpClient should not send >1.1 protocol version 2020-01-04 15:00:37 +01:00
Nicolas Grekas
c651f63813 [HttpClient] fix support for non-blocking resource streams 2020-01-04 14:51:57 +01:00
Nicolas Grekas
ee5e64413e minor #35153 [SecurityBundle] fix version when "anonymous: lazy" was introduced (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] fix version when "anonymous: lazy" was introduced

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

Commits
-------

c280a01724 fix version when "anonymous: lazy" was introduced
2020-01-04 14:12:34 +01:00
Nyholm
43c1e77a88 [Mailer] Make sure you can pass custom headers to Mailgun 2020-01-04 14:10:16 +01:00
Nicolas Grekas
6f6976a192 minor #35157 Update year in license files (rosier)
This PR was merged into the 4.4 branch.

Discussion
----------

Update year in license files

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

Happy new year ErrorHandler

Commits
-------

500a075673 Update year in license files
2020-01-04 14:07:55 +01:00
Nicolas Grekas
c000577edb Merge branch '4.3' into 4.4
* 4.3:
  [Mailer] Remove line breaks in email attachment content
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
  [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
  [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
  [HttpClient] fix capturing SSL certificates with NativeHttpClient
  [TwigBridge][Form] Added missing help messages in form themes
  Update year in license files
  Update year in license files
  [HttpClient] fix typo
  [Console][FormatterHelper] Use helper strlen statically and remove duplicated code
  [Routing] Fix i18n routing when the url contains the locale
  Fix BC issue in phpDoc Reflection library
  [Translator] Performance improvement in MessageCatalogue and catalogue operations.
2020-01-04 14:00:46 +01:00
Nicolas Grekas
eb5171f059 bug #33672 [Mailer] Remove line breaks in email attachment content (Stuart Fyfe)
This PR was squashed before being merged into the 4.3 branch.

Discussion
----------

[Mailer] Remove line breaks in email attachment content

Line breaks are not allowed in attachment content when sending over the
API.

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33671, Closes #32645
| License       | MIT
| Doc PR        |

This is a fix for #33671. Send grid's API throws a 400 error when sending email attachments with default base64 encoding.
Removing the line breaks resolves this issue.

Commits
-------

a28a7f9dee [Mailer] Remove line breaks in email attachment content
2020-01-04 13:46:16 +01:00
Stuart Fyfe
a28a7f9dee [Mailer] Remove line breaks in email attachment content 2020-01-04 13:45:40 +01:00
Nicolas Grekas
423d3ddf05 bug #35101 [Routing] Fix i18n routing when the url contains the locale (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[Routing] Fix i18n routing when the url contains the locale

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

This PR fixes different scenarios with i18n routing.

Commits
-------

cd40bb8604 [Routing] Fix i18n routing when the url contains the locale
2020-01-04 13:43:28 +01:00
Nicolas Grekas
cbf2abdece bug #35124 [TwigBridge][Form] Added missing help messages in form themes (cmen)
This PR was merged into the 4.3 branch.

Discussion
----------

[TwigBridge][Form] Added missing help messages in form themes

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

Results:
![b3](https://user-images.githubusercontent.com/8505069/71522117-a9292080-28c3-11ea-86cd-0f257d50267d.png)

![b3h](https://user-images.githubusercontent.com/8505069/71522118-acbca780-28c3-11ea-95d7-9931442160dd.png)

![b4](https://user-images.githubusercontent.com/8505069/71522119-af1f0180-28c3-11ea-8559-02f69efcd2ef.png)

![b4h](https://user-images.githubusercontent.com/8505069/71522121-b219f200-28c3-11ea-86d7-abd192ed33ad.png)

![f](https://user-images.githubusercontent.com/8505069/71522126-b5ad7900-28c3-11ea-8300-3b52258da84b.png)

Commits
-------

5374d4f210 [TwigBridge][Form] Added missing help messages in form themes
2020-01-04 13:39:07 +01:00
Nicolas Grekas
6b2f4e6126 bug #35195 [HttpClient] fix casting responses to PHP streams (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix casting responses to PHP streams

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

This patch is required to properly deal with casting responses to PHP streams.
This changes a public method, but we can't expect anyone to override it as it's totally internal.
Found when working on (and required by) #35115

Commits
-------

35c08ef395 [HttpClient] fix casting responses to PHP streams
2020-01-04 13:29:59 +01:00
Nicolas Grekas
cf83c608d3 bug #35168 [HttpClient] fix capturing SSL certificates with NativeHttpClient (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix capturing SSL certificates with NativeHttpClient

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

Commits
-------

234589a753 [HttpClient] fix capturing SSL certificates with NativeHttpClient
2020-01-04 13:28:10 +01:00
Nicolas Grekas
d394214b72 minor #35155 Update year in license files (rosier)
This PR was merged into the 4.3 branch.

Discussion
----------

Update year in license files

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

Happy new year new components ;-)

Commits
-------

0d7a8bdd0a Update year in license files
2020-01-04 13:25:35 +01:00
Nicolas Grekas
a56c3ef85c Merge branch '3.4' into 4.3
* 3.4:
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  Update year in license files
  [Console][FormatterHelper] Use helper strlen statically and remove duplicated code
  Fix BC issue in phpDoc Reflection library
  [Translator] Performance improvement in MessageCatalogue and catalogue operations.
2020-01-04 13:24:57 +01:00
Shaharia Azam
5cac29571b Update links to documentation 2020-01-04 13:05:51 +01:00
Nicolas Grekas
28e502ec49 bug #35134 [PropertyInfo] Fix BC issue in phpDoc Reflection library (jaapio)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyInfo] Fix BC issue in phpDoc Reflection library

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

The used phpDocumentor library DocBlockReflection contained a BC break
that broke this component. The patch was applied in the recently released v4.3.4
version. But since it is unclear how long this issue existed it is not possible
to exclude a certain version. Therefor also `\RuntimeExpception` needs to be caught.

The BC break is possibly caused by a change in the TypeResolver library used by the
DocBlockReflection which is now supporting the more popular generics notation for arrays.

This PR might need some tests but the current test cases are not very clear to me. Instead of patching the code we could also try to ban the broken versions of the used phpdoc libraries, but that would require much more testing, and doesn't really add any value. Especially because the DocBlockReflection and TypeResolver are used by over half a million projects. It would raise more questions than just patching the behavior of the PropertyInfo component.

We are sorry that this issue slipt through our QA pipeline. The linked issue already showed that the issue is now fixed by just doing a `composer update` but it is not very convenient to leave this known issue in symfony.

Commits
-------

bad07ec557 Fix BC issue in phpDoc Reflection library
2020-01-04 13:01:51 +01:00
Ahmed Raafat
da117714fd [Validator] Add the missing translations for the Arabic (ar) locale 2020-01-04 13:00:45 +01:00
Nicolas Grekas
9392f76519 minor #35207 [Form] ensure to expect no validation for the right reasons (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] ensure to expect no validation for the right reasons

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

Commits
-------

8d46f95f4c ensure to expect no validation for the right reasons
2020-01-04 12:55:48 +01:00
Nicolas Grekas
51d8070960 minor #35154 Update year in license files (rosier)
This PR was merged into the 3.4 branch.

Discussion
----------

Update year in license files

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

Happy new year to everyone

Commits
-------

889a110e74 Update year in license files
2020-01-04 12:53:32 +01:00
Christian Flothmann
8d46f95f4c ensure to expect no validation for the right reasons 2020-01-04 10:13:45 +01:00
Christian Flothmann
ef5835d833 derive the view timezone from the model timezone 2020-01-04 09:47:43 +01:00
Jesse Rushlow
555189ae2c
[Security-Guard] fixed 35203 missing name tag in param docblock
Added missing $credentials name tag to @param for getPassword()
to resolve PHPStan error and comply with the docBlock spec.
2020-01-03 18:06:56 -05:00
Christian Flothmann
c5b8190424 do not render preferred choices as selected 2020-01-03 19:24:56 +01:00
Nicolas Grekas
35c08ef395 [HttpClient] fix casting responses to PHP streams 2020-01-03 19:18:19 +01:00
Thomas Calvet
dba1804f5d [PhpUnitBridge] Add test case for @expectedDeprecation annotation 2020-01-03 12:33:57 +01:00
Thomas Calvet
50ba566c0b [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack 2020-01-03 11:53:28 +01:00
Nate Wiebe
bba9fd6ccf [FrameworkBundle] Fix getUser() phpdoc in AbstractController 2020-01-03 00:46:11 -05:00
Guillaume Verstraete
36eeba7a3a [Mailer] Fix addresses management in Sendgrid API payload 2020-01-03 02:28:31 +01:00
Fabien Potencier
e348513157 bug #35173 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API (vilius-g)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API

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

Previous code tries to pass attachments to API, but uses incorrect structure and as a result all attachments are missing when the email is sent.

This also adds previously missing attachment names.

Commits
-------

7b1bbb6190 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
2020-01-02 19:35:45 +01:00
Vilius Grigaliūnas
7b1bbb6190 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
Previous code tries to pass attachments to API, but uses incorrect structure and as a result all attachments are missing when the email is sent.
2020-01-02 17:40:32 +02:00
Vilius Grigaliūnas
9e12a6dcda [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
This fixes the same problem as https://github.com/symfony/symfony/commit/6dbac13a07c23f321b04489b6a9773 but for HTTP transport.
2020-01-02 17:01:57 +02:00
Thomas Calvet
93aa5bcd0a [FrameworkBundle][ContainerLintCommand] Style messages 2020-01-02 12:33:20 +01:00
Thomas Calvet
4f642ad624 [DependencyInjection][PhpDumper] Dump root namespace array_key_exists 2020-01-02 11:48:57 +01:00
Nicolas Grekas
234589a753 [HttpClient] fix capturing SSL certificates with NativeHttpClient 2020-01-02 11:45:17 +01:00
Jan Rosier
ef4426ae87 Update year in license files 2020-01-01 15:53:07 +01:00
Jan Rosier
500a075673 Update year in license files 2020-01-01 15:47:03 +01:00
Christophe Meneses
5374d4f210 [TwigBridge][Form] Added missing help messages in form themes 2020-01-01 13:53:32 +01:00
Jan Rosier
0d7a8bdd0a Update year in license files 2020-01-01 12:51:43 +01:00
Jan Rosier
889a110e74 Update year in license files 2020-01-01 12:03:25 +01:00
Christian Flothmann
c280a01724 fix version when "anonymous: lazy" was introduced 2020-01-01 10:41:58 +01:00
Nicolas Grekas
8e9aafc84f bug #35125 [Translator] fix performance issue in MessageCatalogue and catalogue operations (ArtemBrovko)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translator] fix performance issue in MessageCatalogue and catalogue operations

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

In our project we use lots of catalogue operations during importing of translations to our system and we ran into performance issue. Code profiler showed lots or `array_replace` calls in  [MessageCatalogue::add](https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/MessageCatalogue.php#L128) method. This method is actually called by [MessageCatalogue::set](https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/MessageCatalogue.php#L70), which is quite an overkill, because `MessageCatalogue::set` is meant to set only one translation at a time. Method was reworked. `MergeOperation` and `TargetOperation` was reworked as well to use this improved `MessageCatalogue::set` method instead of constructing array with only one translation and passing it to `MessageCatalogue::add` method.

Table shows execution time before and after

|  | Time in seconds (avg. of 10 executions)
----------- | ------
Before | 50
After | 8

Looks like 4.* and 5.* versions can also be improved by the same changes.
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

Commits
-------

5179af4796 [Translator] Performance improvement in MessageCatalogue and catalogue operations.
2019-12-31 15:31:48 +01:00
Nicolas Grekas
f35935f050 minor #35133 [DebugBundle] Drop RemoveWebServerBundleLoggerPass (chalasr)
This PR was merged into the 5.0 branch.

Discussion
----------

[DebugBundle] Drop RemoveWebServerBundleLoggerPass

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

Commits
-------

167411c194 [DebugBundle] Drop RemoveWebServerBundleLoggerPass
2019-12-31 15:30:00 +01:00
Nicolas Grekas
3db9090e73 minor #35149 doctrine/doctrine-bundle ^1.5 is not compatible with Symfony 5 (nicolas-grekas)
This PR was merged into the 5.0 branch.

Discussion
----------

doctrine/doctrine-bundle ^1.5 is not compatible with Symfony 5

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

Commits
-------

4c790b0589 doctrine/doctrine-bundle ^1.5 is not compatible with Symfony 5
2019-12-31 15:23:48 +01:00
Emanuele Panzeri
879ba76a6a Fix Nexmo notifier bridge namespace 2019-12-31 15:16:53 +01:00
Nicolas Grekas
4c790b0589 doctrine/doctrine-bundle ^1.5 is not compatible with Symfony 5 2019-12-30 18:22:15 +01:00
Nicolas Grekas
3a25878e98 [HttpClient] fix typo 2019-12-30 18:19:47 +01:00
Thomas Calvet
f0d227db2f [Console][FormatterHelper] Use helper strlen statically and remove duplicated code 2019-12-29 18:51:53 +01:00
Thomas Calvet
cd40bb8604 [Routing] Fix i18n routing when the url contains the locale 2019-12-29 11:48:40 +01:00
Jaapio
bad07ec557
Fix BC issue in phpDoc Reflection library
The used phpDocumentor library DocBlockReflection contained an BC break
that broke this component. The patch was applied in the recent released v4.3.4
version. But since it is unclear how long this issue existed it is not possible
to exclude a certain version. Therefor also `\RuntimeExpception` needs to be catched.

The BC break is possibly caused by a change in the TypeResolver library used by the
DocBlockReflection which is now supporting the more populair generics notation for arrays.
2019-12-28 22:02:19 +01:00
Robin Chalas
167411c194 [DebugBundle] Drop RemoveWebServerBundleLoggerPass 2019-12-28 20:04:16 +01:00
Robin Chalas
86afefed3b [DebugBundle] Make RemoveWebServerBundleLoggerPass internal 2019-12-28 19:58:08 +01:00
Nicolas Grekas
aa9ccf8825 Merge branch '5.0'
* 5.0:
  [DI] fix merge
2019-12-28 16:31:23 +01:00
Nicolas Grekas
291d1f3a84 [DI] fix merge 2019-12-28 16:31:08 +01:00
Nicolas Grekas
392d0b01f3 Merge branch '5.0'
* 5.0: (24 commits)
  Removing unused variable
  Fixed #35084
  Add missing use statement
  [HttpClient] fix scheduling pending NativeResponse
  do not overwrite variable value
  [Profiler] wording
  Use spaces correctly to display options in DebugCommand
  Add supported schemes doc blocks type
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
  [String][UnicodeString] Remove unneeded flag in chunk regex pattern
  add note about HTTP status code change
  Migrate server:log command away from WebServerBundle
  [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable
  [Security] Fix missing defaults for auto-migrating encoders
  bumped Symfony version to 5.0.3
  updated VERSION for 5.0.2
  ...
2019-12-28 16:12:20 +01:00
Alireza Mirsepassi
12d3aa80ec Removing unused variable 2019-12-28 16:11:31 +01:00
Nicolas Grekas
725da2f218 Merge branch '4.4' into 5.0
* 4.4:
  Fixed #35084
  Add missing use statement
  [HttpClient] fix scheduling pending NativeResponse
  do not overwrite variable value
  [Profiler] wording
  Use spaces correctly to display options in DebugCommand
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
  add note about HTTP status code change
  Migrate server:log command away from WebServerBundle
  [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable
  [Security] Fix missing defaults for auto-migrating encoders
  bumped Symfony version to 4.4.3
  updated VERSION for 4.4.2
  updated CHANGELOG for 4.4.2
2019-12-28 16:09:49 +01:00
Nicolas Grekas
47f7cdc848 Merge branch '4.3' into 4.4
* 4.3:
  Fixed #35084
  Add missing use statement
  [HttpClient] fix scheduling pending NativeResponse
  do not overwrite variable value
  [Profiler] wording
  Use spaces correctly to display options in DebugCommand
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
2019-12-28 16:00:14 +01:00
Artem Brovko
5179af4796 [Translator] Performance improvement in MessageCatalogue and catalogue operations. 2019-12-28 16:59:49 +02:00
Nicolas Grekas
f3d8fd2521 bug #35120 [HttpClient] fix scheduling pending NativeResponse (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix scheduling pending NativeResponse

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

There must be one pending list per `ResponseStream` instance.
Currently, we start unrelated responses and this can lead to broken iterators when the unrelated response throws because it is a 3/4/5xx.

Commits
-------

a90a6c9c48 [HttpClient] fix scheduling pending NativeResponse
2019-12-28 15:54:06 +01:00
Nicolas Grekas
b6403d88c2 bug #35117 [Cache] do not overwrite variable value (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] do not overwrite variable value

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

Commits
-------

e379dbbf21 do not overwrite variable value
2019-12-28 15:53:10 +01:00
Dmitriy Derepko
340bb145d9 Fixed #35084 2019-12-28 15:52:14 +01:00
Nicolas Grekas
af4f99f52b Merge branch '3.4' into 4.3
* 3.4:
  Add missing use statement
  [Profiler] wording
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
2019-12-28 15:48:01 +01:00
Olivier Dolbeau
6fd266dba6 Add missing use statement 2019-12-27 12:18:21 +01:00
Nicolas Grekas
a90a6c9c48 [HttpClient] fix scheduling pending NativeResponse 2019-12-27 12:01:41 +01:00
Fabien Potencier
63dd7a310f bug #34673 Migrate server:log command away from WebServerBundle (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Migrate server:log command away from WebServerBundle

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

Duplicate ServerLogCommand in MonologBridge (currently in deprecated WebServerBundle) which does not have alternative in `symfony` bin.

Targeted 4.4 in order to provide a migration path to users.

Commits
-------

3bfa8dbb18 Migrate server:log command away from WebServerBundle
2019-12-27 10:06:25 +01:00
Christian Flothmann
e379dbbf21 do not overwrite variable value 2019-12-27 10:03:19 +01:00
Fabien Potencier
cee47cec05 bug #35103 [Translation] Use locale_parse for computing fallback locales (alanpoulain)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] Use `locale_parse` for computing fallback locales

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

As done in this PR https://github.com/symfony/symfony/pull/24157 for the `Intl` component, the `Translation` component should use `locale_parse` as well when available.

It will allow to manage [BCP 47](https://tools.ietf.org/html/bcp47) locales, which is why it is considered a bugfix ([locale_set_default](https://www.php.net/manual/en/locale.setdefault.php) is using BCP 47 compliant locale).

As done with the forementioned PR, there is also a fallback to make it work with `-`.

Sadly, I think it will create some conflicts when merging it upstream since the modified code has changed little by little.

Commits
-------

3657c0e664 Use locale_parse for computing fallback locales
2019-12-27 09:11:50 +01:00
noniagriconomie
e7c9a28a03 [Profiler] wording 2019-12-27 08:51:03 +01:00
Bastien Jaillot
53324986cb [FrameworkBundle] cache ClassMetadataFactory in debug
We already track modification in serialization/validator
config directory so we just need to clear the cache at
warmup.

Idea taken from apip:
https://github.com/api-platform/core/blob/master/src/Bridge/Symfony/Bundle/CacheWarmer/CachePoolClearerCacheWarmer.php
2019-12-27 01:45:06 +01:00
Robin Chalas
fd81bb8137 bug #35060 [Security] Fix missing defaults for auto-migrating encoders (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Fix missing defaults for auto-migrating encoders

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

Commits
-------

665ef06013 [Security] Fix missing defaults for auto-migrating encoders
2019-12-26 20:28:20 +01:00
tien.xuan.vo
75387433be [Console] Improve speed NullOutput 2019-12-26 16:51:30 +07:00
Nicolas Grekas
b138fbcb89 feature #34986 [Form] Added default inputmode attribute to Search, Email and Tel form types (fre5h)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Form] Added default `inputmode` attribute to Search, Email and Tel form types

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

There is an HTML5 attribute `inputmode`. See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode It is supported by most of mobile browsers.
There are such supported values for `inputmode`:
* `none`
* `text` (default value)
* `decimal`
* `numeric `
* `tel`
* `search`
* `email`
* `url`

The `url` inputmode is already implemented in UrlType https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/UrlType.php#L39

I propose to add `tel`, `search`, `email` as default form view attribute to the relevant form types. Why only these three? `url` is already implemented, `none` makes no sense as default value for any form type, `text` is a default input type for any browser.

`decimal` and `numeric` has different behaviour on iOS. iOS doesn't show `-` (minus) sign on keyboard for these input modes. Of course in cases, when only positive numbers are expected, it is normal. But it is not suitable as default value in Symfony form type. Developers can add this attribute manually in their forms, if they need only positive numbers.

But `search`, `tel` and `email` input modes don't have problems and can be added as default attributes to Symfony form types. This will improve user experience, while using web-sites developed on Symfony on mobile devices. I add it into the *Type classes inside `buildView` method, so it will be possible to override this parameter if needed.

If you are interested in how it looks like in mobile browsers, you can open this link https://inputmodes.com/ on you mobile device.

Here are screenshots, how mobile keyboard looks like on Android and iOS with using `inputmode` attribute.

## `tel` inputmode
![image](https://user-images.githubusercontent.com/815865/70866507-45256480-1f73-11ea-9e82-320ef0b978ab.png)

## `email` inputmode
![image](https://user-images.githubusercontent.com/815865/70866502-3a6acf80-1f73-11ea-8f4c-3e7faca47f54.png)

## `search` inputmode
![image](https://user-images.githubusercontent.com/815865/70866498-2cb54a00-1f73-11ea-9fdc-2bb8abed107d.png)

Commits
-------

dbc500feb7 [Form] Added default `inputmode` attribute to Search, Email and Tel form types
2019-12-26 10:32:31 +01:00
Artem Henvald
dbc500feb7 [Form] Added default inputmode attribute to Search, Email and Tel form types 2019-12-26 10:32:18 +01:00
Nicolas Grekas
40c2ce4e43 minor #34768 [FrameworkBundle] Remove env var table from AboutCommand (tuqqu)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Remove env var table from AboutCommand

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

Fixed AboutCommand output by shortening environment variable value (replacing with `...`) to fit the screen width if the value is too long.

Right now all output is a mess if it does not fit in the terminal window.

Commits
-------

6962da93c1 [FrameworkBundle] Remove env var table from AboutCommand
2019-12-26 10:16:45 +01:00
tuqqu
6962da93c1 [FrameworkBundle] Remove env var table from AboutCommand 2019-12-26 10:16:39 +01:00
Thomas Calvet
c369598b05 [String] Add the reverse method 2019-12-26 10:01:21 +01:00
Nicolas Grekas
aac9ca2a88 bug #35067 [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable

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

Commits
-------

d6a7fbfbc3 [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable
2019-12-26 09:58:10 +01:00
Nicolas Grekas
cdaebf6fb8 minor #35079 [Serializer] add array cache in front of serializer cache (bastnic)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Serializer] add array cache in front of serializer cache

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | performance
| New feature?  | ...
| Deprecations? | no
| Tickets       | #35041
| License       | MIT
| Doc PR        |

This is another implementation of #35041, after #35046.

The DI solution is cleaner, but 10ms slower on my scenario (13 vs 3) and this data is not supposed to change at all (even in the original method there is a local cache).

Diff from master (without warmup):

![image](https://user-images.githubusercontent.com/84887/71313592-2cb5be00-243b-11ea-8983-b30abb7d0698.png)

Diff form master (with warmup):

![image](https://user-images.githubusercontent.com/84887/71313633-8e762800-243b-11ea-8044-003c810d3c0b.png)

Diff from #35046:

![image](https://user-images.githubusercontent.com/84887/71313668-312ea680-243c-11ea-9768-8531f4f33f3c.png)

Ping @nicolas-grekas

Commits
-------

6ee306bf33 [Cache] add array cache in front of serializer cache
2019-12-26 09:39:22 +01:00
Ruud Kamphuis
1c92e9e2f1 Use spaces correctly to display options in DebugCommand 2019-12-26 09:29:54 +01:00
Nicolas Grekas
9095838d57 minor #35093 [String][UnicodeString] Remove unneeded flag in chunk regex pattern (fancyweb)
This PR was merged into the 5.0 branch.

Discussion
----------

[String][UnicodeString] Remove unneeded flag in chunk regex pattern

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

The pattern cannot contain a `.`.

Commits
-------

dcb7c9a484 [String][UnicodeString] Remove unneeded flag in chunk regex pattern
2019-12-26 09:17:00 +01:00
Philippe Segatori
9bf46f88fb Add supported schemes doc blocks type 2019-12-26 09:06:53 +01:00
Shaharia Azam
4557221597 X-Accel Nginx URL updated
Obsolete URL has been updated
2019-12-26 09:05:33 +01:00
Islam93
36f07b7e09 ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale 2019-12-26 09:01:24 +01:00
Nicolas Grekas
412fcf5463 minor #35056 Fixed test added in #35022 (GrahamCampbell)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixed test added in #35022

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4, 4.3, 4.4 or 5.0 for bug fixes <!-- see below -->
| Bug fix?      | yes/no
| New feature?  | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

Commits
-------

6eeec7c270 Fixed test added in #35022
2019-12-26 08:58:50 +01:00
Graham Campbell
6eeec7c270 Fixed test added in #35022 2019-12-26 08:58:28 +01:00
Ruud Kamphuis
4e6626ca63
Log sender alias in SendMessageMiddleware
This makes it easier to read which sender alias was used.
2019-12-25 15:44:46 +01:00
Alan Poulain
3657c0e664
Use locale_parse for computing fallback locales 2019-12-24 19:50:33 +01:00
Jérémy Derussé
2f608b4dfa
Do not throw exception on valut generate key 2019-12-24 14:11:19 +01:00
Thomas Calvet
589e93e3b7 [Console] Fix filtering out identical alternatives when there is a command loader 2019-12-24 12:07:31 +01:00
Thomas Calvet
dcb7c9a484 [String][UnicodeString] Remove unneeded flag in chunk regex pattern 2019-12-23 19:25:43 +01:00
Jérémy Derussé
3bfa8dbb18
Migrate server:log command away from WebServerBundle 2019-12-23 16:01:49 +01:00
Bastien Jaillot
6ee306bf33 [Cache] add array cache in front of serializer cache 2019-12-22 10:07:48 +01:00
Thomas Calvet
d6a7fbfbc3 [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable 2019-12-20 17:42:47 +01:00
Lynn
d3942cbe17 Use supportsClass where possible 2019-12-20 16:07:22 +01:00
Robin Chalas
665ef06013 [Security] Fix missing defaults for auto-migrating encoders 2019-12-19 23:42:08 +01:00
Fabien Potencier
10d26470bd bumped Symfony version to 5.0.3 2019-12-19 19:38:31 +01:00
Fabien Potencier
c57e7ad82a updated VERSION for 5.0.2 2019-12-19 19:35:03 +01:00
Fabien Potencier
6dc0c38351 bumped Symfony version to 4.4.3 2019-12-19 19:32:23 +01:00
Fabien Potencier
7fe9115db5 updated VERSION for 4.4.2 2019-12-19 17:23:40 +01:00
Nicolas Grekas
4e5b15353d Merge branch '5.0'
* 5.0:
  [DependencyInjection] Fix binding tagged services to containers
  [ProxyManager] fix generating proxies for root-namespaced classes
  [DoctrineBridge] Cleanup 3.4 legacy
  [DI] skip looking for config class when the extension class is anonymous
  Fix typo
  Docs - Update debug section of UPGRADE guides for 4.4 and 5.0 versions.
  Fix invalid typehint for subject in is_granted Twig function
  [Dotenv] FIX missing getenv
  [HttpFoundation] fix pdo session handler for sqlsrv
  [HttpClient][Psr18Client] Remove Psr18ExceptionTrait
  [HttpKernel] ignore failuresgenerated by opcache.restrict_api
2019-12-19 17:01:26 +01:00
Nicolas Grekas
582eb5c26b Merge branch '4.4' into 5.0
* 4.4:
  [DependencyInjection] Fix binding tagged services to containers
  [ProxyManager] fix generating proxies for root-namespaced classes
  [DI] skip looking for config class when the extension class is anonymous
  Fix typo
  Docs - Update debug section of UPGRADE guides for 4.4 and 5.0 versions.
  [Dotenv] FIX missing getenv
  [HttpFoundation] fix pdo session handler for sqlsrv
  [HttpClient][Psr18Client] Remove Psr18ExceptionTrait
  [HttpKernel] ignore failuresgenerated by opcache.restrict_api
2019-12-19 17:01:11 +01:00
Nicolas Grekas
1dc833d836 bug #35051 [DependencyInjection] Fix binding tagged services to containers (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix binding tagged services to containers

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

We missed this part in #33623

Commits
-------

9d48ba4f11 [DependencyInjection] Fix binding tagged services to containers
2019-12-19 17:00:02 +01:00
Nicolas Grekas
9d48ba4f11 [DependencyInjection] Fix binding tagged services to containers 2019-12-19 16:58:53 +01:00
Nicolas Grekas
c4ec3c24f2 Merge branch '4.3' into 4.4
* 4.3:
  [ProxyManager] fix generating proxies for root-namespaced classes
  [DI] skip looking for config class when the extension class is anonymous
  Fix typo
  [Dotenv] FIX missing getenv
  [HttpClient][Psr18Client] Remove Psr18ExceptionTrait
2019-12-19 16:57:49 +01:00
Nicolas Grekas
dfa118f253 Merge branch '3.4' into 4.3
* 3.4:
  [ProxyManager] fix generating proxies for root-namespaced classes
  [DI] skip looking for config class when the extension class is anonymous
  Fix typo
  [Dotenv] FIX missing getenv
2019-12-19 16:57:24 +01:00
Nicolas Grekas
135c6f7d9d bug #35039 [DI] skip looking for config class when the extension class is anonymous (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] skip looking for config class when the extension class is anonymous

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

Commits
-------

1c7eda4649 [DI] skip looking for config class when the extension class is anonymous
2019-12-19 16:52:25 +01:00
Nicolas Grekas
a47ae10a9d [ProxyManager] fix generating proxies for root-namespaced classes 2019-12-19 15:39:15 +01:00
Roland Franssen
6041be79c3
[DoctrineBridge] Cleanup 3.4 legacy 2019-12-19 13:10:29 +01:00
Nicolas Grekas
1c7eda4649 [DI] skip looking for config class when the extension class is anonymous 2019-12-19 11:27:02 +01:00
Fabien Potencier
5e9fa9d75e Fix typo 2019-12-19 10:48:27 +01:00
Fabien Potencier
bd9dc7c573 feature #35029 [DI] allow "." and "-" in env processor lines (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] allow "." and "-" in env processor lines

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

As explained in the linked issue, this is especially usefull with the `key` processor.

Commits
-------

231c505a47 [DI] allow "." and "-" in env processor lines
2019-12-19 08:07:55 +01:00
Nicolas Grekas
40c135125a bug #35021 [DI] Enable inline_class_loader in debug mode (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] Enable inline_class_loader in debug mode

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

Similar to https://github.com/symfony/recipes/pull/713
Check https://twitter.com/nicolasgrekas/status/929032213815005184
and https://github.com/symfony/symfony/pull/26276

Commits
-------

317ce6d16e [DI] Enable inline_class_loader in debug mode
2019-12-18 23:07:10 +01:00
Nicolas Grekas
b0eb6f36eb bug #35023 [HttpKernel] ignore failures generated by opcache.restrict_api (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] ignore failures generated by opcache.restrict_api

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

Commits
-------

e411b65dd0 [HttpKernel] ignore failuresgenerated by opcache.restrict_api
2019-12-18 22:42:09 +01:00
Nicolas Grekas
231c505a47 [DI] allow "." and "-" in env processor lines 2019-12-18 17:27:44 +01:00
Edi Modrić
d3d86ce250
Fix invalid typehint for subject in is_granted Twig function 2019-12-18 17:23:52 +01:00
Alexander McCullagh
9c5754acaa [Dotenv] FIX missing getenv 2019-12-18 16:41:13 +01:00
Saif Eddin G
776f649c61
[HttpFoundation] fix pdo session handler for sqlsrv 2019-12-18 16:15:58 +01:00
Thomas Calvet
c1746d8b14 [HttpClient][Psr18Client] Remove Psr18ExceptionTrait 2019-12-18 16:09:34 +01:00
Nicolas Grekas
e411b65dd0 [HttpKernel] ignore failuresgenerated by opcache.restrict_api 2019-12-18 15:43:30 +01:00
Nicolas Grekas
9960f3032a Merge branch '5.0'
* 5.0:
  [Config] improve perf of glob discovery when GLOB_BRACE is not available
  use utf8mb4_bin to align code with documentation
  [HttpClient] make pushed responses retry-able
  [VarDumper] ignore failing __debugInfo()
2019-12-18 14:50:41 +01:00
Nicolas Grekas
c048ea5de5 Merge branch '4.4' into 5.0
* 4.4:
  [Config] improve perf of glob discovery when GLOB_BRACE is not available
  use utf8mb4_bin to align code with documentation
  [HttpClient] make pushed responses retry-able
  [VarDumper] ignore failing __debugInfo()
2019-12-18 14:50:31 +01:00
Nicolas Grekas
d7a0679011 bug #35015 [Config] fix perf of glob discovery when GLOB_BRACE is not available (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Config] fix perf of glob discovery when GLOB_BRACE is not available

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

This PR implements a fast fallback implementation of GLOB_BRACE for musl-based libc, as found on Alpine. It is *not* a feature-complete fallback implementation. Implementing one would be [much more involving](https://github.com/zendframework/zend-stdlib/blob/master/src/Glob.php). But the provided implementation is good enough in practice IMHO, and the slow path is still used when not-covered glob patterns are used.

Here is the comparison:
![image](https://user-images.githubusercontent.com/243674/71022909-eb9f7000-2101-11ea-99f5-eab0286c77a3.png)

![image](https://user-images.githubusercontent.com/243674/71022899-e4786200-2101-11ea-8663-80c1674602db.png)

Commits
-------

8af6d86371 [Config] improve perf of glob discovery when GLOB_BRACE is not available
2019-12-18 14:46:16 +01:00
Nicolas Grekas
b450a2bed7 Merge branch '4.3' into 4.4
* 4.3:
  use utf8mb4_bin to align code with documentation
  [HttpClient] make pushed responses retry-able
  [VarDumper] ignore failing __debugInfo()
2019-12-18 14:41:29 +01:00
Nicolas Grekas
bbf7ed12b1 bug #35014 [HttpClient] make pushed responses retry-able (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] make pushed responses retry-able

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/orgs/symfony/projects/1#card-30499375
| License       | MIT
| Doc PR        | -

This moves the PUSH matching logic down so that the curl handle of pushed responses can be properly configured. This should make pushed requests retry-able when they fail just after the push-promise frame.

Commits
-------

c2864f65ab [HttpClient] make pushed responses retry-able
2019-12-18 14:38:49 +01:00
Nicolas Grekas
026d57e196 Merge branch '3.4' into 4.3
* 3.4:
  use utf8mb4_bin to align code with documentation
  [VarDumper] ignore failing __debugInfo()
2019-12-18 14:36:54 +01:00
Nicolas Grekas
e85acddc9a bug #35010 [VarDumper] ignore failing __debugInfo() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] ignore failing __debugInfo()

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

Commits
-------

eb2eb76d0e [VarDumper] ignore failing __debugInfo()
2019-12-18 14:29:30 +01:00
Robin Chalas
39bd706cbf feature #34548 Added access decision strategy to respect voter priority (aschempp)
This PR was squashed before being merged into the 5.1-dev branch (closes #34548).

Discussion
----------

Added access decision strategy to respect voter priority

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | _will happily do if this is of interest/to be merged 🙃_

The priority-based access decision strategy will decide based on the first voter that does not abstain from the decision. Security voters can be registered with priority (`PriorityTaggedServiceTrait`), so a voter with higher priority can overrule other voters.

In [Contao CMS](https://github.com/contao/contao), the core system should provide security voters that provide the "default permissions", but extensions/bundles can override almost anything and therefore need to be able to override the core decision. None of the existing strategies allow for something like that.

/ping @chalasr @Toflar @leofeyer @ausi
#SymfonyHackday

Commits
-------

0b8028a0ec Added access decision strategy to respect voter priority
2019-12-18 14:26:38 +01:00
Andreas Schempp
0b8028a0ec Added access decision strategy to respect voter priority 2019-12-18 14:26:30 +01:00
Nicolas Grekas
8af6d86371 [Config] improve perf of glob discovery when GLOB_BRACE is not available 2019-12-18 13:00:29 +01:00
Nicolas Grekas
317ce6d16e [DI] Enable inline_class_loader in debug mode 2019-12-18 12:53:53 +01:00
Ben Davies
3739ec9f29 use utf8mb4_bin to align code with documentation 2019-12-18 10:25:03 +00:00
Nicolas Grekas
c2864f65ab [HttpClient] make pushed responses retry-able 2019-12-17 17:19:12 +01:00
Nicolas Grekas
eb2eb76d0e [VarDumper] ignore failing __debugInfo() 2019-12-17 16:56:06 +01:00
Nicolas Grekas
76c98fda98 Merge branch '5.0'
* 5.0:
  [Console][QuestionHelper] Use string type declaration
2019-12-17 15:24:10 +01:00
Thomas Calvet
a594fe405b [Console][QuestionHelper] Use string type declaration 2019-12-17 14:20:22 +01:00
Nicolas Grekas
1b6c71200f Merge branch '5.0'
* 5.0:
  [DI] revert reordering of ResolveFactoryClassPass and AutowireRequiredMethodsPass in PassConfig
2019-12-17 13:18:30 +01:00
Nicolas Grekas
3c672bc923 Merge branch '4.4' into 5.0
* 4.4:
  [DI] revert reordering of ResolveFactoryClassPass and AutowireRequiredMethodsPass in PassConfig
2019-12-17 13:17:37 +01:00
Nicolas Grekas
32b09a8461 Merge branch '4.3' into 4.4
* 4.3:
  [DI] revert reordering of ResolveFactoryClassPass and AutowireRequiredMethodsPass in PassConfig
2019-12-17 13:17:04 +01:00
Nicolas Grekas
2b0f9d6bd9 [DI] revert reordering of ResolveFactoryClassPass and AutowireRequiredMethodsPass in PassConfig 2019-12-17 13:15:16 +01:00
Nicolas Grekas
8ffdef2958 Merge branch '5.0'
* 5.0:
  [DI] Service locators can't be decorated
  [HttpClient] force HTTP/1.1 when NTLM auth is used
  [Validation][FrameworkBundle] Allow EnableAutoMapping to work without auto-mapping namespaces
  [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt
  [DI] fix auto-binding service providers to their service subscribers
  [Mailer] fixed undefined index when sending mail
2019-12-17 11:36:18 +01:00
Nicolas Grekas
3c348df73b Merge branch '4.4' into 5.0
* 4.4:
  [DI] Service locators can't be decorated
  [HttpClient] force HTTP/1.1 when NTLM auth is used
  [Validation][FrameworkBundle] Allow EnableAutoMapping to work without auto-mapping namespaces
  [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt
  [DI] fix auto-binding service providers to their service subscribers
  [Mailer] fixed undefined index when sending mail
2019-12-17 11:33:13 +01:00
Nicolas Grekas
4b93c6210d Merge branch '4.3' into 4.4
* 4.3:
  [DI] Service locators can't be decorated
  [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt
  [DI] fix auto-binding service providers to their service subscribers
2019-12-17 11:32:23 +01:00
Nicolas Grekas
91016348ba Merge branch '3.4' into 4.3
* 3.4:
  [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt
2019-12-17 11:30:23 +01:00
Nicolas Grekas
8c74562dd8 bug #34998 [DI] fix auto-binding service providers to their service subscribers (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[DI] fix auto-binding service providers to their service subscribers

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/orgs/symfony/projects/1#card-30503621
| License       | MIT
| Doc PR        | -

Spotted during a workshop at SymfonyLive Sao Paulo if I recall well :)

Commits
-------

6c2ceb0c44 [DI] fix auto-binding service providers to their service subscribers
2019-12-17 11:27:58 +01:00
Nicolas Grekas
07bfe6bae5 bug #34954 [Mailer] Fixed undefined index when sending via Mandrill API (wulff)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Fixed undefined index when sending via Mandrill API

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

When a [Mandrill API send request](https://www.mandrillapp.com/api/docs/messages.JSON.html#method=send) is succesful, it returns an array of results, one for each recipient. To get rid of the undefined index error, we grab the message ID from the first recipient in the array.

Commits
-------

ef0aa4dc87 [Mailer] fixed undefined index when sending mail
2019-12-17 11:26:47 +01:00
Nicolas Grekas
672fbf5a2b bug #33670 [DI] Service locators can't be decorated (malarzm)
This PR was squashed before being merged into the 4.3 branch.

Discussion
----------

[DI] Service locators can't be decorated

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

This popped up while I was trying to update my work project as we have decorated the `messenger.receiver_locator` service. Not sure if this is a regression in DI or a change in messenger that caused the issue thus I'm not marking this as a BC break.

Exception while trying to compile the container:

```
Invalid definition for service "Symfony\Component\DependencyInjection\Tests\Compiler\DecoratedServiceLocator": an array of references is expected as first argument when the "container.service_locator" tag is set.
```

Expected result: service locator can be decorated.

Commits
-------

343282b9d4 [DI] Service locators can't be decorated
2019-12-17 11:22:17 +01:00
Maciej Malarz
343282b9d4 [DI] Service locators can't be decorated 2019-12-17 11:22:10 +01:00
Nicolas Grekas
ae9c41cb16 bug #35000 [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt

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

Replaces / finishes https://github.com/symfony/symfony/pull/33911

Commits
-------

f175032ed8 [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt
2019-12-17 11:19:24 +01:00
Nicolas Grekas
cb96f143da bug #35005 [HttpClient] force HTTP/1.1 when NTLM auth is used (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] force HTTP/1.1 when NTLM auth is used

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

NTLM requires HTTP/1.1.

Commits
-------

0e87e9b960 [HttpClient] force HTTP/1.1 when NTLM auth is used
2019-12-17 11:18:26 +01:00
Nicolas Grekas
45d65cc000 feature #34881 [FrameworkBundle] Allow using the kernel as a registry of controllers and service factories (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Allow using the kernel as a registry of controllers and service factories

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #28992, fix #29997
| License       | MIT
| Doc PR        | -

This PR builds on #34873 and #34872 and allows using the `Kernel` as a registry of autowired controllers and service factories. The `ContainerConfigurator` passed to `configureContainer()` defaults to declaring autowired and autoconfigured services.

TL;DR: Silex is back but in a much more powerful way \o/

Here is a Kernel that just works and displays `Hello App\Foo` on the `/` route:
```php
class Kernel extends BaseKernel
{
    use MicroKernelTrait;

    protected function configureContainer(ContainerConfigurator $container): void
    {
        $container->services()
            ->load('App\\', '../src')
            ->set(Foo::class)
                ->factory([$this, 'createFoo']);
    }

    public function createFoo(Bar $bar)
    {
        return new Foo($bar);
    }

    protected function configureRoutes(RoutingConfigurator $routes): void
    {
        $routes->add('home', '/')->controller([$this, 'helloAction']);
    }

    public function helloAction(Foo $foo)
    {
        return new Response('Hello '.get_class($foo));
    }
}
```

Commits
-------

9c9b99cc65 [FrameworkBundle] Allow using the kernel as a registry of controllers and service factories
2019-12-17 11:12:34 +01:00
Nicolas Grekas
0e87e9b960 [HttpClient] force HTTP/1.1 when NTLM auth is used 2019-12-17 10:59:36 +01:00
Maxime Steinhausser
00b46fa72e [Validation][FrameworkBundle] Allow EnableAutoMapping to work without auto-mapping namespaces 2019-12-17 09:15:02 +01:00
fancyweb
f175032ed8 [Console][SymfonyQuestionHelper] Handle multibytes question choices keys and custom prompt
Co-authored-by: Mikhail Fesenko <m.fesenko@corp.vk.com>
2019-12-17 09:06:44 +01:00
Nicolas Grekas
6c2ceb0c44 [DI] fix auto-binding service providers to their service subscribers 2019-12-16 19:47:19 +01:00
Nicolas Grekas
a44f58bd79 Merge branch '5.0'
* 5.0:
  Fix displaying anonymous classes on PHP 7.4
  Fix merge
2019-12-16 15:48:59 +01:00
Nicolas Grekas
6fe308bb2a Merge branch '4.4' into 5.0
* 4.4:
  Fix displaying anonymous classes on PHP 7.4
  Fix merge
2019-12-16 15:48:47 +01:00
Nicolas Grekas
4e44baf1bb Merge branch '4.3' into 4.4
* 4.3:
  Fix displaying anonymous classes on PHP 7.4
2019-12-16 15:46:54 +01:00
Nicolas Grekas
c36568a1ed Fix displaying anonymous classes on PHP 7.4 2019-12-16 15:20:08 +01:00