Commit Graph

48622 Commits

Author SHA1 Message Date
Robin Chalas
833a9e0a47 bug #39862 [Security] Replace message data in JSON security error response (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Replace message data in JSON security error response

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

The 4.4 part of #39859

Commits
-------

ab2ca7145f [Security] Replace message data in JSON security error response
2021-01-17 00:09:57 +01:00
Wouter de Jong
ab2ca7145f [Security] Replace message data in JSON security error response 2021-01-16 23:34:24 +01:00
Robin Chalas
531c81a06e [DI] Skip deprecated definitions in CheckTypeDeclarationsPass 2021-01-15 18:01:26 +01:00
Christian Flothmann
8076c2f8ba bug #39667 [DoctrineBridge] Take into account that indexBy="person_id" could be a db column name, for a referenced entity (victormacko)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Take into account that indexBy="person_id" could be a db column name, for a referenced entity

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

In Symfony 4.4.17 (I think), using ManyToMany in doctrine, along with indexBy="person_id" (in the related entity, which has a property of "id" (which in-turn uses the db column "person_id" worked as expected. When upgrading to Symfony 5.2.1, this stops working.

This change continues on from issue #37982 to fix a further edge case.

Commits
-------

472eab11e9 [DoctrineBridge] Take into account that indexBy="person_id" could be a db column name, for a referenced entity
2021-01-15 10:06:59 +01:00
victor
472eab11e9 [DoctrineBridge] Take into account that indexBy="person_id" could be a db column name, for a referenced entity 2021-01-15 09:23:31 +01:00
Nicolas Grekas
dd142e2548 minor #39844 [travis] always install ext-mongodb (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[travis] always install ext-mongodb

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

Commits
-------

7cc9904e6a [travis] always install ext-mongodb
2021-01-14 21:08:44 +01:00
Nicolas Grekas
7cc9904e6a [travis] always install ext-mongodb 2021-01-14 20:57:15 +01:00
Nicolas Grekas
2c9a837ac7 bug #39799 [DoctrineBridge] Fix circular loop with EntityManager (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Fix circular loop with EntityManager

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

This PR fix a segfault in EntityManager by making the LazyEventManager handle EventSubscriber in a lazy way.

Maybe #34200 too

Commits
-------

23d692107c Fix circular loop with EntityManager
2021-01-14 20:19:38 +01:00
Jérémy Derussé
23d692107c
Fix circular loop with EntityManager 2021-01-14 19:54:59 +01:00
Nicolas Grekas
1d7c3f6d6e µCS fix 2021-01-14 16:32:58 +01:00
Nicolas Grekas
617c835b84 CS fix 2021-01-14 16:08:15 +01:00
Nicolas Grekas
9a04b00e69 minor #39823 [travis] use PHP 8.0 to patch return types and run deps=low (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

 [travis] use PHP 8.0 to patch return types and run deps=low

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

(I need to verify that DebugClassLoader works as expected before merging)

Commits
-------

7f5ea78fb8 [travis] use PHP 8.0 to patch return types and run deps=low
2021-01-14 16:02:41 +01:00
Nicolas Grekas
0e25f405a9 bug #39821 [DependencyInjection] Don't trigger notice for deprecated aliases pointing to deprecated definitions (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Don't trigger notice for deprecated aliases pointing to deprecated definitions

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

Defining an alias that points to a deprecated definition should trigger a deprecation notice, but when the alias itself is deprecated, it should not trigger.

Commits
-------

38f98a1165 Don't trigger deprecation for deprecated aliases pointing to deprecated definitions
2021-01-14 16:01:47 +01:00
Nicolas Grekas
8d4dcd262a minor #39792 [Config] Add \Symfony\Component\Config\Loader::load() return type (zerkms)
This PR was merged into the 4.4 branch.

Discussion
----------

[Config] Add \Symfony\Component\Config\Loader::load() return type

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix https://github.com/symfony/symfony/issues/39761 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| 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/releases):
 - 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 5.x.
-->

`Symfony\Component\Config\Loader::load()` is missing return type, added it for consistency and static analysis purposes.

Commits
-------

fec66e61c8 [Config] Add \Symfony\Component\Config\Loader::load() return type
2021-01-14 16:00:21 +01:00
Nicolas Grekas
6fbfaf67b1 minor #39772 Simplify PHP CS Fixer config (keradus)
This PR was merged into the 4.4 branch.

Discussion
----------

Simplify PHP CS Fixer config

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

same rules, just written in easier way

Commits
-------

95e33edc1c Simplify PHP CS Fixer config
2021-01-14 15:59:26 +01:00
Nicolas Grekas
9c6381c405 bug #39816 [HttpFoundation] use atomic writes in MockFileSessionStorage (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] use atomic writes in MockFileSessionStorage

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

Instead of #39808

Commits
-------

5290e978bd [HttpFoundation] use atomic writes in MockFileSessionStorage
2021-01-14 15:43:10 +01:00
Nicolas Grekas
f021d6f5be minor #39822 Update sl_SI translations (petk)
This PR was merged into the 4.4 branch.

Discussion
----------

Update sl_SI translations

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

Hello, this is an update for the Slovenian (sl_SI translations).

Commits
-------

b236aae766 Update sl_SI translations
2021-01-14 15:40:47 +01:00
Nicolas Grekas
7f5ea78fb8 [travis] use PHP 8.0 to patch return types and run deps=low 2021-01-14 15:31:07 +01:00
Peter Kokot
b236aae766 Update sl_SI translations 2021-01-13 20:28:53 +01:00
Robin Chalas
38f98a1165 Don't trigger deprecation for deprecated aliases pointing to deprecated definitions 2021-01-13 18:24:13 +01:00
Nicolas Grekas
5290e978bd [HttpFoundation] use atomic writes in MockFileSessionStorage 2021-01-13 15:38:32 +01:00
Fabien Potencier
d23b74ebce bug #39735 [Serializer] Rename normalize param (VincentLanglet)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Rename normalize param

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

The ProblemNormalizer is the only one Normalizer which
- Use a different param name `$exception` instead of the one in the interface `$object`.
- Doesn't type check the param.

The first point lead to an unfixable error with Psalm when extending the ProblemNormalizer
- If the variable is named `$object` it does not match with the parent
- If the variable is named `$exception` it does not match with the interface

Commits
-------

7e6eee2789 Rename normalize param
2021-01-13 08:03:18 +01:00
Nicolas Grekas
d4c70a53ca [DI] fix param annotation 2021-01-12 20:08:29 +01:00
Nicolas Grekas
e6cfa099a8 bug #39797 Dont allow unserializing classes with a destructor (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Dont allow unserializing classes with a destructor

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

Prevent destructors with side-effects from being unserialized

Commits
-------

facc095944 Dont allow unserializing classes with a destructor
2021-01-12 15:21:03 +01:00
Jérémy Derussé
facc095944
Dont allow unserializing classes with a destructor 2021-01-12 13:42:25 +01:00
Nicolas Grekas
6eff2630a1 bug #39743 [Mailer] Fix missing BCC recipients in SES bridge (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Fix missing BCC recipients in SES bridge

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

When using the `ses` (alias of `ses+https`) scheme, the bridge send the RawEmail to AWS.
But RawEmails does not contains the BCC recipients.

This PR adds the envelope's recipients to the list of Destinations in Amazon SES payload.

Commits
-------

1cfc763018 Fix missing BCC recipients in SES bridge
2021-01-12 12:30:25 +01:00
Nicolas Grekas
0211b9afe8 bug #39764 [Config]  fix handling float-like key attribute values (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Config]  fix handling float-like key attribute values

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

Commits
-------

a2ad4fa8b3 fix handling float-like key attribute values
2021-01-12 12:28:52 +01:00
Nicolas Grekas
aaebeda758 minor #39779 Contracts: Remove ellipsis (alexislefebvre)
This PR was merged into the 4.4 branch.

Discussion
----------

Contracts: Remove ellipsis

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

I don't understand what the ellipsis is implying. I think it's better to remove it, it makes the contract clearer.

Commits
-------

aa7f83576c Contracts: Remove ellipsis
2021-01-12 12:27:16 +01:00
Nicolas Grekas
7aad82480d bug #39787 [Yaml] a colon followed by spaces exclusively separates mapping keys and values (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] a colon followed by spaces exclusively separates mapping keys and values

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

Commits
-------

f72c6a5ad4 a colon followed by spaces exclusively separates mapping keys and values
2021-01-12 12:26:39 +01:00
Nicolas Grekas
2852a42468 bug #39788 [Cache] fix possible collision when writing tmp file in filesystem adapter (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] fix possible collision when writing tmp file in filesystem adapter

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

Commits
-------

340d15e400 [Cache] fix possible collision when writing tmp file in filesystem adapter
2021-01-12 11:20:15 +01:00
Nicolas Grekas
b85611fbd6 bug #39794 Dont allow unserializing classes with a destructor - 4.4 (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Dont allow unserializing classes with a destructor - 4.4

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

Prevent destructors with side-effects from being unserialized

Commits
-------

955395c999 Dont allow unserializing classes with a destructor - 4.4
2021-01-12 10:49:10 +01:00
Jérémy Derussé
955395c999
Dont allow unserializing classes with a destructor - 4.4 2021-01-12 10:42:12 +01:00
Ivan Kurnosov
fec66e61c8 [Config] Add \Symfony\Component\Config\Loader::load() return type 2021-01-12 14:21:27 +13:00
Nicolas Grekas
340d15e400 [Cache] fix possible collision when writing tmp file in filesystem adapter 2021-01-11 19:31:21 +01:00
Christian Flothmann
f72c6a5ad4 a colon followed by spaces exclusively separates mapping keys and values 2021-01-11 15:27:16 +01:00
Fabien Potencier
bde3e28084 minor #39781 Use ::class keyword when possible (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Use ::class keyword when possible

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- 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 #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | n/a

As we cannot easily change all occurrences of class names to use the `::class` (no PHP CS Fixer rule for now, and probably never), I've added this feature in fabbot.io for when we are 100% sure that the string is indeed a class name (I detect strings for `getMockBuilder()` or `is_class()`, ...).

For now, I use the short class name when available as a use statement, and I fall back to the FQCN when not (I don't add use statements, which should probably be done as another fixer).

Commits
-------

6c8d5808a6 Use ::class keyword when possible
2021-01-11 10:47:10 +01:00
Fabien Potencier
6c8d5808a6 Use ::class keyword when possible 2021-01-11 09:57:50 +01:00
Fabien Potencier
c79e61f1f2 minor #39775 [WIP] Use ::class keyword when possible (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[WIP] Use ::class keyword when possible

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- 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 #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

036a36cb14 Use ::class keyword when possible
2021-01-11 07:02:33 +01:00
Alexis Lefebvre
aa7f83576c
Contracts: Remove ellipsis 2021-01-10 20:12:53 +01:00
Fabien Potencier
036a36cb14 Use ::class keyword when possible 2021-01-10 17:45:22 +01:00
Fabien Potencier
cfab37fecf minor #39773 Improve composer.json descriptions (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Improve composer.json descriptions

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- 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       | Refs #39768 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

611a2dfaf3 Improve composer.json descriptions
2021-01-10 17:26:45 +01:00
Fabien Potencier
611a2dfaf3 Improve composer.json descriptions 2021-01-10 17:25:35 +01:00
Fabien Potencier
220cedf58c minor #39762 [Form] Update AbstractType.php (DonCallisto)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] Update AbstractType.php

Switched from parent type hard-coded FQCN to `::class` keyword.

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

Commits
-------

ff13967545 Switched from parent type hard-coded FQCN to `::class` keyword.
2021-01-10 13:19:09 +01:00
Fabien Potencier
4cba31e49f minor #39769 [Yaml] quote all dumped unicode spaces (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] quote all dumped unicode spaces

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

Commits
-------

0028efe8f8 quote all dumped unicode spaces
2021-01-10 09:40:13 +01:00
Dariusz Rumiński
95e33edc1c
Simplify PHP CS Fixer config 2021-01-10 03:20:21 +01:00
Christian Flothmann
0028efe8f8 quote all dumped unicode spaces 2021-01-09 13:36:37 +01:00
Samuele Lilli
ff13967545 Switched from parent type hard-coded FQCN to ::class keyword. 2021-01-08 13:59:24 +01:00
Christian Flothmann
a2ad4fa8b3 fix handling float-like key attribute values 2021-01-08 10:37:27 +01:00
Nicolas Grekas
3ee310f20a bug #39747 [DependencyInjection] Support PHP 8 builtin types in CheckTypeDeclarationsPass (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Support PHP 8 builtin types in CheckTypeDeclarationsPass

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

`CheckTypeDeclarationsPass` currently explodes if it encounters one of following the new builtin types of PHP 8:

* `false` (can only appear as part of a union)
* `mixed` (we don't need to check anything)

In either case, the pass will try to call a method `is_false()`/`is_mixed()` and fail.

This PR should fix both cases.

Commits
-------

f16230be5d [DependencyInjection] Support PHP 8 builtin types in CheckTypeDeclarationsPass
2021-01-07 15:35:02 +01:00
Nicolas Grekas
d223a5ed40 bug #39738 [VarDumper] fix mutating $GLOBALS while cloning it (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] fix mutating $GLOBALS while cloning it

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

Also preparing for https://wiki.php.net/rfc/restrict_globals_usage

Commits
-------

384b0adf38 [VarDumper] fix mutating $GLOBALS while cloning it
2021-01-07 14:07:47 +01:00