Commit Graph

52076 Commits

Author SHA1 Message Date
Fabien Potencier
81d29f3fd0 minor #38687 [Validator] adds missing dutch translations to validator component (zghosts)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] adds missing dutch translations to validator component

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT
[Validator] This PR adds some missing dutch translations to the validator component

Commits
-------

02a8ca39f4 add missing dutch translations
2020-10-23 06:12:28 +02:00
Jos Elstgeest
02a8ca39f4 add missing dutch translations 2020-10-22 22:50:11 +02:00
Nicolas Grekas
713c2623e5 [TwigBridge] Remove "transchoice" from the code base 2020-10-22 20:37:20 +02:00
Nyholm
76c22fab02
bug #38661 [RateLimiter] Fix delete method of the cache storage (GregOriol, Nyholm)
This PR was merged into the 5.x branch.

Discussion
----------

[RateLimiter] Fix delete method of the cache storage

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

This PR fixes a small issue with RateLimiter's cache storage and the delete method: all getItems are called with a sha1 of the id, but not the one for delete, which makes it miss the deletion.

Commits
-------

b61d9d1ea3 minor
88c1e2439e Added a test
fb540bba73 Fix delete method on RateLimiter's cache storage
2020-10-22 19:09:06 +02:00
Nyholm
310926fa88
bug #38678 [String] fix before/after[Last]() returning the empty string instead of the original one on non-match (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[String] fix before/after[Last]() returning the empty string instead of the original one on non-match

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

The current behavior is the least useful one. Returning the original string when no match is found is the most sensible behavior. It saves code instead of requiring more.

Typical example is when removing a potential suffix:
`$bar = $foo->beforeLast(['.svg', '.png']);` should remove any of these extensions if found, and return the original string otherwise.

Commits
-------

22a2740888 [String] fix before/after[Last]() returning the empty string instead of the original one on non-match
2020-10-22 19:01:40 +02:00
Nyholm
6f0a8971fd
bug #38682 [HttpClient] never trace content of event-stream responses (nicolas-grekas)
This PR was merged into the 5.x branch.

Discussion
----------

[HttpClient] never trace content of event-stream responses

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

Let's leverage #38587 in `EventSourceHttpClient`

Commits
-------

e4c0262dc1 [HttpClient] never trace content of event-stream responses
2020-10-22 18:54:44 +02:00
Fabien Potencier
5c98c75170 minor #38673 [Validator] Add missing romanian translations (marmichalski)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing romanian translations

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

This PR adds missing romanian validator translations.

Commits
-------

ced43e1ec2 [Validator] Add missing romanian translations
2020-10-22 15:52:29 +02:00
Alexander M. Turek
e5faa29c5e bug #38679 [PhpUnitBridge] Add missing exporter function for PHPUnit 7 (alcaeus)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Add missing exporter function for PHPUnit 7

| 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 -->
| License       | MIT

This adds a missing `exporter` function to the compatibility trait for PHPUnit constraints. This method is still required for PhpUnit 7.

Commits
-------

52e7d78dca Add missing exporter function for PHPUnit 7
2020-10-22 15:51:15 +02:00
Nicolas Grekas
e4c0262dc1 [HttpClient] never trace content of event-stream responses 2020-10-22 15:42:02 +02:00
Andreas Braun
f79ad80009
Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait 2020-10-22 14:29:45 +02:00
Andreas Braun
8a49a263a2
Add expectDeprecation, expectNotice, expectWarning, and expectError to TestCase polyfill 2020-10-22 14:28:16 +02:00
Nicolas Grekas
e2f0454f13 [PhpUnitBridge] remove wrong changelog entry 2020-10-22 14:27:47 +02:00
Nicolas Grekas
22a2740888 [String] fix before/after[Last]() returning the empty string instead of the original one on non-match 2020-10-22 14:08:44 +02:00
Andreas Braun
52e7d78dca
Add missing exporter function for PHPUnit 7 2020-10-22 14:02:19 +02:00
Nyholm
b61d9d1ea3
minor 2020-10-22 12:14:59 +02:00
Nyholm
88c1e2439e
Added a test 2020-10-22 12:12:23 +02:00
Wouter de Jong
e1825e0bcc bug #38674 [RateLimiter] Make sure we actually can use sliding_window and no_limit (Nyholm)
This PR was merged into the 5.x branch.

Discussion
----------

[RateLimiter] Make sure we actually can use sliding_window and no_limit

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

I found that we never tested the config on the actually RateLimiter class. This PR adds a tests and bugfix

Commits
-------

067153f452 Make sure we actually can use sliding_window and no_limit
2020-10-22 12:10:29 +02:00
Nyholm
067153f452
Make sure we actually can use sliding_window and no_limit 2020-10-22 11:54:30 +02:00
Greg ORIOL
fb540bba73
Fix delete method on RateLimiter's cache storage 2020-10-22 11:48:25 +02:00
Robin Chalas
753932527e bug #38670 [RateLimiter] Be more type safe when fetching from cache (Nyholm)
This PR was merged into the 5.x branch.

Discussion
----------

[RateLimiter] Be more type safe when fetching from cache

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

This is a super minor thing. A `$cacheItem` can be a hit, but it does not contain a `LimiterStateInterface`.

Also, PSR-6 specifies that if the `$cacheItem` is not a hit, it must return null.

Commits
-------

4795756cc7 [RateLimiter] Be more type safe when fetching form cache
2020-10-22 10:40:20 +02:00
Robin Chalas
58f4e9dfc8 bug #38665 [RateLimiter] Allow configuration value "no_limit" (Nyholm)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[RateLimiter] Allow configuration value "no_limit"

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

I dont see any reason why we should allow people to configure "no_limit". I assume this was just forgotten.

Commits
-------

2b9058d6b6 [RateLimiter] Allow configuration value "no_limit"
2020-10-22 10:35:38 +02:00
Nyholm
2b9058d6b6 [RateLimiter] Allow configuration value "no_limit" 2020-10-22 10:35:15 +02:00
Robin Chalas
6bb46dedca minor #38668 [RateLimiter] Remove Window::sleep() (Nyholm)
This PR was merged into the 5.x branch.

Discussion
----------

[RateLimiter] Remove Window::sleep()

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

This function is not needed since #38562

Commits
-------

ccbf7d5a06 [RateLimiter] Remove Window::sleep()
2020-10-22 10:31:04 +02:00
Robin Chalas
898ca2b0af minor #38667 [RateLimiter] Adding annotations (Nyholm)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[RateLimiter] Adding annotations

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

Following the example of the `SlidingWindow`'s PR reviews, I would like to add annotations for all properties. This makes it simpler to read the code and understand what is what.

Commits
-------

5dfafd334e [RateLimiter] Adding annotations
2020-10-22 10:28:03 +02:00
Nyholm
5dfafd334e [RateLimiter] Adding annotations 2020-10-22 10:25:47 +02:00
Marcin Michalski
ced43e1ec2 [Validator] Add missing romanian translations 2020-10-22 08:30:04 +02:00
Nyholm
4795756cc7
[RateLimiter] Be more type safe when fetching form cache 2020-10-21 23:51:48 +02:00
Nyholm
ccbf7d5a06
[RateLimiter] Remove Window::sleep() 2020-10-21 23:43:19 +02:00
Alexander M. Turek
29684ac38c bug #38659 [String] fix slicing in UnicodeString (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[String] fix slicing in UnicodeString

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

Spotted while reviewing https://github.com/symfony/polyfill/pull/297

Commits
-------

d31ac74c03 [String] fix slicing in UnicodeString
2020-10-21 16:55:37 +02:00
Nicolas Grekas
d31ac74c03 [String] fix slicing in UnicodeString 2020-10-21 15:57:40 +02:00
Fabien Potencier
508ec9c33a bug #38633 [HttpClient] Fix decorating progress info in AsyncResponse (jderusse)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[HttpClient] Fix decorating progress info in AsyncResponse

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

This PR reverts #38413, and send AsyncContext to onProgress callback.

Commits
-------

e325f51fe2 [HttpClient] Fix decorating progress info in AsyncResponse
2020-10-21 15:24:34 +02:00
Jérémy Derussé
e325f51fe2 [HttpClient] Fix decorating progress info in AsyncResponse 2020-10-21 15:24:25 +02:00
Fabien Potencier
b8012094d5 feature #38543 [HttpKernel] add kernel.runtime_environment = %env(default:kernel.environment:APP_RUNTIME_ENV)% parameter (nicolas-grekas)
This PR was merged into the 5.x branch.

Discussion
----------

[HttpKernel] add `kernel.runtime_environment` = `%env(default:kernel.environment:APP_RUNTIME_ENV)%` parameter

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

Instead of #37584

This PR adds a new `kernel.runtime_environment` parameter, which creates a convention to use the `APP_RUNTIME_ENV` env var to define the name of the runtime environment where the app is deployed.

When this env var is not set, the parameter defaults to `kernel.environment`.

This is especially useful for defining the location of the vault for secrets: an app can be deployed in "prod" mode, but still not be deployed on the real prod deployment target. When this happens, one might not use real prod secrets but instead, use a vault with creds for staging.

This parameter enables this use case.

Commits
-------

6eb9d62bdd [HttpKernel] add `kernel.runtime_environment` = `%env(default:kernel.environment:APP_RUNTIME_ENV)%` parameter
2020-10-21 15:20:19 +02:00
Nicolas Grekas
6eb9d62bdd [HttpKernel] add kernel.runtime_environment = %env(default:kernel.environment:APP_RUNTIME_ENV)% parameter 2020-10-21 15:15:15 +02:00
Fabien Potencier
1eead3f2af bug #38595 [TwigBridge] do not translate null placeholders or titles (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] do not translate null placeholders or titles

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

Commits
-------

2ee24a0592 do not translate null placeholders or titles
2020-10-21 11:42:21 +02:00
Fabien Potencier
35dad22f9e feature #38653 [DoctrineBridge] Enabled to use the UniqueEntity constraint as an attribute (derrabus)
This PR was merged into the 5.x branch.

Discussion
----------

[DoctrineBridge] Enabled to use the UniqueEntity constraint as an attribute

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | #38096
| License       | MIT
| Doc PR        | TODO with symfony/symfony-docs#14305

Now that we have a compatible Doctrine version, I could patch and test the missing `UniqueEntity` constraint.

Commits
-------

5e7d3ab17b Enabled to use the UniqueEntity constraint as an attribute.
2020-10-21 11:38:59 +02:00
Nicolas Grekas
5a4be6841d bug #38635 [Cache] Use correct expiry in ChainAdapter (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Cache] Use correct expiry in ChainAdapter

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

When we are syncing the chain, Let's use expiry if we have it. If not, fallback to defaultLifetime.

TODO:
- [x] Add tests

Commits
-------

17e0167798 [Cache] Use correct expiry in ChainAdapter
2020-10-21 11:34:34 +02:00
Nyholm
17e0167798 [Cache] Use correct expiry in ChainAdapter 2020-10-21 11:34:26 +02:00
Alexander M. Turek
5e7d3ab17b Enabled to use the UniqueEntity constraint as an attribute. 2020-10-21 10:44:28 +02:00
Fabien Potencier
7b62f099c2 Merge branch '5.1' into 5.x
* 5.1:
  [Filesystem] Check if failed unlink was caused by permission denied
  fix APCu installation for the nightly build job
  skip Vulcain-based tests if the binary cannot be executed
2020-10-21 06:47:22 +02:00
Fabien Potencier
baf8c2355f Merge branch '4.4' into 5.1
* 4.4:
  [Filesystem] Check if failed unlink was caused by permission denied
  fix APCu installation for the nightly build job
  skip Vulcain-based tests if the binary cannot be executed
2020-10-21 06:47:05 +02:00
Fabien Potencier
19637c5de3 Merge branch '3.4' into 4.4
* 3.4:
  [Filesystem] Check if failed unlink was caused by permission denied
2020-10-21 06:38:54 +02:00
Fabien Potencier
3ff93848cd bug #38652 [Filesystem] Check if failed unlink was caused by permission denied (Nyholm)
This PR was submitted for the 4.4 branch but it was squashed and merged into the 3.4 branch instead.

Discussion
----------

[Filesystem] Check if failed unlink was caused by permission denied

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

Check why we failed to unlink the file. If the file was missing, then no exception should be thrown. However, if we failed to unlink it because of permissions, we should throw an exception.

Commits
-------

1cde6ca03f [Filesystem] Check if failed unlink was caused by permission denied
2020-10-21 06:37:34 +02:00
Nyholm
1cde6ca03f [Filesystem] Check if failed unlink was caused by permission denied 2020-10-21 06:37:26 +02:00
Fabien Potencier
45e53fb5c5 minor #38648 fix APCu installation for the nightly build job (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

fix APCu installation for the nightly build job

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

Commits
-------

53434c2bec fix APCu installation for the nightly build job
2020-10-21 06:33:56 +02:00
Christian Flothmann
53434c2bec fix APCu installation for the nightly build job 2020-10-21 06:33:43 +02:00
Nyholm
e731e37109
minor #38649 [HttpClient] skip Vulcain-based tests if the binary cannot be executed (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] skip Vulcain-based tests if the binary cannot be executed

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

Commits
-------

fa265c2ee4 skip Vulcain-based tests if the binary cannot be executed
2020-10-21 00:16:26 +02:00
Alexander M. Turek
e6417384d2 Merge branch '5.1' into 5.x 2020-10-20 22:28:53 +02:00
Alexander M. Turek
1c6380f333 Merge branch '4.4' into 5.1 2020-10-20 22:28:16 +02:00
Fabien Potencier
aafad690de bug #38645 [PropertyAccess] forward the caught exception (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyAccess] forward the caught exception

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

Commits
-------

143f82ef8e forward the caught exception
2020-10-20 19:18:02 +02:00