Commit Graph

43058 Commits

Author SHA1 Message Date
Nicolas Grekas
58e32b3c2a [ErrorHandler] fix parsing return types in DebugClassLoader 2021-02-02 17:49:07 +01:00
Nicolas Grekas
ac94746dc7 [ErrorHandler] fix handling messages with null bytes from anonymous classes 2021-02-02 17:39:26 +01:00
Christophe Coevoet
9197199731 minor #40045 [Yaml] Delete unused comparison operation (LoginovIlya)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] Delete unused comparison operation

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

Commits
-------

3ef7bfd972 [yaml] Delelte unused comparison operation
2021-02-02 10:51:46 +01:00
FabienSalles
a9e9359581 fix validator when we have a false current element
fix coding styles

add type in return
2021-02-02 10:30:20 +01:00
Fabien Potencier
cedcb55097 bug #39954 [Mailer][Mime] Fix case-sensitive handling of header names (piku235)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[Mailer][Mime] Fix case-sensitive handling of header names

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

Fixes case-sensitive handling of header names in "Mime" and "Mailer" component, more in the [ticket](https://github.com/symfony/symfony/issues/39953).

Commits
-------

d563c846f6 [Mailer][Mime] Fix case-sensitive handling of header names
2021-02-02 07:10:15 +01:00
Piotr Kugla
d563c846f6 [Mailer][Mime] Fix case-sensitive handling of header names 2021-02-02 07:10:09 +01:00
Piotr Kugla
b2d7454042 [Mime] Fix case-sensitive handling in Headers::isUniqueHeader() 2021-02-01 19:58:28 +01:00
Fabien Potencier
42eeb44f83 [Messenger] Fix Doctrine setup when using a migration 2021-02-01 15:36:03 +01:00
Yonel Ceruto
33e6af5850 Fixed updating catalogue metadata from intl domain 2021-01-31 21:39:35 -05:00
LoginovIlya
3ef7bfd972 [yaml] Delelte unused comparison operation 2021-01-31 18:20:26 +03:00
Carlos Tasada
c52c1e0b9b [HttpFoundation] Setting REQUEST_TIME_FLOAT when constructing a Request object 2021-01-31 14:27:34 +01:00
Jérémy Derussé
94eac1b83f
Restore priority for eventSubscribers 2021-01-31 12:02:49 +01:00
Jérémy Derussé
a07638b14a
Merge branch '4.4' into 5.2
* 4.4:
  Use createMock() instead of a getter
  [ErrorHandler] Fix strpos error when trying to call a method without a name
  use proper keys to not override appended files
  Fix console logger according to PSR-3
2021-01-28 23:06:19 +01:00
Jérémy Derussé
945c7c590c
minor #39920 [Console] Fix console logger according to PSR-3 (alex-dev)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Fix console logger according to PSR-3

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39050, #29138
| License       | MIT

`Symfony\Component\HttpKernel\EventListener\ErrorListener` logs non-HTTP exceptions at `LogLevel::CRITICAL`.
`Symfony\Component\Messenger\Worker` logs unrecoverable exceptions at `LogLevel::CRITICAL`.
`Symfony\Component\Console\EventListener\ErrorListener` logs exceptions at `LogLevel::ERROR`.

As per PSR-3, unexpected and unrecoverable exceptions should be logged at `LogLevel::CRITICAL`.

Commits
-------

69fcd075eb Fix console logger according to PSR-3
2021-01-28 23:01:20 +01:00
Robin Chalas
be788ee119 minor #39997 Use createMock() instead of a getter (OskarStark)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Use createMock() instead of a getter

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

Before I go on, are you interested in such change @nicolas-grekas ?

Commits
-------

9629dafa66 Use createMock() instead of a getter
2021-01-28 20:07:58 +01:00
Oskar Stark
9629dafa66 Use createMock() instead of a getter 2021-01-28 20:07:50 +01:00
Nicolas Grekas
37166f79e2 bug #40018 [TwigBridge] take into account all label related options (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[TwigBridge] take into account all label related options

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

Commits
-------

adb0fd1c7d take into account all label related options
2021-01-28 18:00:39 +01:00
Nicolas Grekas
e2428326e3 bug #40023 [Finder]  use proper keys to not override appended files (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Finder]  use proper keys to not override appended files

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

Commits
-------

036c8d71fd use proper keys to not override appended files
2021-01-28 17:58:58 +01:00
Nicolas Grekas
27fab22fa6 bug #40019 [ErrorHandler] Fix strpos error when trying to call a method without a name (Deuchnord)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Fix strpos error when trying to call a method without a name

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | None (direct fix)
| License       | MIT
| Doc PR        | None
<!--
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.
-->

When running the following code:

```php
class Foo
{
    // Some code here
}

$str = ''; // this should not happen, but for some reason, it did.
$foo->{$str}();
```

a fatal error occurs because the method name to execute is empty, but Symfony's error enhancer fails to parse it:

![Error screenshot](https://user-images.githubusercontent.com/7600265/106108704-ec019b80-6148-11eb-82bc-f7801e30fea4.png)

In this PR, I propose a fix with a more clear error to inform the developer about what happened.

Commits
-------

66be87bffc [ErrorHandler] Fix strpos error when trying to call a method without a name
2021-01-28 17:54:55 +01:00
Jérôme Deuchnord
66be87bffc [ErrorHandler] Fix strpos error when trying to call a method without a name 2021-01-28 17:54:48 +01:00
Christian Flothmann
036c8d71fd use proper keys to not override appended files 2021-01-28 15:45:15 +01:00
Nicolas Grekas
e380102590 [DoctrineBridge] add missing @experimental annotation on Uid generators 2021-01-28 15:21:46 +01:00
Christian Flothmann
adb0fd1c7d take into account all label related options 2021-01-28 09:07:54 +01:00
Nicolas Grekas
85558248e6 [Uid] improve logic in BinaryUtil::timeToFloat() 2021-01-27 21:50:00 +01:00
Nicolas Grekas
bdf3589918 Merge branch '4.4' into 5.2
* 4.4:
  [Serializer] Prevent access to private properties without getters
2021-01-27 19:13:05 +01:00
Nicolas Grekas
6a935bb977 bug #40003 [Uid] Fix time to float conversion (fancyweb)
This PR was merged into the 5.2 branch.

Discussion
----------

[Uid] Fix time to float conversion

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

On 32b systems, when the timestamp is before the UNIX epoch, the result is currently shifted by 1. Inverting all the bits is not enough, we need to add 1. I guess https://en.wikipedia.org/wiki/Two%27s_complement is relevant here?

Alternative:
```php
$time = -1 * self::toBase(self::add($time ^ "\xff\xff\xff\xff\xff\xff\xff\xff", "\x00\x00\x00\x00\x00\x00\x00\x01"), self::BASE10);
```

Commits
-------

9680a27246 [Uid] Fix time to float conversion
2021-01-27 19:10:53 +01:00
Jérémy Derussé
2176ff6550
Fix SES test 2021-01-27 19:05:29 +01:00
Thomas Calvet
9680a27246 [Uid] Fix time to float conversion 2021-01-27 18:11:54 +01:00
Julien Falque
f0409b403f
[Serializer] Prevent access to private properties without getters 2021-01-27 17:59:11 +01:00
Nicolas Grekas
438a865be6 Merge branch '4.4' into 5.2
* 4.4:
  Replace "branch-version" by "versions" in composer.json
  Bump Symfony version to 4.4.20
  Update VERSION for 4.4.19
  Update CONTRIBUTORS for 4.4.19
  Update CHANGELOG for 4.4.19
2021-01-27 17:27:53 +01:00
Nicolas Grekas
f667d792df minor #40002 Replace "branch-version" by "versions" in composer.json (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Replace "branch-version" by "versions" in composer.json

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

Accommodates for https://github.com/composer/composer/pull/9637

Commits
-------

b40e71f096 Replace "branch-version" by "versions" in composer.json
2021-01-27 17:24:49 +01:00
Nicolas Grekas
b40e71f096 Replace "branch-version" by "versions" in composer.json 2021-01-27 17:22:20 +01:00
Fabien Potencier
712e03352e Bump Symfony version to 5.2.3 2021-01-27 15:55:33 +01:00
Fabien Potencier
fc85acb633 Update VERSION for 5.2.2 2021-01-27 15:45:46 +01:00
Fabien Potencier
aeb15a1322 Bump Symfony version to 4.4.20 2021-01-27 14:59:11 +01:00
Fabien Potencier
7fb2dbf465 Update VERSION for 4.4.19 2021-01-27 14:50:53 +01:00
Nicolas Grekas
0e786723de Merge branch '5.1' into 5.2
* 5.1:
  Use import instead of FQCN
2021-01-27 13:56:27 +01:00
Oskar Stark
b2fee7a8a2 Use import instead of FQCN 2021-01-27 13:50:07 +01:00
Nicolas Grekas
175b725dfe Fix merge 2021-01-27 12:32:03 +01:00
Nicolas Grekas
0045fc480d More cleanups and fixes 2021-01-27 12:24:50 +01:00
Nicolas Grekas
8a7bf238d6 Merge branch '5.1' into 5.2
* 5.1:
  More cleanups and fixes
2021-01-27 12:19:04 +01:00
Nicolas Grekas
75fd4ce584 More cleanups and fixes 2021-01-27 12:17:55 +01:00
Nicolas Grekas
df5c849f9c Merge branch '5.1' into 5.2
* 5.1:
  Fix merge
2021-01-27 11:42:51 +01:00
Nicolas Grekas
48afd70717 Fix merge 2021-01-27 11:42:04 +01:00
Nicolas Grekas
07abdf27d8 Merge branch '5.1' into 5.2
* 5.1:
  Fix merge
2021-01-27 11:36:42 +01:00
Nicolas Grekas
bdae9cbf14 Fix merge 2021-01-27 11:36:24 +01:00
Nicolas Grekas
02d2834ec0 Merge branch '5.1' into 5.2
* 5.1:
  add missing use statement
2021-01-27 11:30:59 +01:00
Christian Flothmann
cfab105930 add missing use statement 2021-01-27 11:28:18 +01:00
Nicolas Grekas
854de3cc2e Merge branch '5.1' into 5.2
* 5.1:
  Use createMock() and use import instead of FQCN
2021-01-27 11:15:41 +01:00
Nicolas Grekas
28f1ab67ca Merge branch '4.4' into 5.1
* 4.4:
  Use createMock() and use import instead of FQCN
2021-01-27 11:01:46 +01:00
Nicolas Grekas
22b1eb40a3 minor #39941 Use createMock() and use import instead of FQCN (OskarStark)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Use createMock() and use import instead of FQCN

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

Commits
-------

e7e61ee551 Use createMock() and use import instead of FQCN
2021-01-27 10:09:34 +01:00
Oskar Stark
e7e61ee551 Use createMock() and use import instead of FQCN 2021-01-27 10:09:26 +01:00
Nicolas Grekas
98b58b4c4c Merge branch '5.1' into 5.2
* 5.1:
  Fix transient tests
  Fix class resolution in Doctrine EventListenerPass
  [Serializer] Fix tests  marked as incomplete
  propagate the object being validated to sub-constraints
  [Translator] fix handling plural for floating numbers
  fix redis messenger options with dsn
  Update ConsoleEvents.php
  allow Doctrine persistence 2 too
  [Messenger] Fix transporting non-UTF8 payloads by encoding them using base 64
  add doctrine/persistence as a dev requirement
  Exclude non-initialized properties accessed with getters
2021-01-27 10:04:53 +01:00
Nicolas Grekas
abf8010eae Merge branch '4.4' into 5.1
* 4.4:
  Fix transient tests
  Fix class resolution in Doctrine EventListenerPass
  [Serializer] Fix tests  marked as incomplete
  [Translator] fix handling plural for floating numbers
  fix redis messenger options with dsn
  Update ConsoleEvents.php
  allow Doctrine persistence 2 too
  [Messenger] Fix transporting non-UTF8 payloads by encoding them using base 64
  add doctrine/persistence as a dev requirement
  Exclude non-initialized properties accessed with getters
2021-01-27 10:04:36 +01:00
Nicolas Grekas
c925f4cff8 minor #39987 [HttpKernel] Fix transient tests (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Fix transient tests

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

Because request contains a `REQUEST_TIME` attribute, it make tests failing https://ci.appveyor.com/project/fabpot/symfony/builds/37455398

Commits
-------

9562d6ba5a Fix transient tests
2021-01-27 09:41:19 +01:00
Nicolas Grekas
190f089fee minor #39990 [DoctrineBridge] Fix class resolution in Doctrine EventListenerPass (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Fix class resolution in Doctrine EventListenerPass

| Q             | A
| ------------- | ---
| Branch?       | 4.x
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | fix #
| License       | MIT
| Doc PR        | -

Commits
-------

08b2da79e8 Fix class resolution in Doctrine EventListenerPass
2021-01-27 09:30:24 +01:00
Jérémy Derussé
9562d6ba5a
Fix transient tests 2021-01-27 01:05:29 +01:00
Jérémy Derussé
08b2da79e8
Fix class resolution in Doctrine EventListenerPass 2021-01-27 01:01:34 +01:00
Nicolas Grekas
484a95d8d1 bug #38900 [Serializer] Exclude non-initialized properties accessed with getters (BoShurik)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Exclude non-initialized properties accessed with getters

| 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       | no <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Allow to serialize
```php
final class Php74DummyPrivate
{
    private string $uninitializedProperty;

    private string $initializedProperty = 'defaultValue';

    public function getUninitializedProperty(): string
    {
        return $this->uninitializedProperty;
    }

    public function getInitializedProperty(): string
    {
        return $this->initializedProperty;
    }
}
```

Similar to #34791

Commits
-------

da9100320e Exclude non-initialized properties accessed with getters
2021-01-26 21:44:18 +01:00
Nicolas Grekas
ffdc46c86b minor #39975 [Serializer] Fix tests wrongly marked as incomplete (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Fix tests wrongly marked as incomplete

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

https://github.com/symfony/symfony/pull/30907 has been merged meanwhile.

Commits
-------

e632302004 [Serializer] Fix tests  marked as incomplete
2021-01-26 21:39:55 +01:00
Robin Chalas
8dcc3d61c5 [SecurityBundle] Fix referencing aliases from RegisterEntryPointPass 2021-01-26 16:45:37 +01:00
Robin Chalas
e632302004 [Serializer] Fix tests marked as incomplete 2021-01-26 11:29:51 +01:00
Christian Flothmann
85989c3678 keep valid submitted choices when additional choices are submitted 2021-01-26 10:39:19 +01:00
Nicolas Grekas
97779ec318 bug #39872 [Validator] propagate the object being validated to nested constraints (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[Validator] propagate the object being validated to nested constraints

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

Commits
-------

8c1bac90aa propagate the object being validated to sub-constraints
2021-01-26 10:36:50 +01:00
Christian Flothmann
8c1bac90aa propagate the object being validated to sub-constraints 2021-01-26 10:29:29 +01:00
Nicolas Grekas
4b8983aef5 bug #39887 [Translator] fix handling plural for floating numbers (kylekatarnls)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Translator] fix handling plural for floating numbers

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

Commits
-------

533cd7ef6c [Translator] fix handling plural for floating numbers
2021-01-26 10:08:00 +01:00
kylekatarnls
533cd7ef6c [Translator] fix handling plural for floating numbers 2021-01-26 10:07:54 +01:00
Bastien Picharles
a0e7bf4c0d fix redis messenger options with dsn 2021-01-26 09:57:06 +01:00
Steve Hyde
38fd86f34e Update ConsoleEvents.php
input and output can be handed to the command, handed off to the command, or can be handled by the command, but handled to the command doesn't work
2021-01-26 09:54:39 +01:00
Christian Flothmann
11a9e10beb allow Doctrine persistence 2 too 2021-01-26 08:56:21 +01:00
Fabien Potencier
43eb050c0d bug #39970 [Messenger] Fix transporting non-UTF8 payloads by encoding them using base 64 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Fix transporting non-UTF8 payloads by encoding them using base 64

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

Replaces #33920

When using the Doctrine transport, sending emails with binary attachments currently requires a custom Messenger serializer because the "body" column is created for UTF-8 only.

In #33920, it is proposed to change the TEXT type to a BLOB. It leaves at least one problem unhandled: the conversion of existing messenger tables.

This PR takes a more conservative approach, by encoding messages to base 64, only if they are non-UTF8.

Compatibility with the existing format is preserved.

The drawback of this approach is that the size of eg email attachments is going to increase by 33% because of the extra encoding. I think this drawback is acceptable for 4.4, and that this PR is the most pragmatic way to make attachments just work.

Commits
-------

6fc9e51722 [Messenger] Fix transporting non-UTF8 payloads by encoding them using base 64
2021-01-25 22:43:21 +01:00
Nicolas Grekas
6fc9e51722 [Messenger] Fix transporting non-UTF8 payloads by encoding them using base 64 2021-01-25 18:37:49 +01:00
Christian Flothmann
6ea9e4d7ca add doctrine/persistence as a dev requirement 2021-01-25 17:45:18 +01:00
Oskar Stark
fe57893025 Merge branch '5.1' into 5.2
* 5.1:
  Fix typo in test
2021-01-25 17:23:41 +01:00
Oskar Stark
79c9a1a6b2 Fix typo in test 2021-01-25 17:14:18 +01:00
Nicolas Grekas
470d3e7866 Fix merge 2021-01-25 16:14:59 +01:00
Simon Berger
a5fd0c48eb Changed private static array-properties to const
static properties newly introduced in 5.2
2021-01-25 15:52:07 +01:00
Nicolas Grekas
e23aae35c1 Merge branch '5.1' into 5.2
* 5.1:
  Changed private static array-properties to const static properties newly introduced in 5.1
2021-01-25 15:44:52 +01:00
Nicolas Grekas
ac61623ef8 minor #39962 Changed private static array-properties to const (5.1) (simonberger)
This PR was merged into the 5.1 branch.

Discussion
----------

Changed private static array-properties to const (5.1)

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

This continues #39959 for 5.1
Just a few newly introduced readonly static array-properties.

/cc @nicolas-grekas

Commits
-------

f891fb2e5e Changed private static array-properties to const static properties newly introduced in 5.1
2021-01-25 15:44:36 +01:00
Simon Berger
f891fb2e5e Changed private static array-properties to const
static properties newly introduced in 5.1
2021-01-25 15:41:58 +01:00
Nicolas Grekas
00f99bd517 Merge branch '5.1' into 5.2
* 5.1:
  Fix merge
2021-01-25 15:24:26 +01:00
Nicolas Grekas
a2ded28a8d Fix merge 2021-01-25 15:22:12 +01:00
Nicolas Grekas
a5ef152ee2 Merge branch '5.1' into 5.2
* 5.1:
  Changed private static array-properties to const
2021-01-25 15:08:25 +01:00
Nicolas Grekas
6f732876c1 Merge branch '4.4' into 5.1
* 4.4:
  Changed private static array-properties to const
2021-01-25 14:59:38 +01:00
Nicolas Grekas
c11a6da08c Merge branch '5.1' into 5.2
* 5.1:
  [Uid] fix checking for valid UUIDs
  [HttpKernel] Configure the ErrorHandler even when it is overriden
  Allow relative path to composer cache
2021-01-25 14:54:05 +01:00
Nicolas Grekas
be896b5004 Merge branch '4.4' into 5.1
* 4.4:
  [HttpKernel] Configure the ErrorHandler even when it is overriden
  Allow relative path to composer cache
2021-01-25 14:53:56 +01:00
Nicolas Grekas
7daef4ff6d [Uid] fix checking for valid UUIDs 2021-01-25 12:59:00 +01:00
BoShurik
da9100320e Exclude non-initialized properties accessed with getters 2021-01-25 13:41:50 +03:00
Simon Berger
aa79381fe4 Changed private static array-properties to const 2021-01-25 00:44:26 +01:00
Christian Flothmann
c38473a917 bug #39951 [Form] check parent types for label_format and translation_domain (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[Form] check parent types for label_format and translation_domain

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

Commits
-------

a5505c4dfa check parent types for label_format and translation_domain
2021-01-24 21:08:29 +01:00
Nicolas Grekas
3fedac0f0a bug #39911 [RateLimiter] Fix infinite values with NoLimiter (YaFou)
This PR was merged into the 5.2 branch.

Discussion
----------

[RateLimiter] Fix infinite values with NoLimiter

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39899
| 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/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.
-->

See #39899. I don't find any solution to convert `\INF` constant (which is a float value) to an integer.

Commits
-------

4f9eedfcf7 [RateLimiter] Fix infinite values with NoLimiter
2021-01-23 19:48:57 +01:00
Nicolas Grekas
b4c362cdc3 bug #39936 [Validator] Fix DebugCommand (loic425)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[Validator] Fix DebugCommand

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

Additionally (see https://symfony.com/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.
-->

Commits
-------

1eb13767fc [Validator] Fix DebugCommand
2021-01-23 19:47:03 +01:00
Loïc Frémont
1eb13767fc [Validator] Fix DebugCommand 2021-01-23 19:46:54 +01:00
Nicolas Grekas
0c7eb27c5e bug #39909 [PhpUnitBridge] Allow relative path to composer cache (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Allow relative path to composer cache

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

When users defines a relative path in the `COMPOSER_CACHE_DIR` env variable,
The `simple-phpunit` code, by changing the directory (with `chdir`), give to composer a different context. At the end, composer stores its cache inside the `vendor/bin/.phpunit` folder, and inside the `vendor/bin/.phpunit/phpunit-X.Y.Z` folder.

This PR convert the relative path provided by the user into Absolute path.

Commits
-------

cde0ffdc83 Allow relative path to composer cache
2021-01-23 19:22:35 +01:00
Nicolas Grekas
799bc2a8e0 bug #39944 [HttpKernel] Configure the ErrorHandler even when it is overriden (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Configure the ErrorHandler even when it is overriden

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

Fixes the part of https://github.com/getsentry/sentry-symfony/issues/421 that is about `DebugHandlersListener`.

Commits
-------

31817b48e2 [HttpKernel] Configure the ErrorHandler even when it is overriden
2021-01-23 19:11:27 +01:00
Christian Flothmann
a5505c4dfa check parent types for label_format and translation_domain 2021-01-23 14:28:52 +01:00
Christian Flothmann
6f8b4cbfe6 Merge branch '5.1' into 5.2
* 5.1:
  "export-ignore" contracts and phpunit-bridge
  [Console][Command] Fix Closure code binding when it is a static anonymous function
  Use class const in test
  [Security] [HttpFoundation] Use class const in test
  [PropertyInfo] Fix breaking change with has*(arguments...) methods
2021-01-23 10:47:32 +01:00
Christian Flothmann
a933c3e0a1 Merge branch '4.4' into 5.1
* 4.4:
  "export-ignore" contracts and phpunit-bridge
  [Console][Command] Fix Closure code binding when it is a static anonymous function
2021-01-23 10:39:08 +01:00
Nicolas Grekas
31817b48e2 [HttpKernel] Configure the ErrorHandler even when it is overriden 2021-01-22 18:13:09 +01:00
Christian Flothmann
de8ddfdfba bug #39896 [PropertyInfo] Fix breaking change with has*(arguments...) methods (YaFou)
This PR was merged into the 5.1 branch.

Discussion
----------

[PropertyInfo] Fix breaking change with has*(arguments...) methods

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39885
| 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/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.
-->

Until 5.0:
```php
class Dummy
{
    private $elements;

    public function hasElement($element): bool
    {
        // ...
    }
}

$extractor = new ReflectionExtractor();
$extractor->isReadable('Dummy', 'element'); // false
```

After 5.0:
```php
class Dummy
{
    private $elements;

    public function hasElement($element): bool
    {
        // ...
    }
}

$extractor = new ReflectionExtractor();
$extractor->isReadable('Dummy', 'element'); // true => BREAKING CHANGE
```

Commits
-------

37cc16e3d8 [PropertyInfo] Fix breaking change with has*(arguments...) methods
2021-01-22 18:02:52 +01:00
Christian Flothmann
542dddca9a fix test 2021-01-22 17:15:52 +01:00
Robin Chalas
c6f5e2a3b8 bug #39932 [Console] [Command] Fix Closure code binding when it is a static anonymous function (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] [Command] Fix Closure code binding when it is a static anonymous function

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

I'm building a single command application and I did:
```php
->setCode(static function (InputInterface $input, OutputInterface $output): void {
    // my code
})
```
and it results in a warning `Cannot bind an instance to a static closure` + an exception `You must override the execute() method in the concrete command class.` I guess we should silently fail here if the Closure is not bindable.

Commits
-------

18d426871e [Console][Command] Fix Closure code binding when it is a static anonymous function
2021-01-22 13:37:43 +01:00
Jérémy Derussé
26452260ed
minor #39931 Use class const in test (OskarStark)
This PR was merged into the 5.1 branch.

Discussion
----------

Use class const in test

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

super minor, same as #39930, but for `5.1`

I will finish this PR after #39930 is merged and upmerged

Commits
-------

4a98eeecdc [Security] [HttpFoundation] Use class const in test
2021-01-22 11:24:07 +01:00
Jérémy Derussé
ac362e369c
Merge branch '4.4' into 5.1
* 4.4:
  Use class const in test
2021-01-22 11:23:37 +01:00
Thomas Calvet
18d426871e [Console][Command] Fix Closure code binding when it is a static anonymous function 2021-01-22 09:23:15 +01:00
Oskar Stark
39181f4fdf Use class const in test 2021-01-22 08:46:09 +01:00
Oskar Stark
4a98eeecdc [Security] [HttpFoundation] Use class const in test 2021-01-22 08:08:23 +01:00
Oskar Stark
b5af0083de Merge branch '5.1' into 5.2
* 5.1:
  [Notifier] [OvhCloud] “Invalid signature” for message with slashes
2021-01-21 20:03:15 +01:00
Oskar Stark
1c9d2c8982 bug #39871 [Notifier] [OvhCloud] “Invalid signature” for message with slashes (OneT0uch)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[Notifier] [OvhCloud] “Invalid signature” for message with slashes

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #39836 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Test to show issue of invalid signature when message contains slash.

Commits
-------

9f01fb84b7 [Notifier] [OvhCloud] “Invalid signature” for message with slashes
2021-01-21 20:02:32 +01:00
Théo DELCEY
9f01fb84b7 [Notifier] [OvhCloud] “Invalid signature” for message with slashes 2021-01-21 20:02:19 +01:00
Jérémy Derussé
c1769d1b48
Merge branch '5.1' into 5.2
* 5.1:
  Remove wrong test
  [Uid] Unable to extend Uuid/Ulid and use fromString()
  Fix typo in property name
2021-01-21 17:54:56 +01:00
Jérémy Derussé
7e2ac5ff33
Merge branch '4.4' into 5.1
* 4.4:
  Remove wrong test
  Fix typo in property name
2021-01-21 17:54:24 +01:00
Jérémy Derussé
91c360ec75
Remove wrong test 2021-01-21 16:51:17 +01:00
Alexandre Parent
69fcd075eb Fix console logger according to PSR-3 2021-01-21 09:05:34 -05:00
YaFou
37cc16e3d8
[PropertyInfo] Fix breaking change with has*(arguments...) methods 2021-01-20 22:15:48 +01:00
Jérémy Derussé
cde0ffdc83
Allow relative path to composer cache 2021-01-20 21:19:14 +01:00
YaFou
4f9eedfcf7
[RateLimiter] Fix infinite values with NoLimiter 2021-01-20 21:07:17 +01:00
Oskar Stark
824777938d [Uid] Unable to extend Uuid/Ulid and use fromString() 2021-01-20 18:19:46 +01:00
HypeMC
a70b71b50e Fix typo in property name 2021-01-20 03:37:58 +01:00
Alexander M. Turek
31dcefe779 Merge branch '5.1' into 5.2
* 5.1:
  [HttpFoundation] Drop int return type from parseFilesize()
  Added $translator->addLoader()
  bug symfony/symfony#39878 [doctrine-bridge] Add username to UserNameNotFoundException
  [Uid] Clarify the format returned by getTime()
  fix spelling
  Add check for constant in Curl client
  Revert #38614, add assert to avoid regression
  Fix container injection with TypedReference
  Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value
  Update PHP CS Fixer config to v2.18
2021-01-19 22:00:40 +01:00
Alexander M. Turek
c639531fe4 Merge branch '4.4' into 5.1
* 4.4:
  [HttpFoundation] Drop int return type from parseFilesize()
  Added $translator->addLoader()
  bug symfony/symfony#39878 [doctrine-bridge] Add username to UserNameNotFoundException
  fix spelling
  Add check for constant in Curl client
  Revert #38614, add assert to avoid regression
  Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value
  Update PHP CS Fixer config to v2.18
2021-01-19 21:48:35 +01:00
Alexander M. Turek
35c19c876b bug #39880 [DoctrineBridge] Add username to UserNameNotFoundException (qurben)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Add username to UserNameNotFoundException

| 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 #39878  <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | <!-- 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/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.
-->

Adds username to UserNameNotFoundException when thrown from EntityUserProvider.

In other places there are no tests for this and I am not sure if the current setup even allows asserting if exceptions contain fields, besides the default ones.

Commits
-------

ee5b51af78 bug symfony/symfony#39878 [doctrine-bridge] Add username to UserNameNotFoundException
2021-01-19 21:45:16 +01:00
Alexander M. Turek
6c01479a93 minor #39895 [Translator] Added $translator->addLoader() to README example (Ser5)
This PR was merged into the 4.4 branch.

Discussion
----------

[Translator] Added $translator->addLoader() to README example

For the example to work it needs the line with $translator->addLoader().
Fixed it for request at https://github.com/symfony/symfony/issues/39854#issuecomment-762283989

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| 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/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.
-->

Commits
-------

ba29d2a2f0 Added $translator->addLoader()
2021-01-19 21:42:38 +01:00
Luke Towers
a1b31f840c [HttpFoundation] Drop int return type from parseFilesize() 2021-01-19 18:19:22 +01:00
Ser5
ba29d2a2f0
Added $translator->addLoader()
For the example to work it needs the line with $translator->addLoader().
Fixed it for request at https://github.com/symfony/symfony/issues/39854#issuecomment-762283989
2021-01-19 21:09:23 +05:00
Gerben Oolbekkink
ee5b51af78 bug symfony/symfony#39878 [doctrine-bridge] Add username to UserNameNotFoundException 2021-01-19 15:42:58 +01:00
Thomas Calvet
c14c7376bd [Uid] Clarify the format returned by getTime() 2021-01-19 13:23:40 +01:00
Ben Hakim
c488ff0089
fix spelling 2021-01-19 14:17:53 +02:00
Pierre du Plessis
c888797313 Add check for constant in Curl client 2021-01-19 12:01:54 +02:00
BafS
3058cd0ec6
Revert #38614, add assert to avoid regression 2021-01-18 20:11:38 +01:00
Nicolas Grekas
b4ec36fad4 bug #39873 [DependencyInjection] Fix container injection with TypedReference (jderusse)
This PR was merged into the 5.1 branch.

Discussion
----------

[DependencyInjection] Fix container injection with TypedReference

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

When using `TypedReference`, the closure signature is `function (...): Type {` which does not matche the regular expresion that replace `$this` by `$container` + `use ($container)`

note: there is no issue in 4.4. At that time, dumped container use `$this->services` and looks like:
```
$instance->closures = [0 => function (): ?\stdClass {\n
    return ($this->services['foo'] ?? null);\n
}];
```

Commits
-------

f8c14acd51 Fix container injection with TypedReference
2021-01-18 19:01:07 +01:00
Jérémy Derussé
f8c14acd51
Fix container injection with TypedReference 2021-01-18 14:53:48 +01:00
Fabien Potencier
6af444607c bug #39858 Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value (alexander-schranz)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? |
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This should fix that when `SYMFONY_PHPUNIT_VERSION` is set again on empty:

```
SYMFONY_PHPUNIT_VERSION= vendor/bin/simple-phpunit
```

it does not error with:

```bash
Creating a "phpunit/phpunit" project at "./phpunit--1"

  [UnexpectedValueException]
  Could not parse version constraint .*: Invalid version string ".*"
```

Commits
-------

72ce010c0b Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value
2021-01-18 13:32:08 +01:00
Alexander Schranz
72ce010c0b Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value 2021-01-18 13:32:02 +01:00
Robin Chalas
b82378d61f Merge branch '5.1' into 5.2
* 5.1:
  fix merge
2021-01-17 12:17:44 +01:00
Robin Chalas
6928ddec29 fix merge 2021-01-17 12:17:26 +01:00
Robin Chalas
c702c47f54 Merge branch '5.1' into 5.2
* 5.1:
  [Security] Replace message data in JSON security error response
  [DI] Skip deprecated definitions in CheckTypeDeclarationsPass
  [Messenger][AmazonSqs] Fix auto-setup for fifo queue
  [DoctrineBridge] Take into account that indexBy="person_id" could be a db column name, for a referenced entity
2021-01-17 11:58:44 +01:00
Robin Chalas
f2c5f25a98 Merge branch '4.4' into 5.1
* 4.4:
  [Security] Replace message data in JSON security error response
  [DI] Skip deprecated definitions in CheckTypeDeclarationsPass
  [DoctrineBridge] Take into account that indexBy="person_id" could be a db column name, for a referenced entity
2021-01-17 11:37:09 +01:00
Robin Chalas
5ba237a8ec bug #39861 [DependencyInjection] Skip deprecated definitions in CheckTypeDeclarationsPass (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Skip deprecated definitions in CheckTypeDeclarationsPass

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

When a definition uses a deprecated class , `CheckTypeDeclarationsPass` (with `$autoload = true`) will autoload the class, which triggers a deprecation notice. That breaks the CI in #39802 because the compiler pass is registered inside the SecurityBundle test suite.
I propose to stop checking deprecated definitions. Makes sense?

Commits
-------

531c81a06e [DI] Skip deprecated definitions in CheckTypeDeclarationsPass
2021-01-17 00:11:08 +01:00
Wouter de Jong
ab2ca7145f [Security] Replace message data in JSON security error response 2021-01-16 23:34:24 +01:00
Wouter de Jong
5e5795acd1 [Security] Replace message data in JSON security error response 2021-01-16 23:33:07 +01:00
Robin Chalas
531c81a06e [DI] Skip deprecated definitions in CheckTypeDeclarationsPass 2021-01-15 18:01:26 +01:00
Gijs van Lammeren
308f8fede0 [Messenger][AmazonSqs] Fix auto-setup for fifo queue 2021-01-15 11:12:31 +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
Oskar Stark
8ab7027e4b [Notifier] [GoogleChat] Fix wrong test 2021-01-15 09:35:51 +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
99a8ef5a37 [VarDumper] Fix tests 2021-01-14 21:47:05 +01:00
Nicolas Grekas
541f9927f1 Merge branch '5.1' into 5.2
* 5.1:
  [travis] always install ext-mongodb
  Fix circular loop with EntityManager
2021-01-14 21:26:19 +01:00
Nicolas Grekas
a0ac3b0f76 Merge branch '4.4' into 5.1
* 4.4:
  [travis] always install ext-mongodb
  Fix circular loop with EntityManager
2021-01-14 21:09:08 +01:00
Jérémy Derussé
23d692107c
Fix circular loop with EntityManager 2021-01-14 19:54:59 +01:00
Robin Chalas
b8dafc6670 Merge branch '5.1' into 5.2
* 5.1:
  [DI] fix merge
2021-01-14 18:46:00 +01:00
Robin Chalas
67273da71b [DI] fix merge 2021-01-14 18:42:31 +01:00
Nicolas Grekas
106c693c48 Merge branch '5.1' into 5.2
* 5.1:
  µCS fix
  CS fix
  CS fix
  [travis] use PHP 8.0 to patch return types and run deps=low
  Add me as a Notifier code owner
  Update sl_SI translations
  Don't trigger deprecation for deprecated aliases pointing to deprecated definitions
  [HttpFoundation] use atomic writes in MockFileSessionStorage
  Make EmailMessage & SmsMessage transport nullable
  remove unused argument
  [DI] fix param annotation
  [Config] Add \Symfony\Component\Config\Loader::load() return type
  Simplify PHP CS Fixer config
  Rename normalize param
2021-01-14 16:42:36 +01:00
Nicolas Grekas
07431bbbab Merge branch '4.4' into 5.1
* 4.4:
  µCS fix
2021-01-14 16:33:09 +01:00
Nicolas Grekas
1d7c3f6d6e µCS fix 2021-01-14 16:32:58 +01:00
Nicolas Grekas
134695cace CS fix 2021-01-14 16:32:37 +01:00
Nicolas Grekas
41a7eaa654 Merge branch '4.4' into 5.1
* 4.4:
  CS fix
  [travis] use PHP 8.0 to patch return types and run deps=low
  Update sl_SI translations
  Don't trigger deprecation for deprecated aliases pointing to deprecated definitions
  [HttpFoundation] use atomic writes in MockFileSessionStorage
  [DI] fix param annotation
  [Config] Add \Symfony\Component\Config\Loader::load() return type
  Simplify PHP CS Fixer config
  Rename normalize param
2021-01-14 16:25:38 +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
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
7f5ea78fb8 [travis] use PHP 8.0 to patch return types and run deps=low 2021-01-14 15:31:07 +01:00
Fabien Potencier
41697467bc bug #39812 Make EmailMessage & SmsMessage transport nullable (odolbeau)
This PR was merged into the 5.1 branch.

Discussion
----------

Make EmailMessage & SmsMessage transport nullable

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

Ideally, this should have been done in #38361 as it's exactly the same problem: the `transport` method can be called with `null` with deserializing a message from json (for example).

Commits
-------

d98aca06d0 Make EmailMessage & SmsMessage transport nullable
2021-01-14 08:17:33 +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
Christian Flothmann
3811030f26 fix typo 2021-01-13 12:59:22 +01:00
Olivier Dolbeau
d98aca06d0 Make EmailMessage & SmsMessage transport nullable 2021-01-13 11:32:36 +01:00
Christian Flothmann
b6d9c6c2c0 remove unused argument
The constructor expects only three arguments.
2021-01-13 10:37:20 +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
Robin Chalas
2127a9b37a [SecurityBundle] Drop dead check 2021-01-12 21:56:41 +01:00
Nicolas Grekas
d4c70a53ca [DI] fix param annotation 2021-01-12 20:08:29 +01:00
Robin Chalas
15d8080296 [SecurityBundle] Remove invalid service definition 2021-01-12 19:31:56 +01:00
Nicolas Grekas
92a2afb694 [Semaphore] Dont allow unserializing classes with a destructor 2021-01-12 15:35:33 +01:00
Nicolas Grekas
2052534540 Merge branch '5.1' into 5.2
* 5.1:
  Dont allow unserializing classes with a destructor
  Dont allow unserializing classes with a destructor - 4.4
  [Cache] fix possible collision when writing tmp file in filesystem adapter
  a colon followed by spaces exclusively separates mapping keys and values
  Contracts: Remove ellipsis
  fix handling float-like key attribute values
  Fix missing BCC recipients in SES bridge
  Dont allow unserializing classes with a destructor - 5.1
2021-01-12 15:28:55 +01:00
Nicolas Grekas
73a70acb2b Merge branch '4.4' into 5.1
* 4.4:
  Dont allow unserializing classes with a destructor
  Dont allow unserializing classes with a destructor - 4.4
  [Cache] fix possible collision when writing tmp file in filesystem adapter
  a colon followed by spaces exclusively separates mapping keys and values
  Contracts: Remove ellipsis
  fix handling float-like key attribute values
  Fix missing BCC recipients in SES bridge
2021-01-12 15:25:50 +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
15e7eeefd0 minor #39760 [HttpClient] Fix transient test with HttpClient jitter (jderusse)
This PR was merged into the 5.2 branch.

Discussion
----------

[HttpClient] Fix transient test with HttpClient jitter

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

Fix transient test, when asserting jitter generates random delay

Commits
-------

70fe66005a Fix transient test with HttpClient jitter
2021-01-12 12:36:23 +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
d5d388fc25 bug #39796 Dont allow unserializing classes with a destructor - 5.2 (jderusse)
This PR was merged into the 5.2 branch.

Discussion
----------

Dont allow unserializing classes with a destructor - 5.2

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

Prevent destructors with side-effects from being unserialized

Commits
-------

98601908bb Dont allow unserializing classes with a destructor - 5.2
2021-01-12 10:53:07 +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
Nicolas Grekas
8bc5679bcc bug #39795 Dont allow unserializing classes with a destructor - 5.1 (jderusse)
This PR was merged into the 5.1 branch.

Discussion
----------

Dont allow unserializing classes with a destructor - 5.1

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

Prevent destructors with side-effects from being unserialized

Commits
-------

07402f4af3 Dont allow unserializing classes with a destructor - 5.1
2021-01-12 10:31:38 +01:00
Jérémy Derussé
5dff21b45b
bug #39389 [Security]  Move the handleAuthenticationSuccess logic outside try/catch block (jderusse)
This PR was merged into the 5.2 branch.

Discussion
----------

[Security]  Move the handleAuthenticationSuccess logic outside try/catch block

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

The current implementation of `AuthenticationManager` handle the `handleAuthenticationSuccess` logic in a try/catch block which triggers the `handleAuthenticationFailure` in case of failure.

Which could leads to inconsistency and unexpected behavior. The authentication is either successfully or failure, but can't be both in the same request.

Commits
-------

da5c39ec2e Move AuthenticationSuccessEvent outside try/catch block
2021-01-12 09:13:20 +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
2922224d29 Use ::class keyword when possible 2021-01-11 11:45:43 +01:00
Fabien Potencier
b145df90e6 Merge branch '5.1' into 5.2
* 5.1:
  Use ::class keyword when possible
2021-01-11 11:44:39 +01:00
Fabien Potencier
1f3a29ba83 Use ::class keyword when possible 2021-01-11 11:34:08 +01:00
Fabien Potencier
b9909c4432 Merge branch '5.1' into 5.2
* 5.1:
  Use ::class keyword when possible
2021-01-11 10:51:46 +01:00
Fabien Potencier
83b087364b Merge branch '4.4' into 5.1
* 4.4:
  Use ::class keyword when possible
2021-01-11 10:50:50 +01:00
Fabien Potencier
6c8d5808a6 Use ::class keyword when possible 2021-01-11 09:57:50 +01:00
Fabien Potencier
f798b1c2dc Merge branch '5.1' into 5.2
* 5.1:
  Use ::class keyword when possible
2021-01-11 09:45:11 +01:00