Commit Graph

38312 Commits

Author SHA1 Message Date
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
Nicolas Grekas
57361a5ab8 Fix merge 2019-12-16 15:00:54 +01:00
Nicolas Grekas
0b23153f4f Merge branch '5.0'
* 5.0:
  Skip deprecations from doctrine/orm
  Ignore deprecations about doctrine/persistence coming from doctrine/orm
  skip not applicable tests
2019-12-16 14:35:24 +01:00
Nicolas Grekas
2e878378ef Merge branch '4.4' into 5.0
* 4.4:
  Skip deprecations from doctrine/orm
  Ignore deprecations about doctrine/persistence coming from doctrine/orm
  skip not applicable tests
2019-12-16 14:35:13 +01:00
Nicolas Grekas
0dea24fa8c Merge branch '4.3' into 4.4
* 4.3:
  Skip deprecations from doctrine/orm
  Ignore deprecations about doctrine/persistence coming from doctrine/orm
  skip not applicable tests
2019-12-16 14:34:43 +01:00
Nicolas Grekas
c8f3053be8 feature #34977 [EventDispatcher] Deprecate LegacyEventDispatcherProxy (derrabus)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[EventDispatcher] Deprecate LegacyEventDispatcherProxy

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | yes
| Tickets       | Cleanup of #28920
| License       | MIT
| Doc PR        | N/A

> This class should be deprecated in Symfony 5.1

Well, here you go. 😃

Commits
-------

c7e612d4ad [EventDispatcher] Deprecate LegacyEventDispatcherProxy.
2019-12-16 12:38:33 +01:00
Christian Flothmann
f51538d581 minor #34994 [Validator] skip not applicable tests (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Validator] skip not applicable tests

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

Commits
-------

227c38180f skip not applicable tests
2019-12-16 12:34:11 +01:00
Christian Flothmann
227c38180f skip not applicable tests 2019-12-16 12:22:11 +01:00
Nicolas Grekas
700d2d39ca Merge branch '5.0'
* 5.0:
  Use `::class` constants instead of `__NAMESPACE__` when possible
2019-12-16 12:08:33 +01:00
Nicolas Grekas
4eadeb70a9 Merge branch '4.4' into 5.0
* 4.4:
  Use `::class` constants instead of `__NAMESPACE__` when possible
2019-12-16 12:08:25 +01:00
Nicolas Grekas
c05245d5a9 Merge branch '4.3' into 4.4
* 4.3:
  Use `::class` constants instead of `__NAMESPACE__` when possible
2019-12-16 12:07:37 +01:00
Nicolas Grekas
7d9945e24a Merge branch '3.4' into 4.3
* 3.4:
  Use `::class` constants instead of `__NAMESPACE__` when possible
2019-12-16 12:02:49 +01:00
Nicolas Grekas
cfd4194e20 minor #34990 Use ::class constants instead of __NAMESPACE__ when possible (fre5h)
This PR was merged into the 3.4 branch.

Discussion
----------

Use `::class` constants instead of `__NAMESPACE__` when possible

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

Form component has a lot of built-in form types. Some of them were implemented from the very beginning. In most of them there is a such method

```php
    /**
     * {@inheritdoc}
     */
    public function getParent()
    {
        return __NAMESPACE__.'\TextType';
    }
```

This `getParent()` method was refactored in Symfony 2.8. The upgrade instructions are given here https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form

I think the `__NAMESPACE__.'\TextType';` expression was used because Symfony 2.8 was using `"php": ">=5.3.9"`, and the constant `::class` was added only in PHP 5.5

Now this line can be refactored into
```php
    /**
     * {@inheritdoc}
     */
    public function getParent()
    {
        return TextType::class;
    }
```

For example new form types, that were added later, already using the `::class` constant.
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/ColorType.php#L23
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/TelType.php#L23

So, in this pull request I propose to refactor all old form types to use `::class` constant. It will give a benefit during the future refactoring, because IDE or static analysers will find all usages of parent class. Unlike the `__NAMESPACE__.'\TextType';` line, which doesn't show the real link to the class for IDE or static analysers, and it could complicate finding all usages of parent class.

Commits
-------

32bf50abca Use `::class` constants instead of `__NAMESPACE__` when possible
2019-12-16 11:55:12 +01:00
Nicolas Grekas
be0e04b84a Merge branch '5.0'
* 5.0: (21 commits)
  fix merge
  CS
  [FrameworkBundle][ContainerLintCommand] Improve messages when the kernel or the container is not supported
  [Serializer] Skip uninitialized (PHP 7.4) properties in PropertyNormalizer and ObjectNormalizer
  stop using deprecated Doctrine persistence classes
  [Cache] Fix wrong classname in deprecation message
  Fix regex lookahead syntax in ApplicationTest
  Fixed syntax in comment
  [SecurityBundle][FirewallMap] Remove unused property
  [Messenger][AMQP] Use delivery_mode=2 by default
  [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass
  [SECURITY] Revert "AbstractAuthenticationListener.php error instead info. Rebase of #28462"
  [FrameworkBundle][Secrets] Hook configured local dotenv file
  [DI] Improve performance of processDefinition
  fix redis multi host dsn not recognized
  fix constructor argument type declaration
  Fix invalid Windows path normalization
  [Validator][ConstraintValidator] Safe fail on invalid timezones
  [DoctrineBridge] Fixed submitting invalid ids when using queries with limit
  [FrameworkBundle] Add info & example to auto_mapping config
  ...
2019-12-16 11:48:49 +01:00
Nicolas Grekas
525d7bf716 Merge branch '4.4' into 5.0
* 4.4: (21 commits)
  fix merge
  CS
  [FrameworkBundle][ContainerLintCommand] Improve messages when the kernel or the container is not supported
  [Serializer] Skip uninitialized (PHP 7.4) properties in PropertyNormalizer and ObjectNormalizer
  stop using deprecated Doctrine persistence classes
  [Cache] Fix wrong classname in deprecation message
  Fix regex lookahead syntax in ApplicationTest
  Fixed syntax in comment
  [SecurityBundle][FirewallMap] Remove unused property
  [Messenger][AMQP] Use delivery_mode=2 by default
  [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass
  [SECURITY] Revert "AbstractAuthenticationListener.php error instead info. Rebase of #28462"
  [FrameworkBundle][Secrets] Hook configured local dotenv file
  [DI] Improve performance of processDefinition
  fix redis multi host dsn not recognized
  fix constructor argument type declaration
  Fix invalid Windows path normalization
  [Validator][ConstraintValidator] Safe fail on invalid timezones
  [DoctrineBridge] Fixed submitting invalid ids when using queries with limit
  [FrameworkBundle] Add info & example to auto_mapping config
  ...
2019-12-16 11:47:49 +01:00
Nicolas Grekas
68681e49f2 Merge branch '4.3' into 4.4
* 4.3:
  fix merge
  CS
  [Serializer] Skip uninitialized (PHP 7.4) properties in PropertyNormalizer and ObjectNormalizer
  stop using deprecated Doctrine persistence classes
  [Cache] Fix wrong classname in deprecation message
  Fix regex lookahead syntax in ApplicationTest
  Fixed syntax in comment
  [SecurityBundle][FirewallMap] Remove unused property
  [Messenger][AMQP] Use delivery_mode=2 by default
  [DI] Improve performance of processDefinition
  Fix invalid Windows path normalization
  [Validator][ConstraintValidator] Safe fail on invalid timezones
  [DoctrineBridge] Fixed submitting invalid ids when using queries with limit
  [FrameworkBundle] Add info & example to auto_mapping config
  fix comparisons with null values at property paths
2019-12-16 11:45:21 +01:00
Nicolas Grekas
64410edfb3 fix merge 2019-12-16 11:44:01 +01:00
Nicolas Grekas
02c1cda67e Merge branch '3.4' into 4.3
* 3.4:
  CS
  [Serializer] Skip uninitialized (PHP 7.4) properties in PropertyNormalizer and ObjectNormalizer
  stop using deprecated Doctrine persistence classes
  Fix regex lookahead syntax in ApplicationTest
  [SecurityBundle][FirewallMap] Remove unused property
  [DI] Improve performance of processDefinition
  Fix invalid Windows path normalization
  [Validator][ConstraintValidator] Safe fail on invalid timezones
  [DoctrineBridge] Fixed submitting invalid ids when using queries with limit
  fix comparisons with null values at property paths
2019-12-16 11:33:29 +01:00
Artem Henvald
32bf50abca Use ::class constants instead of __NAMESPACE__ when possible 2019-12-16 11:25:54 +01:00
Christian Flothmann
a073606ea8 bug #29839 [Validator] fix comparisons with null values at property paths (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] fix comparisons with null values at property paths

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

Commits
-------

ffa5db74c1 fix comparisons with null values at property paths
2019-12-16 09:55:48 +01:00
Robin Chalas
ab8841e248 minor #34991 CS for AccessDecisionManager (aschempp)
This PR was merged into the 3.4 branch.

Discussion
----------

CS for AccessDecisionManager

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

As discussed in #34548 with @nicolas-grekas here's a CS change for the `AccessDecisionManager`

Commits
-------

b3742ec493 CS
2019-12-16 00:50:24 +01:00
Alexander M. Turek
c7e612d4ad [EventDispatcher] Deprecate LegacyEventDispatcherProxy. 2019-12-15 23:54:05 +01:00
Andreas Schempp
b3742ec493 CS 2019-12-15 22:30:08 +01:00
gauss
0e92399daa [DI] Suggest typed argument when binding fails with untyped argument 2019-12-15 19:13:51 +01:00
Thomas Calvet
6986394042 [FrameworkBundle][ContainerLintCommand] Improve messages when the kernel or the container is not supported 2019-12-15 18:41:51 +01:00
Fabien Potencier
af39d09ed7 minor #34887 [FrameworkBundle] Add info & example to auto_mapping config (ogizanagi)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] Add info & example to auto_mapping config

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

Backport part of #34707 and add example.

Commits
-------

8eb29a7b73 [FrameworkBundle] Add info & example to auto_mapping config
2019-12-15 14:50:41 +01:00
Fabien Potencier
658c714f77 bug #34900 [DoctrineBridge] Fixed submitting invalid ids when using queries with limit (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] Fixed submitting invalid ids when using queries with limit

| Q             | A
| ------------- | ---
| Branch?       | 3.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       | Fix #31559 <!-- prefix each issue number with "Fix #", if any -->
| 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
-------

09bb1e49d8 [DoctrineBridge] Fixed submitting invalid ids when using queries with limit
2019-12-15 14:49:19 +01:00
Fabien Potencier
8f42a7679d bug #34791 [Serializer] Skip uninitialized (PHP 7.4) properties in PropertyNormalizer and ObjectNormalizer (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #34791).

Discussion
----------

[Serializer] Skip uninitialized (PHP 7.4) properties in PropertyNormalizer and ObjectNormalizer

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

When trying to read from an uninitialized property in PHP 7.4, a `TypeError` is generated, see https://wiki.php.net/rfc/typed_properties_v2#uninitialized_and_unset_properties. This PR fixes the issue.

Commits
-------

1ed8e42d15 [Serializer] Skip uninitialized (PHP 7.4) properties in PropertyNormalizer and ObjectNormalizer
2019-12-15 14:47:04 +01:00
Valentin Udaltsov
1ed8e42d15 [Serializer] Skip uninitialized (PHP 7.4) properties in PropertyNormalizer and ObjectNormalizer 2019-12-15 14:46:58 +01:00
Fabien Potencier
91f79e269d bug #34956 [Messenger][AMQP] Use delivery_mode=2 by default (lyrixx)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger][AMQP] Use delivery_mode=2 by default

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

Commits
-------

be2eb6fcc7 [Messenger][AMQP] Use delivery_mode=2 by default
2019-12-15 14:44:54 +01:00
Fabien Potencier
00c775e271 bug #34915 [FrameworkBundle] Fix invalid Windows path normalization in TemplateNameParser (mvorisek)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix invalid Windows path normalization in TemplateNameParser

| Q             | A
| ------------- | ---
| Branch?       | 3.4 - <5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | no
| License       | MIT
| Doc PR        | Fix invalid Windows path normalization

All versions of Symfony until 5.0 (which does no longer do extra file path normalization) normalize Windows paths wrongly.

See https://github.com/PrestaShop/PrestaShop/issues/16736 and https://bugs.php.net/bug.php?id=78939

Currently this issue can be observed when Symfony is run by NTS PHP only, but once the PHP issue will be fixed, this issue will probably affects all Windows users when absolute template name is passed to Symfony templating.

Commits
-------

130df8ca8c Fix invalid Windows path normalization
2019-12-15 14:43:43 +01:00
Nicolas Grekas
2ecdc3ac36 minor #34966 [DI] Improve performance of processDefinition (Stefan Kruppa)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Improve performance of processDefinition

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

Saves some time during container compilation by instantiating the reflection class only once. In my case this speeds up container compilation in dev mode by ~10% (saves almost 100k calls to `getReflectionClass`).

Tests still run locally and my compiled container was identical pre and post change, but I found this improvement by Blackfire profiling and am not familiar with the surrounding code, so it would be great if someone could doublecheck if the change causes problems.

Commits
-------

41b56eac29 [DI] Improve performance of processDefinition
2019-12-15 11:05:21 +01:00
Nicolas Grekas
28bf18089a minor #34976 Fix regex lookahead syntax in ApplicationTest (guilliamxavier)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix regex lookahead syntax in ApplicationTest

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

`(?>!1)` is actually an atomic group for literal `!1`.
`(?!1)` is a negative lookahead assertion for literal `1`.

Commits
-------

cf1d7b2ed1 Fix regex lookahead syntax in ApplicationTest
2019-12-15 10:58:22 +01:00
Nicolas Grekas
2b40bb4f4e bug #34981 stop using deprecated Doctrine persistence classes (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

stop using deprecated Doctrine persistence classes

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

Commits
-------

4db5f022a1 stop using deprecated Doctrine persistence classes
2019-12-15 10:51:14 +01:00
Christian Flothmann
4db5f022a1 stop using deprecated Doctrine persistence classes 2019-12-15 08:53:25 +01:00
Anto
c7115a3087
[Cache] Fix wrong classname in deprecation message 2019-12-14 09:13:00 +01:00
Guilliam Xavier
cf1d7b2ed1
Fix regex lookahead syntax in ApplicationTest 2019-12-13 21:47:04 +01:00
Tobias Nyholm
20f9a5bbb0
Fixed syntax in comment 2019-12-13 20:25:45 +01:00
Thomas Calvet
0904e57b85 [SecurityBundle][FirewallMap] Remove unused property 2019-12-13 17:57:31 +01:00
Grégoire Pineau
be2eb6fcc7 [Messenger][AMQP] Use delivery_mode=2 by default 2019-12-13 14:40:46 +01:00
Nicolas Grekas
9c9b99cc65 [FrameworkBundle] Allow using the kernel as a registry of controllers and service factories 2019-12-13 14:13:08 +01:00
Nicolas Grekas
cf45eeccfc [FrameworkBundle] Allow using a ContainerConfigurator in MicroKernelTrait::configureContainer() 2019-12-13 14:10:14 +01:00
Nicolas Grekas
44458126b5 feature #34872 [FrameworkBundle] Added flex-compatible default implementations for MicroKernelTrait::registerBundles() and getProjectDir() (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Added flex-compatible default implementations for `MicroKernelTrait::registerBundles()` and `getProjectDir()`

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

I think it's safe now to migrate some flex-based defaults from the recipe to the bundle.
No BC break here as all existing kernels already redefine this method.

Commits
-------

a689807387 [FrameworkBundle] Added flex-compatible default implementations for `MicroKernelTrait::registerBundles()` and `getProjectDir()`
2019-12-13 14:08:39 +01:00
Nicolas Grekas
a689807387 [FrameworkBundle] Added flex-compatible default implementations for MicroKernelTrait::registerBundles() and getProjectDir() 2019-12-13 13:53:25 +01:00
Nicolas Grekas
e04331657f bug #34904 [Validator][ConstraintValidator] Safe fail on invalid timezones (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator][ConstraintValidator] Safe fail on invalid timezones

Co-authored-by: Scott Dawson <scott@loyaltycorp.com.au>

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

Alternative to https://github.com/symfony/symfony/pull/33902.

I will explain why I think it is better this way:

1. We set the timezone with the setter because it's 100% safe, it never fails. It fall backs to the default timezone if the provided timezone is not supported (as if we passed null, so the same behavior that always existed). We are therefore compatible with all edge cases.
2. We don't validate the timezone with `\DateTimeZone::listIdentifiers()`. It only returns full identifiers like "Europe/Paris" but it doesn't take into account "numeric" identifiers such as "+08:00" which are perfectly valid. I added a test case to ensure we stay valid with this case. + some invalid identifiers for the native `\IntlDateFormatter` are valid with the polyfill that uses `\DateTimeZone` (eg : `X`). I don't think we can validate anything safely that will work reliably on both implementations.

Commits
-------

3b1b994cb3 [Validator][ConstraintValidator] Safe fail on invalid timezones
2019-12-13 13:34:40 +01:00
Nicolas Grekas
da7dedaaa0 bug #34935 [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass

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

We remove the "removing" passes again and to avoid what https://github.com/symfony/symfony/pull/34502 fixed, we skip validating the "live" container removed ids in the pass (the "live" container is supposed to have the same definitions than the "debug container" one).

Logically, an errored service cannot pass the "live" container compilation without being removed. Consequently, it also skips the errored services that ended up being removed in the "live" container.

Commits
-------

a0f581ba9d [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass
2019-12-13 13:19:04 +01:00
Thomas Calvet
a0f581ba9d [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass 2019-12-13 13:18:52 +01:00
Diego Aguiar
9d306f9046 [SECURITY] Revert "AbstractAuthenticationListener.php error instead info. Rebase of #28462"
This reverts commit 867eb78cfe.
2019-12-13 13:11:48 +01:00
Nicolas Grekas
a6d15678f9 feature #34916 [DI] Add support for defining method calls in InlineServiceConfigurator (Lctrs)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[DI] Add support for defining method calls in InlineServiceConfigurator

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

Commits
-------

5af6e21529 [DI] Add support for defining method calls in InlineServiceConfigurator
2019-12-13 13:09:24 +01:00
Lctrs
5af6e21529 [DI] Add support for defining method calls in InlineServiceConfigurator 2019-12-13 13:09:17 +01:00
Nicolas Grekas
1d59e1eff0 bug #34922 [FrameworkBundle][Secrets] Hook configured local dotenv file (fancyweb)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][Secrets] Hook configured local dotenv file

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

Configured local_dotenv_file does not currently substitute the secrets.vault service definition first argument value, rendering this configuration option useless + we don't need to set defaults in secrets.xml since everything is overriden in FrameworkExtension with the same default values (from the configuration).

Commits
-------

56f542c36b [FrameworkBundle][Secrets] Hook configured local dotenv file
2019-12-13 13:07:54 +01:00
Thomas Calvet
56f542c36b [FrameworkBundle][Secrets] Hook configured local dotenv file 2019-12-13 13:07:46 +01:00
Stefan Kruppa
41b56eac29 [DI] Improve performance of processDefinition 2019-12-13 12:59:23 +01:00
Nicolas Grekas
212dc53431 bug #34967 [HttpFoundation] fix redis multi host dsn not recognized (Jan Christoph Beyer)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] fix redis multi host dsn not recognized

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

#34177 added support configurating session handlers with DSNs. It was no possible to pass a redis-DSN like
`redis:?host[localhost]&host[localhost:6379]&host[/var/run/redis.sock:]&auth=my-password&redis_cluster=1'`

since the check was
`case 0 === strpos($connection, 'redis://'):`

Commits
-------

81ba07aa26 fix redis multi host dsn not recognized
2019-12-13 12:54:36 +01:00
Jan Christoph Beyer
81ba07aa26 fix redis multi host dsn not recognized 2019-12-13 12:54:15 +01:00
Nicolas Grekas
0636177aa6 bug #34963 [Lock] fix constructor argument type declaration (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] fix constructor argument type declaration

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

Commits
-------

201af4f31d fix constructor argument type declaration
2019-12-13 12:50:28 +01:00
Christian Flothmann
201af4f31d fix constructor argument type declaration 2019-12-13 09:10:41 +01:00
Nicolas Grekas
9393c5d091 Merge branch '5.0'
* 5.0:
  Fix merge
2019-12-12 16:25:11 +01:00
Nicolas Grekas
e8282537c0 Fix merge 2019-12-12 16:25:01 +01:00
Nicolas Grekas
331765b95d Merge branch '5.0'
* 5.0:
  Fix leftover from doctrine/persistence < 1.3
  Require doctrine/persistence ^1.3
2019-12-12 16:10:59 +01:00
Nicolas Grekas
9a88f527a6 Merge branch '4.4' into 5.0
* 4.4:
  Fix leftover from doctrine/persistence < 1.3
  Require doctrine/persistence ^1.3
2019-12-12 16:09:39 +01:00
Nicolas Grekas
96f04d9b32 Fix leftover from doctrine/persistence < 1.3 2019-12-12 16:05:14 +01:00
Nicolas Grekas
866de0fb8b Merge branch '4.3' into 4.4
* 4.3:
  Require doctrine/persistence ^1.3
2019-12-12 16:02:38 +01:00
Nicolas Grekas
ce5dcb96c1 Require doctrine/persistence ^1.3 2019-12-12 15:53:41 +01:00
Morten Wulff
ef0aa4dc87 [Mailer] fixed undefined index when sending mail
When a Mandrill API request 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.
2019-12-12 15:08:08 +01:00
Nicolas Grekas
5690b97f7a [Lock] Fix merge 2019-12-12 14:59:51 +01:00
Nicolas Grekas
20811cea21 Merge branch '5.0'
* 5.0:
  [Messenger] Fix deprecation
2019-12-12 14:56:34 +01:00
Nicolas Grekas
5b06e01348 Merge branch '4.4' into 5.0
* 4.4:
  [Messenger] Fix deprecation
2019-12-12 14:55:59 +01:00
Nicolas Grekas
a656a57736 [Messenger] Fix deprecation 2019-12-12 14:54:44 +01:00
Nicolas Grekas
a8b6ba3609 Merge branch '5.0'
* 5.0:
  Add missing annotation
  Fix merge
2019-12-12 14:37:04 +01:00
Nicolas Grekas
0370699cea Merge branch '4.4' into 5.0
* 4.4:
  Add missing annotation
  Fix merge
2019-12-12 14:36:53 +01:00
Nicolas Grekas
12f46ba538 Merge branch '4.3' into 4.4
* 4.3:
  Add missing annotation
2019-12-12 14:35:29 +01:00
Nicolas Grekas
80d15cdcf9 Merge branch '3.4' into 4.3
* 3.4:
  Add missing annotation
2019-12-12 14:34:31 +01:00
Nicolas Grekas
4ec093abc8 Add missing annotation 2019-12-12 14:33:51 +01:00
Nicolas Grekas
93b2f9ef6f Merge branch '4.3' into 4.4
* 4.3:
  Fix merge
2019-12-12 14:26:43 +01:00
Nicolas Grekas
7d88be8978 Fix merge 2019-12-12 14:16:57 +01:00
Nicolas Grekas
b94f9e5868 Merge branch '5.0'
* 5.0:
  Fix merge
  [DoctrineBridge] try to fix deprecations from doctrine/persistence
  [DI] Add support for immutable setters in CallTrait
  [Cache] Propagate expiry when syncing items in ChainAdapter
  Removed request header "Content-Type" from the preferred format guessing mechanism
  [Routing] fix memoryleak when loading compiled routes
  [Translation] fix memoryleak in PhpFileLoader
  fix triggering deprecation in file locator
  bug #34877 [TwigBundle] fix findTemplate() to return `null`
2019-12-12 14:04:26 +01:00
Nicolas Grekas
cf073e563f Merge branch '4.4' into 5.0
* 4.4:
  Fix merge
  [DoctrineBridge] try to fix deprecations from doctrine/persistence
  [DI] Add support for immutable setters in CallTrait
  [Cache] Propagate expiry when syncing items in ChainAdapter
  Removed request header "Content-Type" from the preferred format guessing mechanism
  [Routing] fix memoryleak when loading compiled routes
  [Translation] fix memoryleak in PhpFileLoader
  fix triggering deprecation in file locator
  bug #34877 [TwigBundle] fix findTemplate() to return `null`
2019-12-12 14:03:32 +01:00
Nicolas Grekas
a31119b89c Merge branch '4.3' into 4.4
* 4.3:
  Fix merge
  [DoctrineBridge] try to fix deprecations from doctrine/persistence
  [DI] Add support for immutable setters in CallTrait
  [Cache] Propagate expiry when syncing items in ChainAdapter
  [Routing] fix memoryleak when loading compiled routes
  [Translation] fix memoryleak in PhpFileLoader
2019-12-12 13:53:52 +01:00
Nicolas Grekas
ad4b5fd653 Fix merge 2019-12-12 13:43:22 +01:00
Nicolas Grekas
72936e457f Merge branch '3.4' into 4.3
* 3.4:
  [DoctrineBridge] try to fix deprecations from doctrine/persistence
  [Translation] fix memoryleak in PhpFileLoader
2019-12-12 13:39:14 +01:00
Nicolas Grekas
53a4711520 [DoctrineBridge] try to fix deprecations from doctrine/persistence 2019-12-12 13:13:32 +01:00
Nicolas Grekas
d294085689 bug #34923 [DI] Fix support for immutable setters in CallTrait (Lctrs)
This PR was merged into the 4.3 branch.

Discussion
----------

[DI] Fix support for immutable setters in CallTrait

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

Commits
-------

90ace51328 [DI] Add support for immutable setters in CallTrait
2019-12-11 13:26:30 +01:00
Lctrs
90ace51328 [DI] Add support for immutable setters in CallTrait 2019-12-11 13:18:17 +01:00
Fabien Potencier
93f430b94f Fix CS 2019-12-11 01:47:24 +01:00
Joe Bennett
a6bfa5931e [Lock] add mongodb store 2019-12-11 01:40:35 +01:00
Fabien Potencier
25494fa519 bug #34878 [TwigBundle] fix broken FilesystemLoader::exists() with Twig 3 (dpesch)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBundle] fix broken FilesystemLoader::exists() with Twig 3

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

This fix adapts the declaration of Twig 3 `\Twig\Loader\FilesystemLoader::findTemplate()` which expects to return `string|null` and returns `null` instead of `false`.

Returning `false` breaks `\Twig\Loader\FilesystemLoader::exists()` which returns `true` if `findTemplate()` does not return `null`.

Twig 2 should not be affected by this patch. The `exists()` method expects `null` or `false` for not found templates: <fdb691a424/src/Loader/FilesystemLoader.php (L169)>

Commits
-------

ff1d77e155 bug #34877 [TwigBundle] fix findTemplate() to return `null`
2019-12-11 01:24:49 +01:00
Fabien Potencier
d91efd31f6 bug #34921 [HttpFoundation] Removed "Content-Type" from the preferred format guessing mechanism (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Removed "Content-Type" from the preferred format guessing mechanism

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

Confirmed, inferring the `Content-Type` of the response using the `Content-Type` provided for the request body is NOT a good idea. The HTTP RFC explicitly states that `Accept` must be used to hint a preferred response format (`Content-Type` on the request indicates the type of associated its the body).

Use `Accept` if provided (a best practice anyway), and fallback to the default value (HTML by default) otherwise.

Commits
-------

776523e56a Removed request header "Content-Type" from the preferred format guessing mechanism
2019-12-11 01:19:19 +01:00
Fabien Potencier
6bf764a4ed bug #34886 [HttpKernel] fix triggering deprecation in file locator (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] fix triggering deprecation in file locator

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

Commits
-------

142b1793e0 fix triggering deprecation in file locator
2019-12-11 01:18:36 +01:00
Fabien Potencier
349ea047e6 bug #34918 [Translation] fix memoryleak in PhpFileLoader (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] fix memoryleak in PhpFileLoader

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

This happens when running the test suite with opcache disabled (as it is the case by default since `opcache.enable_cli=0`).
Doing this "require" in a loop (for each test case) compiles the file at each iteration and doesn't reclaim memory (there is no garbage collector for opcodes).

Commits
-------

5c9e3bac96 [Translation] fix memoryleak in PhpFileLoader
2019-12-11 01:14:09 +01:00
Fabien Potencier
ebadf51543 bug #34920 [Routing] fix memoryleak when loading compiled routes (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Routing] fix memoryleak when loading compiled routes

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

Same as #34918 for Routing. That's the last significant memory hog I've identified.

Commits
-------

85371a174e [Routing] fix memoryleak when loading compiled routes
2019-12-11 01:13:19 +01:00
Javier Eguiluz
24f32f8bf8 [ErrorHandler] Enabled the dark theme for exception pages 2019-12-10 17:56:21 +01:00
Trevor North
77138acea6 [Cache] Propagate expiry when syncing items in ChainAdapter
If a lower adapter provides item metadata, propagate the expiry time when
syncing the item to upper ones.
2019-12-10 17:45:08 +01:00
Nicolas Grekas
65a988880d Merge branch '5.0'
* 5.0:
  Fix CS
2019-12-10 16:15:37 +01:00
Nicolas Grekas
af04885358 Merge branch '4.4' into 5.0
* 4.4:
  Fix CS
2019-12-10 16:15:29 +01:00
Nicolas Grekas
648544f432 Merge branch '4.3' into 4.4
* 4.3:
  Fix CS
2019-12-10 16:11:53 +01:00
Nicolas Grekas
5da657bcf3 Merge branch '3.4' into 4.3
* 3.4:
  Fix CS
2019-12-10 16:11:12 +01:00
Nicolas Grekas
c90cf3301a Fix CS 2019-12-10 16:06:53 +01:00
Yonel Ceruto
776523e56a Removed request header "Content-Type" from the preferred format guessing mechanism 2019-12-10 09:58:16 -05:00
Nicolas Grekas
85371a174e [Routing] fix memoryleak when loading compiled routes 2019-12-10 15:07:26 +01:00
Nicolas Grekas
2df13e1735 Merge branch '5.0'
* 5.0:
  [Cache] fix merge
2019-12-10 14:56:31 +01:00