Commit Graph

52076 Commits

Author SHA1 Message Date
Fabien Potencier
a3dac6a808 bug #38644 [FrameworkBundle] remove transport factory service when class does not exist (xabbuh)
This PR was merged into the 5.x branch.

Discussion
----------

[FrameworkBundle] remove transport factory service when class does not exist

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

Commits
-------

b3700bcfe6 remove transport factory service when class does not exist
2020-10-20 19:04:02 +02:00
Alexander M. Turek
b2821ec471 minor #38646 Refractor AbstractBrowserTest to assertSame (alexander-schranz)
This PR was merged into the 4.4 branch.

Discussion
----------

Refractor AbstractBrowserTest to assertSame

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

As mentioned by @nicolas-grekas at https://github.com/symfony/symfony/pull/38596#discussion_r508461764 the AbstractBrowserTest should be refractored to use `assertSame` instead of `assertEquals` to compare string.

Commits
-------

3f320c8d51 Refractor AbstractBrowserTest to assertSame
2020-10-20 17:41:28 +02:00
Christian Flothmann
fa265c2ee4 skip Vulcain-based tests if the binary cannot be executed 2020-10-20 15:38:40 +02:00
Alexander Schranz
3f320c8d51 Refractor AbstractBrowserTest to assertSame 2020-10-20 14:41:53 +02:00
Christian Flothmann
143f82ef8e forward the caught exception 2020-10-20 14:40:03 +02:00
Christian Flothmann
b3700bcfe6 remove transport factory service when class does not exist 2020-10-20 14:31:39 +02:00
Nicolas Grekas
c8c227f43f Merge branch '3.4' into 4.4
* 3.4:
  [Form] Sync translations
  Added dutch translations for new invalid messages
  Don't skip Doctrine tests on php 8.
  Bump APCu to 5.1.19 on Travis.
  [WebProfilerBundle] Hide debug toolbar in print view
  indexBy does not refer to attributes, but to column names
  Fix Reflection file name with eval()\'d code
  [HttpFoundation] Fix Range Requests
2020-10-20 13:58:22 +02:00
Fabien Potencier
6987862d97 Merge branch '5.1' into 5.x
* 5.1:
  Don't skip Doctrine tests on php 8.
  Stop using set-env in GitHub actions.
  Allow setting AMQP option "login"
  Bump igbinary to v3.1.6
  Add myself to CODEOWNERS for Form, OptionsResolver and TwigBundle
  Reference the correct interface in the RegistryInterface deprecation in upgrade notes
  Add myself to CODEOWNERS for Security and Console
  Add wouterj as codeowner for Security related packages
2020-10-20 08:22:43 +02:00
Fabien Potencier
5578239608 Merge branch '4.4' into 5.1
* 4.4:
  Don't skip Doctrine tests on php 8.
  Stop using set-env in GitHub actions.
  Bump igbinary to v3.1.6
  Add myself to CODEOWNERS for Form, OptionsResolver and TwigBundle
  Reference the correct interface in the RegistryInterface deprecation in upgrade notes
  Add myself to CODEOWNERS for Security and Console
  Add wouterj as codeowner for Security related packages
2020-10-20 08:22:32 +02:00
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