This PR was merged into the 3.4 branch.
Discussion
----------
Update French Translations for Validator Component
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#38741
| 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.
-->
Commits
-------
dd2d320e37 Update French Translations for Validator Component
This PR was merged into the 3.4 branch.
Discussion
----------
Missing swedish translations for Form, Security and Validator components
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38765
| License | MIT
| Doc PR |
Added missing swedish translations for Form, Security and Validator components
Commits
-------
1044b1e852Fix#38765 Added missing swedish translations for Form, Security and Validator components
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
Added missing translations for Russian
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38759
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Hello!
I added missing translations for Russian.
Commits
-------
6a9e274a10 Added missing translations for Russian
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[Form] Add missing Latvian translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #34710, #34749
| License | MIT
| Doc PR | N/A
Commits
-------
871c983164 [Form] Add missing Latvian translations
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Add missing Latvian translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #34710, #34749
| License | MIT
| Doc PR | N/A
Commits
-------
7f2b13bcb3 [Security] Add missing Latvian translations
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
Add missing vietnamese 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 | Fix#38770 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | - <!-- 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.
-->
Commits
-------
6289b271aa Add missing vietnamese translations
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[Form] Missing Bulgarian translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38730
| License | MIT
| Doc PR | N/A
Commits
-------
8c5d26fcb2 [Form] Missing Bulgarian translations
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Missing Bulgarian translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38730
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
a9d6549ce9 [Validator] Missing Bulgarian translations #38730
This PR was merged into the 3.4 branch.
Discussion
----------
Closes#38747: Add italian translations.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38747
| License | MIT
| Doc PR | N/A
Commits
-------
7d25a46b3bCloses#38747: Add italian translations.
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
Update Arabic Form Translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| 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 -->
This is related to https://github.com/symfony/symfony/issues/38723
Commits
-------
b36068ff8a Update Arabic Form Translations
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
Update Security Arabic Translations
| Q | A
| ------------- | ---
| Branch? | 5.x for features / 3.4, 4.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 | 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 -->
Related to https://github.com/symfony/symfony/issues/38723
Commits
-------
e6219e4796 Update Security Arabic Translations
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Added missing German translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Part of #38710
| License | MIT
| Doc PR | N/A
Commits
-------
54140d45fb [Security] Added missing German translations.
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Synchronized translations with 5.x
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #38710
| License | MIT
| Doc PR | N/A
Commits
-------
3d7863f5b5 [Security] Synchronized translations with 5.x.
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Form] Added missing German translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #38710
| License | MIT
| Doc PR | N/A
Commits
-------
37a2ff4563 [Form] Added missing German translations.
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[RateLimiter] Moved classes implementing LimiterInterface to a new namespace
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no?
| Tickets |
| License | MIT
| Doc PR |
Before we release the RateLimit component.
I think it would be a good idea to put the 7 classes that belongs to a specific strategy in their own "Policy" namespace. It is very likely that it will be more strategies in the future and the `Symfony\Component\RateLimiter` namespace is crowed as it is.
I decided not to put the `CompoundLimiter` in this namespace as it is not a strategy.
Commits
-------
1e6cea56e4 [RateLimiter] Moved classes implementing LimiterInterface to a new namespace
* 5.1:
fix merge
fix merge
Remove branch-version (keep them for contracts only)
[HttpClient] relax auth bearer format requirements
[PHPUnitBridge] Silence errors from mkdir()
[DependencyInjection] Preload classes with union types correctly.
[Serializer] fix decoding float XML attributes starting with 0
add missing dutch translations
[TwigBridge] Remove "transchoice" from the code base
Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait
Add expectDeprecation, expectNotice, expectWarning, and expectError to TestCase polyfill
[String] fix before/after[Last]() returning the empty string instead of the original one on non-match
Add missing exporter function for PHPUnit 7
[Validator] Add missing romanian translations
[String] fix slicing in UnicodeString
[Cache] Use correct expiry in ChainAdapter
do not translate null placeholders or titles
* 4.4:
fix merge
Remove branch-version (keep them for contracts only)
[HttpClient] relax auth bearer format requirements
[PHPUnitBridge] Silence errors from mkdir()
[DependencyInjection] Preload classes with union types correctly.
[Serializer] fix decoding float XML attributes starting with 0
add missing dutch translations
Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait
Add expectDeprecation, expectNotice, expectWarning, and expectError to TestCase polyfill
Add missing exporter function for PHPUnit 7
[Validator] Add missing romanian translations
[Cache] Use correct expiry in ChainAdapter
do not translate null placeholders or titles
* 3.4:
Remove branch-version (keep them for contracts only)
[Serializer] fix decoding float XML attributes starting with 0
add missing dutch translations
[Validator] Add missing romanian translations
do not translate null placeholders or titles
This PR was merged into the 5.x branch.
Discussion
----------
[HttpClient] Adding missing dependency for dev
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
This will make sure Travis is happy again.
Commits
-------
552e704d6c [HttpClient] Adding missing dependency for dev
This PR was squashed before being merged into the 5.x branch.
Discussion
----------
[RateLimiter] Rename RateLimiter to RateLimiterFactory
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | No, not released yet
| Tickets |
| License | MIT
| Doc PR | should be added
Sorry for making a few BC breaks.
@wouterj [said](https://github.com/symfony/symfony/pull/38562#issue-503193238) that this class was suggested to be named `LimiterFactory` before. But that was rejected.
Just my looking at the names of the classes we currently have:
- Rate
- RateLimit
- RateLimiter
I find it hard to know what these are doing and the difference between them. Note that none of them are used as a rate limiter (ie implements `LimiterInterface`)
I would like to be clear that a `RateLimiterFactory` is used to create an object implementing `LimiterInterface`.
Commits
-------
8be261b300 [RateLimiter] Rename RateLimiter to RateLimiterFactory
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[Serializer] fix decoding float XML attributes starting with 0
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38666
| License | MIT
| Doc PR | n/a
This is a naive approach to fix#38666, assuming it is something worth fixing.
I checked different cases and it seems to be fixing all of them, but I bet there will be some other edge cases which still won't be covered properly.
Commits
-------
97b4306c30 [Serializer] fix decoding float XML attributes starting with 0
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Support new expect methods in test case polyfill
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| License | MIT
This PR adds the `expectError`, `expectWarning`, `expectNotice`, ~and `expectDeprecation`~ methods to the test case polyfill.
~Note that I saw a `expectDeprecation` message in `ExpectDeprecationTrait`, but I couldn't quite figure out what it's supposed to do. Please let me know if the `expectDeprecation` method needs to be removed from the test polyfill.~
Commits
-------
8a49a263a2 Add expectDeprecation, expectNotice, expectWarning, and expectError to TestCase polyfill
This PR was merged into the 4.4 branch.
Discussion
----------
[PHPUnitBridge] Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | not really
| New feature? | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License | MIT
This expands the compatibility layer for PHPUnit constraints by supporting PHPUnit 8 and PHPUnit 9. Support for the latter requires also adding the `evaluate` method to the trait, as this method gets a signature change in PHPUnit 9.
Commits
-------
f79ad80009 Support PHPUnit 8 and PHPUnit 9 in constraint compatibility trait
This PR was merged into the 5.1 branch.
Discussion
----------
[TwigBridge] Remove "transchoice" from the code base
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
713c2623e5 [TwigBridge] Remove "transchoice" from the code base
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
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
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
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"
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()
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
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
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
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
* 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
* 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
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
* 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
* 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
* 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
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
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()
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
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
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
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
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
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
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
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
This PR was merged into the 5.x branch.
Discussion
----------
[Semaphore] Reset Key lifetime time before we acquire it
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | /
| License | MIT
| Doc PR | /
This is the same issue fixed by #38553 but for Semaphore component.
Commits
-------
e7ffd5d2e7 Reset Key lifetime time in semaphore
This PR was squashed before being merged into the 5.x branch.
Discussion
----------
[RateLimiter] Adding SlidingWindow algorithm
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? |
| Tickets |
| License | MIT
| Doc PR | Should be added
This is a draft PR to make sure we like the idea. I'll keep working on adding tests.
Commits
-------
c6d3b70315 [RateLimiter] Adding SlidingWindow algorithm
This PR was merged into the 5.x branch.
Discussion
----------
Deeprecate lock service
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | #38458
| License | MIT
| Doc PR | TODO
This PR deprecate the `lock`, `LockInterface` service ass discussed in #38458
Commits
-------
40ea90ef6b Deeprecate lock service
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Fix Range Requests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #38295
| License | MIT
| Doc PR |
This PR fixes some deviations from [RFC 7233](https://tools.ietf.org/html/rfc7233) for handling range requests, mentioned in #38295.
- overlapping ranges are now satisfiable (e.g. when requested range end is larger than the file size)
- range units other than `bytes` will get ignored
- range requests for methods other than `GET` will be ignored
I did not manage yet to implement the support for multiple ranges, but also don't know, if that's needed here.
Commits
-------
681804ba1a [HttpFoundation] Fix Range Requests
* 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
* 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()
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
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
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
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
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
This PR was merged into the 3.4 branch.
Discussion
----------
Remove "version" from composer.json files, use "branch-version" instead
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Waiting for confirmation from @Seldaek or @naderman
Commits
-------
f9ed6940fd Remove "version" from composer.json files, use "branch-version" instead
* 5.1:
[DI] fix dumping env vars
[HttpClient] skip executing the multi handle when it's freed already
[HttpClient] fix using freed curl resource at destruct time
[HttpClient] shutdown verbose output from curl at destruction
fix warning for preloading TranslatorTrait class
[Typography] Remove unneeded description comments
* 4.4:
[DI] fix dumping env vars
[HttpClient] skip executing the multi handle when it's freed already
[HttpClient] fix using freed curl resource at destruct time
[HttpClient] shutdown verbose output from curl at destruction
fix warning for preloading TranslatorTrait class
[Typography] Remove unneeded description comments
This PR was merged into the 5.x branch.
Discussion
----------
[HttpClient] simplify retry mechanism around RetryStrategyInterface
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Replaces #38466
I feel like the mechanism behind RetryableHttpClient is too bloated for no pragmatic reasons.
I propose to merge RetryDeciderInterface and RetryBackoffInterface into one single RetryStrategyInterface.
Having two separate interfaces supports no real-world use case. The only implementations we provide are trivial, and they can be reused by extending the provided GenericRetryStrategy implementation if one really doesn't want to duplicate that.
The methods are also simplified by accepting an AsyncContext as argument. This makes the signatures shorter and allows accessing the "info" of the request (allowing to decide based on the IP of the host, etc).
/cc @jderusse
Commits
-------
544c3e8678 [HttpClient] simplify retry mechanism around RetryStrategyInterface
This PR was merged into the 5.x branch.
Discussion
----------
[Security] Making login link signature_properties option required
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes (for a 5.2 feature)
| New feature? | no
| Deprecations? | no
| Tickets | none
| License | MIT
| Doc PR | not needed
Hi!
My intention was always to force the user to set this option. Before this PR, you can simply leave this option off completely without a validation error. Thanks to Wouter for finding it.
Also: made some punctuation & capitalization consistent on info messages.
Cheers!
Commits
-------
f7bb954979 Making login link signature_properties option required
This PR was merged into the 5.x branch.
Discussion
----------
[Serializer] Enabled mapping configuration via attributes
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | TODO
Let's use attributes for the serializer mapping configuration!
```php
class MyEntity
{
#[Groups(['list', 'detail])]
#[SerializedName('some-property')]
public $someProperty;
#[Ignore]
public string $secret;
}
```
Commits
-------
cfb9986203 [Serializer] Enabled mapping configuration via attributes.
This PR was merged into the 5.x branch.
Discussion
----------
[Form] fix ViolationMapper was always generating a localized label for each FormType
| Q | A
| ------------- | ---
| Branch? | 5.x (fix new behavior from 5.2)
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | /
| License | MIT
| Doc PR | /
Follow-up of #38435, with branch changed
**Explanation of the issue**
In Symfony 5.2, the `{{ label }}` placeholder can be used in constraint messages (-> introduced in commit 0d9f44235c)
However, the way it was coded is introducing a small side effect: now, every time there is validation error, `ViolationMapper` will ask the Form Type its `label`, and if not `false`, it will try to translate it.
**Why it is important/why it causes a BC break**
Since by default `AbstractType` does not have any `label`, it also introduces a minor BC break.
I will explain it with an example: in a project I work on, we check we don't have any missing translation. Sometimes we have violation errors bound to form ; then current code will get Form `label`, which in `null` in form type classes (which is quite usual I believe), so it will generate one, and pass that one to translator. And we see a lot on erroneous missing translations.
**Proposed fix**
This fix moves all this logic into a `if`, so `ViolationMapper` call the translator component only if `{{ label }}` placeholder is used in constraint error message.
On top of fixing BC, it has the benefit of lowering the performance cost for every violation when the feature is not used.
I added a test, as I believe the behavior should be guaranteed from now on.
Commits
-------
aee5571a71 [Form] fix ViolationMapper was always generating a localized label for each FormType
This PR was merged into the 5.x branch.
Discussion
----------
[Mailer] Fix mailjet image embedding
Filename is not enough to embed the image through cid, ContentID field
has to be set with the cid identifier used in the HTMLPart
| Q | A
| ------------- | ---
| Branch? | 5.1 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | none <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | not needed <!-- 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.
-->
Hello!
While switching from `Mandrill` to `Mailjet` I noticed that embedding images was not working properly, the `Content-ID` mime is not set properly without setting the `ContentID` key. With this change things will work as described in the [symfony documentation](https://symfony.com/doc/current/mailer.html#embedding-images)
[Mailjet reference](https://dev.mailjet.com/email/guides/send-api-v31/#send-with-attached-files)
Commits
-------
7ab772eeea [Mailer] Fix mailjet image embedding
* 5.1:
Disable the PhpUnit bridge when testing it
[PropertyInfo] Support for the mixed type.
Don't unset the inflate resource on close as it might still be needed
[HttpClient] Fix CurlHttpClient memory leak
[Form] Add Bosnian (bs) validators translation
[Form] Add missing Serbian (latn & cyrl) validators translation
[Cache] skip igbinary < 3.1.6
[Ldap] Bypass the use of `ldap_control_paged_result` on PHP >= 7.3
[Form] [Validator] added pt_BR translations
Estonian update
Fix no collection in extract default value
[PhpUnitBridge] fix running parallel tests with phpunit 9
[VarDumper] fix truncating big arrays
* 4.4:
Disable the PhpUnit bridge when testing it
[PropertyInfo] Support for the mixed type.
Don't unset the inflate resource on close as it might still be needed
[HttpClient] Fix CurlHttpClient memory leak
[Form] Add Bosnian (bs) validators translation
[Form] Add missing Serbian (latn & cyrl) validators translation
[Cache] skip igbinary < 3.1.6
[Ldap] Bypass the use of `ldap_control_paged_result` on PHP >= 7.3
[Form] [Validator] added pt_BR translations
Estonian update
[PhpUnitBridge] fix running parallel tests with phpunit 9
[VarDumper] fix truncating big arrays
* 3.4:
Disable the PhpUnit bridge when testing it
[PropertyInfo] Support for the mixed type.
[Form] Add Bosnian (bs) validators translation
[Form] Add missing Serbian (latn & cyrl) validators translation
[Form] [Validator] added pt_BR translations
Estonian update
[PhpUnitBridge] fix running parallel tests with phpunit 9
[VarDumper] fix truncating big arrays
This PR was squashed before being merged into the 5.x branch.
Discussion
----------
[Validator] Upgraded constraints to enable named arguments and attributes
| 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
This PR enables all remaining atomic (!= composite) constraints to be used as attributes.
The only exception is `UniqueEntity` from Doctrine bridge because we don't have a Doctrine ORM release yet that supports PHP 8. So I could migrate that one as well, but I cannot really test it.
Commits
-------
fb99eb2052 [Validator] Upgraded constraints to enable named arguments and attributes
This PR was merged into the 5.x branch.
Discussion
----------
[Security][Login Link] Allow null and DateTime objects to be used as signatureProperties
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Returning `DateTime` objects seems like a common use-case to automatically expire all login links when one is used or to only allow the login link to be used once.
**Before**
```php
class User
{
private ?\DateTime $lastAuthenticatedAt = null;
// ...
public function getLastAuthenticatedAtString(): string
{
return null === $this->lastAuthenticatedAt ? '' : $this->lastAuthenticatedAt->format('c');
}
}
```
```yaml
security:
firewalls:
main:
login_link:
# ...
signature_properties: ['lastAuthenticatedAtString']
````
**After**
```php
class User
{
private ?\DateTime $lastAuthenticatedAt = null;
// ...
public function getLastAuthenticatedAt(): ?\DateTime
{
return $this->lastAuthenticatedAt;
}
}
```
```yaml
security:
firewalls:
main:
login_link:
# ...
signature_properties: ['lastAuthenticatedAt']
````
---
The disadvantage of this patch is that there needs to be some boundary as to which objects we want to support casting to a scalar, but I'm convinced that `DateTime` objects will commonly be used as signature properties.
cc @weaverryan
Commits
-------
0f947b2e84 Allow null and DateTime objects to be used as signatureProperties
This PR was merged into the 5.x branch.
Discussion
----------
[Security] Add error message when using LoginLinkHandler outside a firewall
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Add a more friendly error message when autowiring `LoginLinkHanderInterface` in a route outside the firewall. Current error was `Call to a member function getName() on null`.
Commits
-------
f807b5fc15 Add error message when using LoginLinkHandler outside a firewall
Small mistake in the rate limiter configuration, instead of unsetting the `storage_service` option the never existing `storage` option was unset, resulting into an application error when trying to use a Limiter in your application.
Uncaught PHP Exception: The option "storage_service" does not exist. Defined options are: "id", "interval", "limit", "rate", "strategy"."
Returning DateTime objects seems like a common use-case to automatically expire
all login links when one is used or to only allow the login link to be used
once.
This PR was merged into the 5.x branch.
Discussion
----------
[Notifier] Introduce NullMessage and remove transport setter in MessageInterface
| 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 | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | - <!-- required for new features -->
Follow-up PR of https://github.com/symfony/symfony/pull/36479
Commits
-------
5701e89960 Introduce NullMessage and remove transport setter in MessageInterface
This PR was merged into the 5.x branch.
Discussion
----------
[lock] Mark Key unserializable whith PgsqlStore
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | /
| License | MIT
| Doc PR | /
Marks key unserializable #38395 with the new PgsqlStore #38346
Commits
-------
eb934e9015 Mark Key unserializable whith PgsqlStore
This PR was merged into the 5.x branch.
Discussion
----------
[SecurityBundle] Make user lazy loading working without user provider
| 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#38429 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
Make user lazy loading in security working again without user provider.
Commits
-------
df9e8486f5 Make user lazy loading working without user provider
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Ldap] Bypass the use of `ldap_control_paged_result` on PHP >= 7.3
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38352
| License | MIT
| Doc PR |
As stated on #38352 [ldap_control_paged_result](https://www.php.net/manual/en/function.ldap-control-paged-result.php) and [ldap_control_paged_result_response](https://www.php.net/manual/en/function.ldap-control-paged-result-response.php) have been deprecated since PHP 7.4 and will be removed on PHP 8.0.
With this fix, Query uses serverctrls to handle LDAP results pagination.
Since `serverctrls` where introduced in PHP 7.3 and they are the only way to circumvent the usage of `ldap_control_paged_result`, I've added a new Query class implementation which uses `serverctrls` to control pagination.
To do so I've also had to update the LDAP Adapter in order to use the new class if PHP version 7.3 or greater are found
Commits
-------
d332b30526 [Ldap] Bypass the use of `ldap_control_paged_result` on PHP >= 7.3
This PR was merged into the 5.x branch.
Discussion
----------
[HttpClient] Add jitter to RetryBackoff
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | /
| License | MIT
| Doc PR | TODO
From the idea https://twitter.com/mtdowling/status/1313205613158043648 this PR adds a new `jitter` parameter to the ExponentialBackOff implementation.
jitter is a percentage (float between 0 and 1) of randomness to apply to the computed delay.
ie. if the initial delay is 1000ms, and jitter=0.2, the finale delay will be an number between 800 and 1200 (1000 +/- 20%)
Commits
-------
ace731437e Add jitter to RetryBackof
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
[Form] [Validator] added pt_BR translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | --
| License | MIT
| Doc PR | --
Added missing pt_BR translations to Form and Validator components.
Commits
-------
4bede2824c [Form] [Validator] added pt_BR translations
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Mime] Fix serialization of RawMessage
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| 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#38430, Related #33394 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | - <!-- required for new features -->
The serialization of RawMessage is currently broken if using a generator for message like done by `Symfony\Component\Mailer\SentMessage` see 5f1c3a7972/src/Symfony/Component/Mailer/SentMessage.php (L45)
This patch converts the message to a string so further serialization can be done.
This patch probably also solves #33394.
<!--
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
-------
fd99eb26d8 [Mime] Fix serialization of RawMessage
This PR was merged into the 5.2-dev branch.
Discussion
----------
[DoctrineBridge] fix and replace namespace to Uid
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | https://github.com/symfony/symfony/pull/37678#discussion_r499709057 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | ... <!-- required for new features -->
This post should also be corrected: https://symfony.com/blog/new-in-symfony-5-2-doctrine-types-for-uuid-and-ulid cc @javiereguiluz
Commits
-------
28d1169714 [DoctrineBridge] fix and replace namespace to Uid
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Validator] Migrate File and Image constraints to attributes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | #38096
| License | MIT
| Doc PR | TODO with symfony/symfony-docs#14305
I have migrated a lot of the constraints already and am preparing a big PR with them at the moment. I decided to pull this part out because it might raise some discussion.
This PR enables the `File` and `Image` constraints to be used as attributes. Especially the constructor signature of the `Image` constraint has grown pretty large this way. This by itself should be a big problem, if we don't expect the constructor to be called with ordered parameters by userland code. But it shows that the constraints have grown a bit too large. We might want to consider to split it.
Commits
-------
d8c186938e [Validator] Migrate File and Image constraints to attributes.
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpClient] minor fixes in RetryableHttpClient
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
495562836a [HttpClient] minor fixes in RetryableHttpClient
This PR was merged into the 3.4 branch.
Discussion
----------
Fix type annotation in ExpressionLanguage\Token
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
The expected argument `$type` should be a string - the strict comparison would always fail with the current annotated types (`array|int`).
See the constructor + constants for reference:
7db7dcc431/src/Symfony/Component/ExpressionLanguage/Token.php (L33)7db7dcc431/src/Symfony/Component/ExpressionLanguage/Token.php (L25-L30)
Commits
-------
bfde15b728 Fix type annotation
* 5.1:
Added Stopwatch example to the README
Bump Symfony version to 5.1.8
Update VERSION for 5.1.7
Update CHANGELOG for 5.1.7
Bump Symfony version to 4.4.16
Update VERSION for 4.4.15
Update CHANGELOG for 4.4.15
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Validator] Use comparison constraints as attributes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | yes
| Tickets | #38096
| License | MIT
| Doc PR | TODO, let's add it to symfony/symfony-docs#14305
This PR enables all child classes of `AbstractComparison` to be used as attributes.
Some of those constraints used a trait called `NumberConstraintTrait` for a shared implementation. After my changes, that trait did not fit well anymore, so I've added a new `ZeroComparisonConstraintTrait` as a replacement. Although I don't expect `NumberConstraintTrait` to provide much value outside of the Symfony codebase, I think we cannot safely change it because it was not labelled as `@internal`. This is basically why I went for the deprecation.
Commits
-------
b5bdf8288f [Validator] Use comparison constraints as attributes.
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[HttpFoundation] Expired cookies string representation consistency & tests
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| License | MIT
These changes add consistent behavior when converting expired cookies back and forth from string representation into `Symfony\Component\HttpFoundation\Cookie` instances in `Cookie::fromString`:
- When `Max-Age` is zero and `expires` is in the past, the `expires` date is kept as is (previous behavior: `expires` is overwritten with current timestamp because it is reset to current timestamp + `Max-Age`)
- When `Max-Age` is zero and `expires` is in the future, expires is reset to current timestamp, as `Max-Age` is the preferred "source of truth" (same as previous behavior)
- Add tests for how the Cookie class handles `Max-Age` in a cookie string and how `expires` and `Max-Age` interact
- Extract helper function `expiresTimestamp` so converting to a unix timestamp can be reused in `Cookie::fromString`
This is more a new feature than a bug fix in my mind, therefore I would include it in 5.1+.
Commits
-------
4f5d5eceb0 [HttpFoundation] Expired cookies string representation consistency & tests