Commit Graph

51567 Commits

Author SHA1 Message Date
Fabien Potencier
185e9ea67e feature #38426 [HttpClient] Parameterize list of retryable methods (jderusse)
This PR was merged into the 5.x branch.

Discussion
----------

[HttpClient] Parameterize list of retryable methods

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

Retrying non-idempotent methods is not always acceptable for user. This PR adds an easy way to configure this behavior.

The `RetryDeciderInterface::shouldRetry()` now take the exception in parameter, in order to let decider not retrying the request when the methods should never by retried.

With #38420, this code would belongs to the RetryStrategy implementation, and would return an `NeverRetryDecider` when method is not allowed.

Commits
-------

56809d1b91 Parameterize list of retryed Http methods
2020-10-20 08:18:14 +02:00
Fabien Potencier
3ed5ec0aab minor #38638 [Form] Sync translations (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Sync translations

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

Commits
-------

280a27fc16 [Form] Sync translations
2020-10-20 08:17:17 +02:00
Fabien Potencier
95560025b6 feature #38608 [RateLimiter] rename Limit to RateLimit and add RateLimit::getLimit() (kbond)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[RateLimiter] rename Limit to RateLimit and add RateLimit::getLimit()

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

After discussing #38489 with @wouterj, he agreed we should add `Limit::getLimit()` but this method name was unfortunate. We decided to rename the `Limit` object to `RateLimit` which, IMO, is a better name for the object and is inline with how this concept is described in the [RateLimit Header Fields for HTTP RFC](https://tools.ietf.org/id/draft-polli-ratelimit-headers-00.html).

Commits
-------

c5361cfc58 [RateLimiter] rename Limit to RateLimit and add RateLimit::getLimit()
2020-10-20 08:15:23 +02:00
Kevin Bond
c5361cfc58 [RateLimiter] rename Limit to RateLimit and add RateLimit::getLimit() 2020-10-20 08:15:14 +02:00
Fabien Potencier
280a27fc16 [Form] Sync translations 2020-10-20 08:12:23 +02:00
Wouter de Jong
697fe21f24 Added dutch translations for new invalid messages 2020-10-20 08:10:02 +02:00
Fabien Potencier
2b1190f46c bug #38617 [Form] Add missing invalid_message translations (wouterj)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[Form] Add missing invalid_message translations

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

Some invalid messages were missed in #30931 (probably because of the old age of that PR). This PR adds all missing translation keys and a missing invalid message for the new WeekType.

I've also added the dutch translations (might be up for improvement, but it's a start). We should probably initiate another community initiative to translate these new messages (only a couple languages include the new invalid messages yet).

Commits
-------

86c78b6302 Added dutch translations for new invalid messages
301f0aa0db Added missing invalid messages
2020-10-20 08:09:22 +02:00
Fabien Potencier
65b41dea0d minor #38637 Enable Doctrine tests on php 8 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Enable Doctrine tests on php 8

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

Continuation of #38636 on 4.4.

Commits
-------

c65c6ea75d Don't skip Doctrine tests on php 8.
2020-10-20 08:07:38 +02:00
Fabien Potencier
0e468e5bf3 minor #38636 Enable Doctrine tests on php 8 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Enable Doctrine tests on php 8

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

Following doctrine/dbal#4347, this PR enables all Doctrine tests on php 8.

Commits
-------

f4a99b2361 Don't skip Doctrine tests on php 8.
2020-10-20 08:06:17 +02:00
Alexander M. Turek
c65c6ea75d Don't skip Doctrine tests on php 8. 2020-10-20 00:20:26 +02:00
Alexander M. Turek
f4a99b2361 Don't skip Doctrine tests on php 8. 2020-10-19 23:16:40 +02:00
Jérémy Derussé
56809d1b91
Parameterize list of retryed Http methods 2020-10-19 17:04:49 +02:00
Nicolas Grekas
e693b3c828 minor #38619 Stop using set-env in GitHub actions (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Stop using set-env in GitHub actions

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

In our integration tests, we currently get deprecation warnings because we use `set-env`.

<img width="1560" alt="Bildschirmfoto 2020-10-18 um 13 05 23" src="https://user-images.githubusercontent.com/1506493/96366863-a5b09f80-114a-11eb-9f85-ae785307eafc.png">

This PR follows GitHub's documentation on [how to set environment variables](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable) for subsequent steps of the same job.

Commits
-------

e3489d9b58 Stop using set-env in GitHub actions.
2020-10-19 16:21:26 +02:00
Alexander M. Turek
e3489d9b58 Stop using set-env in GitHub actions. 2020-10-19 15:54:49 +02:00
Wouter de Jong
86c78b6302 Added dutch translations for new invalid messages 2020-10-19 15:06:38 +02:00
Wouter de Jong
301f0aa0db Added missing invalid messages 2020-10-19 15:06:38 +02:00
Nicolas Grekas
bbb220c8e3 bug #38612 [Messenger/Amqp] Allow setting option "login" in DSN (W0rma)
This PR was merged into the 5.1 branch.

Discussion
----------

[Messenger/Amqp] Allow setting option "login" in DSN

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

Commits
-------

43c05774ac Allow setting AMQP option "login"
2020-10-19 12:04:45 +02:00
Fabien Potencier
1d445cce63 Merge branch '5.1' into 5.x
* 5.1:
  [Messenger][Doctrine] Avoid early db access for pgsql detection
  Add missing use statement
2020-10-19 08:28:41 +02:00
Fabien Potencier
4fdacdb3a3 bug #38618 [Messenger][Doctrine] Avoid early db access for pgsql detection (chalasr)
This PR was merged into the 5.1 branch.

Discussion
----------

[Messenger][Doctrine] Avoid early db access for pgsql detection

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

Keeps the connection lazy using an instanceof check on the DBAL driver instead.

Commits
-------

c4cc4a338b [Messenger][Doctrine] Avoid early db access for pgsql detection
2020-10-19 08:27:35 +02:00
Alexander M. Turek
2702d81499 bug #38623 [HttpFoundation][RateLimiter] fix RequestRateLimiterInterface::reset() (kbond)
This PR was merged into the 5.x branch.

Discussion
----------

[HttpFoundation][RateLimiter] fix RequestRateLimiterInterface::reset()

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

The reset method requires the `$request`.

Commits
-------

a246894a00 fix RequestRateLimiterInterface::reset()
2020-10-19 00:34:45 +02:00
Kevin Bond
a246894a00
fix RequestRateLimiterInterface::reset() 2020-10-18 18:14:51 -04:00
Dieter
43c05774ac Allow setting AMQP option "login" 2020-10-18 13:03:00 +02:00
Robin Chalas
c4cc4a338b [Messenger][Doctrine] Avoid early db access for pgsql detection 2020-10-18 02:19:48 +02:00
Robin Chalas
427cf6982e minor #38611 Bump igbinary to v3.1.6 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Bump igbinary to v3.1.6

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

Follows #38456

Commits
-------

1058e19ab4 Bump igbinary to v3.1.6
2020-10-17 19:01:48 +02:00
Nicolas Grekas
1058e19ab4 Bump igbinary to v3.1.6 2020-10-17 18:04:15 +02:00
Fabien Potencier
0721a0e3b0 minor #38610 Bump APCu to 5.1.19 on Travis (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Bump APCu to 5.1.19 on Travis

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

This PR reverts one of the hack we had to apply to the Travis configuration in order to get the CI to work with PHP 8. Since we did not have a compatible stable APCu release we pulled a snapshot from GitHub. APCu 5.1.19 should be compatible now, so let's use it.

I've bumped to that release for our PHP 7 build as well because why not. 😃

Commits
-------

5d9d62cf4c Bump APCu to 5.1.19 on Travis.
2020-10-17 17:41:05 +02:00
Alexander M. Turek
5d9d62cf4c Bump APCu to 5.1.19 on Travis. 2020-10-17 12:36:42 +02:00
Fabien Potencier
976160914a bug #38604 [DoctrineBridge] indexBy does not refer to attributes, but to column names (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] indexBy does not refer to attributes, but to column names

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

Commits
-------

af1a6208ec indexBy does not refer to attributes, but to column names
2020-10-17 07:43:29 +02:00
Fabien Potencier
fdf9a43433 bug #38605 [DoctrinBridge] make Uid types stricter (nicolas-grekas)
This PR was merged into the 5.x branch.

Discussion
----------

[DoctrinBridge] make Uid types stricter

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

Reviewing #38600 made me realize we don't need to deal with converting strings to db values.
We should only support converting actual `AbstractUid` instances in the DB.
Also, the binary types should *not* extend `GuidType`.

Commits
-------

ba31d0ee59 [DoctrinBridge] make Uid types stricter
2020-10-17 07:39:20 +02:00
Nicolas Grekas
ba31d0ee59 [DoctrinBridge] make Uid types stricter 2020-10-16 18:51:00 +02:00
Fabien Potencier
4b4abc305d bug #38606 [WebProfilerBundle] Hide debug toolbar in print view (jt2k)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Hide debug toolbar in print view

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

The debug toolbar is intended to be hidden when printed. This was accomplished in 2.8 with [this PR](https://github.com/symfony/symfony/pull/23460). Since then, additional JavaScript code was added which results in `display: block` being applied directly to the toolbar element. This overrides the print style, which causes the toolbar to show up in the print view. I fixed this by adding `!important` to the print CSS display rule.

A few notes:

1. I hesitated to solve this with `!important` but couldn't come up with another way to make this work with the existing JavaScript code. Also, `profiler.css.twig` already has some `!important` styles, so I figured this was acceptable.
2. I wasn't sure how to write a test for this, but I am open to ideas.

Commits
-------

fb305160ca [WebProfilerBundle] Hide debug toolbar in print view
2020-10-16 18:30:01 +02:00
Jason Tan
fb305160ca [WebProfilerBundle] Hide debug toolbar in print view 2020-10-16 10:46:58 -05:00
Christian Flothmann
af1a6208ec indexBy does not refer to attributes, but to column names 2020-10-16 16:16:55 +02:00
Grégoire Pineau
6088728c5e bug #38602 [Console] Fix signal management (chalasr)
This PR was merged into the 5.x branch.

Discussion
----------

[Console] Fix signal management

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

Missed in #38589

Commits
-------

36e41b85d8 [Console] Fix Application::getSignalRegistry() retval
2020-10-16 15:19:45 +02:00
Nicolas Grekas
5ca43b855f bug #38600 [DoctrineBridge] Convert values to Rfc4122 before inserting them into the database (Kai)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[DoctrineBridge] Convert values to Rfc4122 before inserting them into the database

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| 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 #38599
| License       | MIT

This PR formats the ULID into RFC4211 before inserting it into the database to avoid insertion failure on Postgres due to not recognized formating.

Commits
-------

fd3a6e8a0a [DoctrineBridge] Convert values to Rfc4122 before inserting them into the database
2020-10-16 15:08:56 +02:00
Kai
fd3a6e8a0a [DoctrineBridge] Convert values to Rfc4122 before inserting them into the database 2020-10-16 15:08:47 +02:00
Robin Chalas
36e41b85d8 [Console] Fix Application::getSignalRegistry() retval 2020-10-16 14:43:44 +02:00
Christian Flothmann
2ee24a0592 do not translate null placeholders or titles 2020-10-16 10:33:02 +02:00
Fabien Potencier
abbb3d0546 feature #38562 [RateLimiter] Added reserve() to LimiterInterface and rename Limiter to RateLimiter (wouterj)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[RateLimiter] Added reserve() to LimiterInterface and rename Limiter to RateLimiter

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

While Javier wrote documentation for this new component, we found a couple of confusing elements that might need some tweaks:

* The `Limiter` class (previously called `LimiterFactory`) has imho a bit strange name, as it's not a limiter and it doesn't implement `LimiterInterface`. It can only new limiters. I believe `LimiterFactory` - like `LockFactory` - would be the most clear, but as that was rejected before, here is another proposal using `RateLimiter`.
* `reserve()` was now only part of the token bucket implementation. That made it a bit less useful. I think I've found a way to also allow reserving future hits in the fixed window implementation, so I've moved it to the `LimiterInterface`.

Commits
-------

cd34f21254 [RateLimiter] Added reserve() to LimiterInterface and rename Limiter to RateLimiter
2020-10-16 07:10:35 +02:00
Wouter de Jong
cd34f21254 [RateLimiter] Added reserve() to LimiterInterface and rename Limiter to RateLimiter 2020-10-16 07:10:27 +02:00
Fabien Potencier
6e4d6eb2dd feature #38593 [Lock][Semaphore] Add Factory::createFromKey and deprecate lock.store services (jderusse)
This PR was merged into the 5.x branch.

Discussion
----------

[Lock][Semaphore] Add Factory::createFromKey and deprecate lock.store services

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

The `lock` service and aliases have been deprecated in #38576. This PR also deprecate the `lock.store` service and aliases.

People should always inject the factory into their services, except for one scenario: When they want building the `Lock` manually because they want to keep the key.

This scenario require declaring `lock.store` service and `PersisingStoreInterface` aliases.
This could be avoided if people had a method to create a lock from a given key.

This PR adds a `LockFactory::createFromKey()` method and deprecate all `lock.store` services

I also updated the Semaphore component for consistency, and helping people to only inject the SemahoreFactory.

nb: use cases for serializing the keys:
- Netflix allows only 5 users of the same family at the same time.
- An holiday apartment rental avoid users putting the same apartment in the basket
- ...

Commits
-------

91fa3e311d Deprecate lock.store aliases
2020-10-16 07:05:54 +02:00
Fabien Potencier
e34241ca2d minor #38592 [Doctrine] Reference the correct interface in the RegistryInterface deprecation … (Matts)
This PR was merged into the 4.4 branch.

Discussion
----------

[Doctrine] Reference the correct interface in the RegistryInterface deprecation …

…in upgrade notes

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38281
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Commits
-------

d019d38220 Reference the correct interface in the RegistryInterface deprecation in upgrade notes
2020-10-16 07:03:01 +02:00
Fabien Potencier
72be3057ca feature #38587 [HttpClient] added extra.trace_content option to TraceableHttpClient to prevent it from keeping the content in memory (nicolas-grekas)
This PR was merged into the 5.x branch.

Discussion
----------

[HttpClient] added `extra.trace_content` option to `TraceableHttpClient` to prevent it from keeping the content in memory

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

`TraceableHttpClient` leaks memory by definition. But sometimes, this leak is to important, especially when keeping the response content in memory.

This PR adds a new `trace_content` option under `extra` so that consumers can tell the client to not trace the content. This will be ignored when `TraceableHttpClient` is not in use.

Commits
-------

61290d5aa4 [HttpClient] added `extra.trace_content` option to `TraceableHttpClient` to prevent it from keeping the content in memory
2020-10-16 06:59:05 +02:00
Fabien Potencier
c61f65778d bug #38580 [FrameworkBundle] fix config declaration of http_cache option (nicolas-grekas)
This PR was merged into the 5.x branch.

Discussion
----------

[FrameworkBundle] fix config declaration of http_cache option

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

Addresses comments from @stof in https://github.com/symfony/symfony/pull/37351#pullrequestreview-438314002

Commits
-------

2514cf1c1d [FrameworkBundle] fix config declaration of http_cache option
2020-10-16 06:55:53 +02:00
Fabien Potencier
b203a7155b minor #38577 Add myself to CODEOWNERS for Form, OptionsResolver and TwigBundle (yceruto)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Add myself to CODEOWNERS for Form, OptionsResolver and TwigBundle

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

I would like to be notified of these packages as well.

Commits
-------

5e1ac09de9 Add myself to CODEOWNERS for Form, OptionsResolver and TwigBundle
2020-10-16 06:53:57 +02:00
Yonel Ceruto
5e1ac09de9 Add myself to CODEOWNERS for Form, OptionsResolver and TwigBundle 2020-10-16 06:53:57 +02:00
Fabien Potencier
dda1fe9c3a bug #38589 [Console] Don't register signal handlers if pcntl is disabled (chalasr)
This PR was merged into the 5.x branch.

Discussion
----------

[Console] Don't register signal handlers if pcntl is disabled

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

This PR skips the default signal registration when pcntl is not installed or disabled via the `disable_functions` INI directive (which is common for prod infrastructures).
When registering a `SignalableCommand`, a clear exception is thrown.

Best reviewed [without whitespaces](https://github.com/symfony/symfony/pull/38589/files?w=1)

Commits
-------

8fe876341e [Console] Don't register signal handlers if pcntl is disabled
2020-10-16 06:52:38 +02:00
Robin Chalas
8fe876341e [Console] Don't register signal handlers if pcntl is disabled 2020-10-16 01:46:35 +02:00
Jérémy Derussé
91fa3e311d
Deprecate lock.store aliases 2020-10-15 22:19:33 +02:00
Alexander M. Turek
ab7f4899e9 minor #38584 [FrameworkBundle] Missing Changelog for deprecating services (jderusse)
This PR was merged into the 5.x branch.

Discussion
----------

[FrameworkBundle] Missing Changelog for deprecating services

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

I forgot to add CHANGELOG/UPGRADE when deprecating alias `lock` in #38576. (thank you  @nicolas-grekas for reminding this)

This PR also adds a missing alias registered for argument.

Commits
-------

f9ddc5c147 Missing Changelog for deprecating services
2020-10-15 21:25:34 +02:00