Commit Graph

52302 Commits

Author SHA1 Message Date
Alexander M. Turek
9ff1436a90 Merge branch '4.4' into 5.1
* 4.4:
  [Messenger] Fix mssql compatibility for doctrine transport.
2020-11-29 00:22:02 +01:00
Alexander M. Turek
42061de4e4 bug #39166 [Messenger] Fix mssql compatibility for doctrine transport. (bill moll)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Fix mssql compatibility for doctrine transport.

Add logic for locking row for update when the doctrine dbal connection is sqlsrv. This is a quick and dirty solution, but it prevents the need to rewrite the logic due to doctrine dbal limitations.

See issue https://github.com/symfony/symfony/issues/39117

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

Commits
-------

37be094992 [Messenger] Fix mssql compatibility for doctrine transport.
2020-11-29 00:01:02 +01:00
bill moll
37be094992 [Messenger] Fix mssql compatibility for doctrine transport.
Add logic for locking row for update when the doctrine dbal connection is sqlsrv. This is a quick and dirty solution, but it prevents the need to rewrite the logic due to doctrine dbal limitations.

See issue https://github.com/symfony/symfony/issues/39117
2020-11-28 23:57:36 +01:00
Nicolas Grekas
0c285d1d42 bug #39210 [DoctrineBridge] Fix form EntityType with filter on UID (jderusse)
This PR was merged into the 5.2 branch.

Discussion
----------

[DoctrineBridge] Fix form EntityType with filter on UID

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

Convert UUID and ULID to the right format in ORMQueryBuilder

/cc @nicolas-grekas

Commits
-------

9e83bb7634 Fix form EntotyType with uid
2020-11-28 14:47:02 +01:00
Nicolas Grekas
e2713235c1 Merge branch '5.1' into 5.2
* 5.1:
  [HttpClient] partial revert of previous commit
2020-11-28 14:45:20 +01:00
Nicolas Grekas
8d512d9819 [HttpClient] partial revert of previous commit 2020-11-28 14:45:11 +01:00
Jérémy Derussé
9e83bb7634
Fix form EntotyType with uid 2020-11-28 14:40:09 +01:00
Nicolas Grekas
fcea35b31d Merge branch '5.1' into 5.2
* 5.1:
  [HttpClient] fix binding to network interfaces
  [HttpClient] fix binding to network interfaces
2020-11-28 14:34:12 +01:00
Nicolas Grekas
a3da101204 minor #39212 [HttpClient] fix binding to network interfaces (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[HttpClient] fix binding to network interfaces

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

Continuing #39211 on 5.1

Commits
-------

02d16324a5 [HttpClient] fix binding to network interfaces
2020-11-28 14:33:51 +01:00
Nicolas Grekas
a5c636c80b Merge branch '4.4' into 5.1
* 4.4:
  [HttpClient] fix binding to network interfaces
2020-11-28 14:33:17 +01:00
Nicolas Grekas
02d16324a5 [HttpClient] fix binding to network interfaces 2020-11-28 14:32:28 +01:00
Nicolas Grekas
3e9f770e25 bug #39211 [HttpClient] fix binding to network interfaces (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix binding to network interfaces

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

Fixes support for binding to local interfaces by adding support for [curl's `if!` prefix](https://curl.se/libcurl/c/CURLOPT_INTERFACE.html).

Commits
-------

faa1fd32f9 [HttpClient] fix binding to network interfaces
2020-11-28 14:31:15 +01:00
Nicolas Grekas
faa1fd32f9 [HttpClient] fix binding to network interfaces 2020-11-28 14:23:02 +01:00
Alexander M. Turek
fd05da651b Merge branch '5.1' into 5.2
* 5.1:
  Fix parameter order
  [DependencyInjection] Fix circular in DI with lazy + byContruct loop
  adjust Client::getProfile() typehint
  adjust KernelBrowser::getProfile() typehint
  fix: resolving pt translation issues
  Update VERSION for 3.4.47
  Update CONTRIBUTORS for 3.4.47
  Update CHANGELOG for 3.4.47
  Add Romanian missing translations
  [DependencyInjection][Translator] Silent deprecation triggered by libxml_disable_entity_loader
  fix lexing strings containing escaped quotation characters
  prevent duplicated error message for file upload limits
  ignore the pattern attribute for textareas
  fix: solving pt-br translation issues
2020-11-28 12:24:18 +01:00
Alexander M. Turek
441ceecad6 minor #39198 [FrameworkBundle] [minor] adjust KernelBrowser::getProfile() typehint (kbond)
This PR was merged into the 5.1 branch.

Discussion
----------

[FrameworkBundle] [minor] adjust KernelBrowser::getProfile() typehint

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

`Profiler::loadProfileFromResponse()` can return `null`. Obviously having a return of `null|false` is unfortunate. Not sure what we can do about that...

Commits
-------

ce046fd120 adjust KernelBrowser::getProfile() typehint
2020-11-28 11:59:23 +01:00
Alexander M. Turek
e70ccfe55d Merge branch '4.4' into 5.1
* 4.4:
  Fix parameter order
  [DependencyInjection] Fix circular in DI with lazy + byContruct loop
  adjust Client::getProfile() typehint
  fix: resolving pt translation issues
  Update VERSION for 3.4.47
  Update CONTRIBUTORS for 3.4.47
  Update CHANGELOG for 3.4.47
  Add Romanian missing translations
  [DependencyInjection][Translator] Silent deprecation triggered by libxml_disable_entity_loader
  fix lexing strings containing escaped quotation characters
  prevent duplicated error message for file upload limits
  ignore the pattern attribute for textareas
  fix: solving pt-br translation issues
2020-11-28 11:57:20 +01:00
Alexander M. Turek
fe36f35d9b minor #39209 [Console] Fix parameter order (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Fix parameter order

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

Commits
-------

726f3616a8 Fix parameter order
2020-11-28 11:52:00 +01:00
Jérémy Derussé
726f3616a8
Fix parameter order 2020-11-28 11:15:42 +01:00
Nicolas Grekas
e57b5f2abf minor #39197 [Validation] updating pt translations (hugovms, cenoura)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validation] updating pt translations

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

Finishing PR #38923

Commits
-------

4857be89d3 fix: resolving pt translation issues
935a3b23e2 fix: solving pt-br translation issues
2020-11-27 17:19:44 +01:00
Nicolas Grekas
7d7fa3e822 bug #39129 [DependencyInjection] Fix circular in DI with lazy + byContruct loop (jderusse)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix circular in DI with lazy + byContruct loop

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

This fix another issue lazy service.
It partially revert #38980 and #39021

Initially, we trusted lazy services to be lazy and not beeing called while building the services graph
=> bug #38970 when lazy deps is injected in a factory, it may be consumed directly to build the object before the graph is fully built
Fixed by #38980 => lazy service are considered as "normal service"
=> bug #39015 some loop are not resolvable with "normal service", but it shouldn't be an issue when servie proxifyied
Fixed by #39021 => lazy service are considered as "normal service" except when proxyfied
=> bug #39120 some loop are not resolvable with "normal service", but it shouldn't be an issue because the lazy service is injected in the constructor and user

Fixed by this PR => that revert to the initial state. lazy service are trusted.
But now, The IterratorArgument injected in a factory (single exception) is not more considered as lazy

Commits
-------

54af139a4e [DependencyInjection] Fix circular in DI with lazy + byContruct loop
2020-11-27 16:54:06 +01:00
Jérémy Derussé
54af139a4e [DependencyInjection] Fix circular in DI with lazy + byContruct loop 2020-11-27 16:54:00 +01:00
Alexander M. Turek
986f99d9c2 minor #39199 [FrameworkBundle] [minor] adjust Client::getProfile() typehint (kbond)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] [minor] adjust Client::getProfile() typehint

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

#39198's fix for 4.4.

Commits
-------

5f2bb905e7 adjust Client::getProfile() typehint
2020-11-27 16:28:45 +01:00
Alexander M. Turek
878a53bfac minor #39200 [Semaphore] Allow symfony/semaphore on PHP8 (Michał Jusięga)
This PR was merged into the 5.2 branch.

Discussion
----------

[Semaphore] Allow symfony/semaphore on PHP8

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

On `PHP8` we can't install new component.

```
composer prohibits php:8
symfony/semaphore                    v5.2.0-RC2  requires  php (^7.2.5)
```

Commits
-------

c3d00dbeba Allow symfony/semaphore on PHP8
2020-11-27 15:23:16 +01:00
Michał Jusięga
c3d00dbeba Allow symfony/semaphore on PHP8 2020-11-27 15:15:14 +01:00
Kevin Bond
5f2bb905e7
adjust Client::getProfile() typehint 2020-11-27 09:11:20 -05:00
Kevin Bond
ce046fd120
adjust KernelBrowser::getProfile() typehint 2020-11-27 09:08:52 -05:00
Guilherme Augusto Henschel
4857be89d3 fix: resolving pt translation issues 2020-11-27 09:41:21 -03:00
Fabien Potencier
16535b2a64 Merge branch '5.1' into 5.2
* 5.1:
  fix denormalizing scalar with UnwrappingDenormalizer
2020-11-27 11:27:27 +01:00
Fabien Potencier
458ee9aa2a Merge branch '3.4' into 4.4
* 3.4:
  Update VERSION for 3.4.47
  Update CONTRIBUTORS for 3.4.47
  Update CHANGELOG for 3.4.47
2020-11-27 11:26:46 +01:00
Fabien Potencier
df7099cb2d feature #39153 [Security] Automatically register custom authenticator as entry_point (if supported) (wouterj)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[Security] Automatically register custom authenticator as entry_point (if supported)

| Q             | A
| ------------- | ---
| Branch?       | 5.2 (hopefully?)
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #37068
| License       | MIT
| Doc PR        | -

@weaverryan came up with exactly the same issue as proposed by a contributor before (see referenced ticket). Back then, it was decided impossible to fix: see https://github.com/symfony/symfony/pull/37075. However, after some thinking we came up with a way to fix the issue and improve the DX for custom authenticators.

The new authenticators are no longer required to implement `AuthenticationEntryPointInterface` (required for internal authenticators like the `RememberMeAuthenticator` and pre authenticated ones). This PR uses a compiler pass to check if a custom authenticator is supported:

```yaml
security:
  firewalls:
    main:
      # in any case, if an entry_point is already configured it'll not be overriden
      # (http_basic remains the entry point here)
      http_basic: ~
      custom_authenticator: App\Security\CustomAuthenticator
      entry_point: http_basic

      # if only one custom authenticator implements AuthenticationEntryPointInterface,
      # it's automatically configured as the entry point
      custom_authenticator: App\Security\CustomAuthenticator
      custom_authenticators: [App\Security\CustomAuthenticator, App\Security\NoEntryPointAuthenticator]

      # if no custom authenticator implements AuthenticationEntryPointInterface,
      # an error is thrown
      custom_authenticator: App\Security\NoEntryPointAuthenticator

      # if more than one authenticator implements AuthenticationEntryPointInterface,
      # the entry point must be configured explicitly (or an error is thrown)
      custom_authenticators: [App\Security\CustomAuthenticator, App\Security\AnotherCustomAuthenticator]
      entry_point: App\Security\CustomAuthenticator
```

---

I know this is very late for Symfony 5.2. It would be good to decide whether this can be included in the release, in order to smooth out the biggest struggle for people using custom authenticators for the first time.

Commits
-------

cab0672248 [Security] Automatically register custom authenticator as entry_point (if supported)
2020-11-27 11:24:59 +01:00
Wouter de Jong
cab0672248 [Security] Automatically register custom authenticator as entry_point (if supported) 2020-11-27 11:24:53 +01:00
Fabien Potencier
83093d5448
Merge pull request #39193 from fabpot/release-3.4.47
released v3.4.47
2020-11-27 09:43:16 +01:00
Fabien Potencier
67f1f1e159 Update VERSION for 3.4.47 2020-11-27 09:42:42 +01:00
Fabien Potencier
f93df0ef1d Update CONTRIBUTORS for 3.4.47 2020-11-27 09:41:54 +01:00
Fabien Potencier
0153c44975 Update CHANGELOG for 3.4.47 2020-11-27 09:41:25 +01:00
Fabien Potencier
123fd2e066 minor #39036 Add Romanian missing translations (gabiudrescu)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

   Add Romanian missing translations

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

Commits
-------

6aa31a13c7 Add Romanian missing translations
2020-11-27 09:28:28 +01:00
Gabi Udrescu
6aa31a13c7 Add Romanian missing translations 2020-11-27 09:28:00 +01:00
Fabien Potencier
6db84b6ae9 bug #39068 [DependencyInjection][Translator] Silent deprecation triggered by libxml_disable_entity_loader (jderusse)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][Translator] Silent deprecation triggered by libxml_disable_entity_loader

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

The XML entity loader is disabled by default since libxml 2.9
But, since PHP 8.0, calling the method `libxml_disable_entity_loader` triggers a deprecation which has been solved in symfony by calling `libxml_disable_entity_loader` only for libxml < 2.9

The issue is, some dependencies, enable the entity loader and does not restore the initial state afterward, leading to exceptions triggered by Symfony iteself.

In previous versions symfony was resilient by disabling the flag before working, which is not the case anymore to avoid the deprecation.

This PR restore the resiliency of Symfony for PHP < 8.0, which is not yet deprecated.

But we have no way to check the status of the entity loader without triggering a deprecation with Symfony 8.

Commits
-------

114b7a543a [DependencyInjection][Translator] Silent deprecation triggered by libxml_disable_entity_loader
2020-11-27 07:35:58 +01:00
Jérémy Derussé
114b7a543a [DependencyInjection][Translator] Silent deprecation triggered by libxml_disable_entity_loader 2020-11-27 07:35:49 +01:00
Fabien Potencier
66e76d1916 bug #39119 [Form] prevent duplicated error message for file upload limits (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] prevent duplicated error message for file upload limits

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

Commits
-------

fe6a2dd64f prevent duplicated error message for file upload limits
2020-11-27 07:25:03 +01:00
Fabien Potencier
1fb80e7cf0 bug #39099 [Form] ignore the pattern attribute for textareas (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] ignore the pattern attribute for textareas

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

Commits
-------

e7698e7434 ignore the pattern attribute for textareas
2020-11-27 07:20:55 +01:00
Fabien Potencier
ac25e8c912 feature #39118 [DoctrineBridge] Require doctrine/persistence 2 (greg0ire)
This PR was merged into the 5.2 branch.

Discussion
----------

[DoctrineBridge] Require doctrine/persistence 2

| Q             | A
| ------------- | ---
| Branch       | 5.x
| 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
| License       | MIT
| Doc PR        | n/a

This allows us to remove autoload calls that are necessary for the
persistence 1 backwards-compatibility layer to work.

This is a follow up of #35728

Commits
-------

574a184b9a Require doctrine/persistence 2
2020-11-27 07:18:14 +01:00
Fabien Potencier
7378b0b836 feature #39128 [HttpFoundation] Deprecate BinaryFileResponse::create() (derrabus)
This PR was merged into the 5.2 branch.

Discussion
----------

[HttpFoundation] Deprecate BinaryFileResponse::create()

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

Follows #34771. We've deprecated the static `::create()` methods on all response classes but `BinaryFileResponse`. This PR proposes to fix this inconsistency.

Commits
-------

9ce2e86207 [HttpFoundation] Deprecate BinaryFileResponse::create().
2020-11-27 07:13:25 +01:00
Fabien Potencier
d558964026 bug #39154 [Yaml] fix lexing strings containing escaped quotation characters (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] fix lexing strings containing escaped quotation characters

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

Commits
-------

673b8e941a fix lexing strings containing escaped quotation characters
2020-11-27 07:07:37 +01:00
Fabien Potencier
9f484e691d bug #39187 [Security] Support for SwitchUserToken instances serialized with 4.4/5.1 (derrabus)
This PR was merged into the 5.2 branch.

Discussion
----------

[Security] Support for SwitchUserToken instances serialized with 4.4/5.1

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

This PR enables `SwitchUserToken` to unserialize earlier versions of itself.

I've executed the following script on the 4.4 branch with php 7.2 to create the fixture included with this PR:

```php
$token = new SwitchUserToken(
    new User('john', null, ['ROLE_USER']),
    ['foo' => 'bar'],
    'main',
    ['ROLE_USER'],
    new UsernamePasswordToken(new User('jane', null, ['ROLE_USER']), ['foo' => 'bar'], 'main', ['ROLE_USER'])
);

file_put_contents(__DIR__.'/switch-user-token-4.4.txt', serialize($token));
```

Commits
-------

01bea3c085 Support for SwitchUserToken instances serialized with 4.4/5.1.
2020-11-27 06:55:40 +01:00
Fabien Potencier
3d384ba76b bug #39180 [Serializer] Fix denormalizing scalar with UnwrappingDenormalizer (camilledejoye)
This PR was merged into the 5.1 branch.

Discussion
----------

[Serializer] Fix denormalizing scalar with UnwrappingDenormalizer

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

In order to work the `UnwrappingDenormlizer` needs to be called first to unwrap the data so that it can be handled by other denormalizers.
To not introduce any BC break this PR does not move the logic into it's own class, instead it checks if a denormalizer supports the data and only denormalize scalar values if there is none.

Commits
-------

98cf389fb9 fix denormalizing scalar with UnwrappingDenormalizer
2020-11-27 06:53:16 +01:00
Alexander M. Turek
01bea3c085 Support for SwitchUserToken instances serialized with 4.4/5.1. 2020-11-27 02:03:01 +01:00
Alexander M. Turek
62184bd8f0 Merge branch '5.1' into 5.2
* 5.1:
  Fix test.
  [PhpUnitBridge] Fix qualification of deprecations triggered by the debug class loader
  Improve return phpdoc for Normalizer
  Use a partial buffer in SymfonyStyle
  Fix console closing tag
  Fix typo in comment
  [VarDumper] fix casting resources turned into objects on PHP 8
2020-11-27 01:39:34 +01:00
Alexander M. Turek
b047064842 Fix test. 2020-11-27 01:30:48 +01:00
Alexander M. Turek
b96d0089a5 Merge branch '4.4' into 5.1
* 4.4:
  [PhpUnitBridge] Fix qualification of deprecations triggered by the debug class loader
  Improve return phpdoc for Normalizer
  Use a partial buffer in SymfonyStyle
  Fix console closing tag
  Fix typo in comment
  [VarDumper] fix casting resources turned into objects on PHP 8
2020-11-27 00:46:31 +01:00