Commit Graph

53095 Commits

Author SHA1 Message Date
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
Nicolas Grekas
aa5ca01ed0 bug #39967 [Messenger] fix redis messenger options with dsn (Kleinast)
This PR was submitted for the 5.1 branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Messenger] fix redis messenger options with dsn

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

This will fix the fact that you can use framework.messenger.transports.*.options to complete/default your redis configuration

Commits
-------

a0e7bf4c0d fix redis messenger options with dsn
2021-01-26 09:57:27 +01:00
Bastien Picharles
a0e7bf4c0d fix redis messenger options with dsn 2021-01-26 09:57:06 +01:00
Alexander M. Turek
d244e796b6 minor #39964 [Console] Fix typo in console.command description (oceanicpanda)
This PR was submitted for the 5.x branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Console] Fix typo in console.command description

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

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

Commits
-------

38fd86f34e Update ConsoleEvents.php
2021-01-26 09:54:48 +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
Alexander M. Turek
77401ef844 minor #39973 allow Doctrine persistence 2 too (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

allow Doctrine persistence 2 too

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

Commits
-------

11a9e10beb allow Doctrine persistence 2 too
2021-01-26 09:42:19 +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
Robin Chalas
11290f9c8d minor #39968 [FrameworkBundle] add doctrine/persistence as a dev requirement (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] add doctrine/persistence as a dev requirement

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

Otherwise, we are testing something that will never be possible in a real application.

Commits
-------

6ea9e4d7ca add doctrine/persistence as a dev requirement
2021-01-25 18:08:47 +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
5532e0ac60 minor #39966 Fix typo in test (OskarStark)
This PR was merged into the 5.1 branch.

Discussion
----------

Fix typo in test

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

Commits
-------

79c9a1a6b2 Fix typo in test
2021-01-25 17:23:26 +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
Nicolas Grekas
17560729d1 minor #39965 Changed private static array-properties to const (5.2) (simonberger)
This PR was merged into the 5.2 branch.

Discussion
----------

Changed private static array-properties to const (5.2)

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

This continues #39959 for 5.2
Just two array-properties and a string property in one class newly added.

/cc @nicolas-grekas

Commits
-------

a5fd0c48eb Changed private static array-properties to const static properties newly introduced in 5.2
2021-01-25 16:00:15 +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
4181c431e9 minor #39959 Changed private static array-properties to const (simonberger)
This PR was merged into the 4.4 branch.

Discussion
----------

Changed private static array-properties to const

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

This changes all private static properties (just screened arrays) to private const. I left out those which have write access obviously and also those with `static::` access.

It is a new implementation of #38213. Based on 4.4 this time.
If merging it up creates several conflicts, you could ignore all changes of 4.4 and I create a new branch for 5.1 or 5.2. I'll do this anyway if any new private static arrays are existing there.

Commits
-------

aa79381fe4 Changed private static array-properties to const
2021-01-25 14:56:02 +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
592f8f5728 bug #39956 [Uid] fix checking for valid UUIDs (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[Uid] fix checking for valid UUIDs

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

Some versions of `uuid_type()` trigger a PHP warning. This handles it.

Commits
-------

7daef4ff6d [Uid] fix checking for valid UUIDs
2021-01-25 14:50:03 +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
Christian Flothmann
de714b9bf3 minor #39940 [Notifier] fix test (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[Notifier] fix test

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

Commits
-------

542dddca9a fix test
2021-01-23 10:38:28 +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