Commit Graph

51389 Commits

Author SHA1 Message Date
Nicolas Grekas
ffbb9883bd Merge branch '5.1' into 5.x
* 5.1:
  [Contracts] add branch-aliases for dev-main
  [Cache] Make Redis initializers static
  [Messenger] Fixed typos in Connection
  [CI] Fixed build on AppVeyor
  Fix tests typo
  [Lock] Reset Key lifetime time before we acquire it
  [CI] Silence errors when remove file/dir on test tearDown()
  Fix tests
  Remove content-type check on toArray methods
2020-10-14 19:08:19 +02:00
Nicolas Grekas
3e587d7013 Merge branch '4.4' into 5.1
* 4.4:
  [Contracts] add branch-aliases for dev-main
  [Cache] Make Redis initializers static
  Fix tests typo
  [Lock] Reset Key lifetime time before we acquire it
  [CI] Silence errors when remove file/dir on test tearDown()
2020-10-14 18:43:39 +02:00
Nicolas Grekas
6ba6ae75e0 minor #38571 [Contracts] add branch-aliases for dev-main (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Contracts] add branch-aliases for dev-main

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

symfony/contracts is still using a "main" branch so we need to alias it for composer to know which version this maps to.

Commits
-------

969f3c217b [Contracts] add branch-aliases for dev-main
2020-10-14 18:24:00 +02:00
Nicolas Grekas
8553361a10 bug #38566 Fix minor issue when sharing windows between Limiters (Nyholm)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

Fix minor issue when sharing windows between Limiters

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

If I start using my custom Limiter, then change back to `FixedWindowLimiter`, then my cache might contain a value that `FixedWindowLimiter` does not support.

This PR makes sure that we handle such switch.

Commits
-------

e9ac9712d8 Fix minor issue when sharing windows between Limiters
2020-10-14 18:23:07 +02:00
Nyholm
e9ac9712d8 Fix minor issue when sharing windows between Limiters 2020-10-14 18:22:58 +02:00
Nicolas Grekas
969f3c217b [Contracts] add branch-aliases for dev-main 2020-10-14 17:23:35 +02:00
Fabien Potencier
2d5c2cf287 feature #38563 [Messenger][Redis] Adding support for lazy connect (Nyholm)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[Messenger][Redis] Adding support for lazy connect

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #38558
| License       | MIT
| Doc PR        | Should be added

With inspiration from the CacheComponent. This PR makes it possible to make the connection to Redis only when you first use it.

Commits
-------

1d7c8013e6 [Messenger][Redis] Adding support for lazy connect
2020-10-14 16:11:47 +02:00
Nyholm
1d7c8013e6 [Messenger][Redis] Adding support for lazy connect 2020-10-14 16:11:38 +02:00
Fabien Potencier
a590e90698 minor #38567 [Cache] Make Redis initializers static (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Make Redis initializers static

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

I am on very thin ice now. I saw a comment on similar code here: https://github.com/symfony/symfony/pull/38563#discussion_r504600024

These anonymous functions in the cache component could also be made static to avoid being connected to the object using the Redis trait.

Feel free to correct me if this does not make much sense.

Commits
-------

ad8de57b91 [Cache] Make Redis initializers static
2020-10-14 16:09:22 +02:00
Nyholm
ad8de57b91
[Cache] Make Redis initializers static 2020-10-14 13:43:26 +02:00
Fabien Potencier
674382b7ea bug #38553 [Lock] Reset Key lifetime time before we acquire it (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] Reset Key lifetime time before we acquire it

| Q             | A
| ------------- | ---
| Branch?       | 5.1 (maybe lower, I'll check)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38541
| License       | MIT
| Doc PR        | n/a

Im out on somewhat deep water now. I am pretty sure we should reset the Key lifetime every time we acquire it. Without it it will me tricky to re-use a lock. (As pointed out by #38541)

@jderusse can you confirm.

Commits
-------

55ad70225a [Lock] Reset Key lifetime time before we acquire it
2020-10-14 11:40:34 +02:00
Fabien Potencier
4529e08433 minor #38555 [Messenger] Fixed typos in Amqp Connection (Nyholm)
This PR was submitted for the 5.x branch but it was merged into the 5.1 branch instead.

Discussion
----------

[Messenger] Fixed typos in Amqp Connection

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

Sorry for a small PR. When working with https://github.com/symfony/symfony-docs/pull/14404, I found a typo, then another one.. When I found 4 of them I decided to make a PR.

Commits
-------

5dec141afb [Messenger] Fixed typos in Connection
2020-10-14 11:38:18 +02:00
Nyholm
5dec141afb [Messenger] Fixed typos in Connection 2020-10-14 11:38:11 +02:00
Fabien Potencier
d235724d6d minor #38561 Fix tests typo (ScullWM)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix tests typo

| 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 #... <!-- 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 -->

While working on PSR 16 cache tests, I found this small glitch in the mocked `isHit` method

Commits
-------

047ce05f6b Fix tests typo
2020-10-14 11:36:53 +02:00
Fabien Potencier
9f6d604b52 Fix test 2020-10-14 11:36:06 +02:00
Fabien Potencier
268e9e3f34 minor #38556 [CI] Fixed build on AppVeyor (Nyholm)
This PR was submitted for the 5.x branch but it was squashed and merged into the 5.1 branch instead.

Discussion
----------

[CI] Fixed build on AppVeyor

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      |
| New feature?  |
| Deprecations? |
| Tickets       |
| License       | MIT
| Doc PR        |

CI fails on AppVeyor with:

> There was 1 error:
>1) Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\ConfigurationTest::testBaselineFileWriteError
unlink(C:\Users\appveyor\AppData\Local\Temp\1\sf-38AF.tmp): Permission denied
>C:\projects\symfony\src\Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\ConfigurationTest.php:404
ERRORS!

We dont need to fail the tests if we cannot remove a file on `tearDown()`

Commits
-------

0c08432a3d [CI] Fixed build on AppVeyor
2020-10-14 11:34:46 +02:00
Nyholm
0c08432a3d [CI] Fixed build on AppVeyor 2020-10-14 11:34:34 +02:00
Fabien Potencier
9982713327 Merge branch '3.4' into 4.4
* 3.4:
  [CI] Silence errors when remove file/dir on test tearDown()
2020-10-14 11:30:35 +02:00
Fabien Potencier
9b2dcac5d3 minor #38560 [CI] Silence errors when remove file/dir on test tearDown() (Nyholm)
This PR was merged into the 3.4 branch.

Discussion
----------

[CI] Silence errors when remove file/dir on test tearDown()

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

Requested in #38556

Commits
-------

efef41faa1 [CI] Silence errors when remove file/dir on test tearDown()
2020-10-14 09:59:59 +02:00
Fabien Potencier
e9d23677a7 Merge branch '4.4' into 5.1
* 4.4:
  Fix tests
  Remove content-type check on toArray methods
2020-10-14 09:58:47 +02:00
Fabien Potencier
8430954bce bug #38559 [Lock] Reset lifetime on acquireRead() (Nyholm)
This PR was merged into the 5.x branch.

Discussion
----------

[Lock] Reset lifetime on acquireRead()

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

Same as #38553 but this is for `acquireRead()` instead of `acquire()`.

`acquireRead()` is new in 5.2.

Commits
-------

de412bf24b Reset lifetime on acquireRead()
2020-10-14 09:58:12 +02:00
Thomas P
047ce05f6b Fix tests typo 2020-10-14 09:37:02 +02:00
Nyholm
55ad70225a
[Lock] Reset Key lifetime time before we acquire it 2020-10-14 09:15:31 +02:00
Nyholm
efef41faa1
[CI] Silence errors when remove file/dir on test tearDown() 2020-10-14 09:00:24 +02:00
Nyholm
de412bf24b
Reset lifetime on acquireRead() 2020-10-14 08:54:02 +02:00
Fabien Potencier
15498970e6 minor #38557 Fix tests (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix tests

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

Introduced by #38551

Commits
-------

91122492e8 Fix tests
2020-10-14 08:00:51 +02:00
Jérémy Derussé
91122492e8
Fix tests 2020-10-13 22:48:16 +02:00
Nicolas Grekas
8fa0573ab6 bug #38548 [FrameworkBundle] Bugfixes in buildDir in the CacheClear command (Nyholm)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[FrameworkBundle] Bugfixes in buildDir in the CacheClear command

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38547
| License       | MIT
| Doc PR        | n/a

Making sure one can clear cache with and without a buildDir

Commits
-------

2cad6bbbc7 [FrameworkBundle] Bugfixes in buildDir in the CacheClear command
2020-10-13 20:01:53 +02:00
Nyholm
2cad6bbbc7 [FrameworkBundle] Bugfixes in buildDir in the CacheClear command 2020-10-13 20:01:37 +02:00
Fabien Potencier
9cc3baa57e bug #38551 Remove content-type check on toArray methods (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove content-type check on toArray methods

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

Sometime the server provides a generic content type `text/plain` and prevent people using the `toArray` method. (ie. AWS metadata endpoint).

This PR removes the check on the content-type.
People trying to json_decode something else will ends with a `JsonException` anyway.

Commits
-------

1c8fff18f9 Remove content-type check on toArray methods
2020-10-13 19:09:02 +02:00
Fabien Potencier
e83ad8b6c9 feature #38550 [Security] Added check_post_only to the login link authenticator (wouterj)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[Security] Added check_post_only to the login link authenticator

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

This is useful when adding a page that requires a user action in order to validate the check link. That is required when using a single-use login link, to workaround browser and email client previews (which trigger a request).

See also the short docs discussion about this: https://github.com/symfony/symfony-docs/pull/14389#discussion_r502906341

For reference, I choose this option name as it relates to the `post_only` option in the `FormLoginAuthenticator`, which is about exactly the same thing. I didn't think `post_only` was a 100% clear name, but I'm happy to change this option to that for complete consistency.

cc @weaverryan

Commits
-------

5093e0df06 [Security] Added check_post_only to the login link authenticator
2020-10-13 19:07:36 +02:00
Wouter de Jong
5093e0df06 [Security] Added check_post_only to the login link authenticator 2020-10-13 19:07:29 +02:00
Jérémy Derussé
1c8fff18f9
Remove content-type check on toArray methods 2020-10-13 17:34:30 +02:00
Nicolas Grekas
3553ac5e41 Merge branch '5.1' into 5.x
* 5.1:
  Fix tests on github actions
2020-10-13 15:45:30 +02:00
Nicolas Grekas
60d1ac9a8c Merge branch '4.4' into 5.1
* 4.4:
  Fix tests on github actions
2020-10-13 15:45:25 +02:00
Nicolas Grekas
af8a21f0af Fix tests on github actions 2020-10-13 15:45:14 +02:00
Nicolas Grekas
4a2fdce4fe Merge branch '5.1' into 5.x
* 5.1:
  Fix .github/build-packages.php
2020-10-13 15:25:23 +02:00
Nicolas Grekas
d7afcf2dc5 Merge branch '4.4' into 5.1
* 4.4:
  Fix .github/build-packages.php
2020-10-13 15:25:16 +02:00
Nicolas Grekas
f086821a26 Merge branch '3.4' into 4.4
* 3.4:
  Fix .github/build-packages.php
2020-10-13 15:25:07 +02:00
Nicolas Grekas
84887f20e6 Fix .github/build-packages.php 2020-10-13 15:24:59 +02:00
Nicolas Grekas
01b064d97a Merge branch '5.1' into 5.x
* 5.1:
  Fix branch-version
2020-10-13 15:22:54 +02:00
Nicolas Grekas
1a0ea4d2f7 Merge branch '4.4' into 5.1
* 4.4:
  Fix branch-version
2020-10-13 15:21:37 +02:00
Nicolas Grekas
58f803f356 Merge branch '3.4' into 4.4
* 3.4:
  Fix branch-version
2020-10-13 15:20:53 +02:00
Nicolas Grekas
44a7e3e920 Fix branch-version 2020-10-13 15:20:16 +02:00
Nicolas Grekas
0b5b9d5c5f Merge branch '5.1' into 5.x
* 5.1:
  Fix merge
2020-10-13 14:46:56 +02:00
Nicolas Grekas
59db41386f Merge branch '4.4' into 5.1
* 4.4:
  Fix merge
2020-10-13 14:46:35 +02:00
Nicolas Grekas
1db73dfe02 Fix merge 2020-10-13 14:45:49 +02:00
Nicolas Grekas
7f0015ee35 Merge branch '5.1' into 5.x
* 5.1:
  Remove "version" from composer.json files, use "branch-version" instead
  [String] fix "is too large" ValueError on PHP 8
2020-10-13 14:43:06 +02:00
Nicolas Grekas
e95f87d1c8 bug #38546 [String] fix "is too large" ValueError on PHP 8 (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[String] fix "is too large" ValueError on PHP 8

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

Commits
-------

15c22c69e4 [String] fix "is too large" ValueError on PHP 8
2020-10-13 14:36:28 +02:00
Nicolas Grekas
23ab908213 Merge branch '4.4' into 5.1
* 4.4:
  Remove "version" from composer.json files, use "branch-version" instead
2020-10-13 14:35:38 +02:00