6.2
Commits on Aug 19, 2022
-
* 6.1: [Security][AbstractToken] getUserIdentifier() must return a string [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones Email image parts: regex for single closing quote [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum
-
* 6.0: [Security][AbstractToken] getUserIdentifier() must return a string [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones Email image parts: regex for single closing quote [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum
-
* 5.4: [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones Email image parts: regex for single closing quote [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum
-
* 4.4: Email image parts: regex for single closing quote
-
minor #47337 [Clock] relax some assertions to transient NativeClock t…
…ests (xabbuh) This PR was merged into the 6.2 branch. Discussion ---------- [Clock] relax some assertions to transient NativeClock tests | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 2e2c3e7 relax some assertions to transient NativeClock tests
-
feature #47101 [DependencyInjection] Allow service subscribers to ret…
…urn `SubscribedService[]` (kbond) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [DependencyInjection] Allow service subscribers to return `SubscribedService[]` | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | todo This allows `ServiceSubscriberInterface::getSubscribedServices()` to return `SubscribedService[]` which now has the ability to add DI attribute objects (ie `Target`). ```php public static function getSubscribedServices(): array { return [ new SubscribedService('logger', Psr\Log\LoggerInterface::class), new SubscribedService(type: Psr\Log\LoggerInterface::class, nullable: true), new SubscribedService('http_client', HttpClientInterface::class, attributes: new Target('githubApi'))), ]; } ``` When using the `ServiceSubscriberTrait`, the `SubscribedService` attribute can add attributes as well: ```php #[SubscribedService(attributes: new Target('githubApi'))] private function httpClient(): ?HttpClientInterface { return $this->container->get(__METHOD__); } ``` TODO: - [x] Implementation - [x] Tests - [x] Changelog Commits ------- 049f15e [DependencyInjection] Allow service subscribers to return `SubscribedService[]`
-
bug #47329 Email image parts: regex for single closing quote (rr-it)
This PR was merged into the 4.4 branch. Discussion ---------- Email image parts: regex for single closing quote | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - The regex for image src matches for single and double opening quotes: `([\'"])` The corresponding matching for non-closing characters is implemented for double quotes only: `([^"]+)` This change adds a non-greedy regex `.+?` which matches for as few characters as possbile before the "correspondingly matched opening quote" `\\1` appears. Commits ------- 57c49b4 Email image parts: regex for single closing quote
-
-
bug #47335 [Security] [AbstractToken] getUserIdentifier() must return…
… a string (mpiot) This PR was submitted for the 6.2 branch but it was merged into the 6.0 branch instead. Discussion ---------- [Security] [AbstractToken] getUserIdentifier() must return a string | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Fix the `getUserIdentifier()` method from Symfony\Component\Security\Core\Authentication\Token\AbstractToken, he method must return a string, but based on a nullable UserInterface object. Commits ------- 2987d58 [Security][AbstractToken] getUserIdentifier() must return a string
-
minor #47336 [FrameworkBundle] clean up unused variables (xabbuh)
This PR was merged into the 6.2 branch. Discussion ---------- [FrameworkBundle] clean up unused variables | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | spotted while reviewing #46000 Commits ------- ccfb1e5 clean up unused variables
-
feature #40152 [Messenger] Pass sender details to SendMessageToTransp…
…ortsEvent (Jeroeny) This PR was merged into the 6.2 branch. Discussion ---------- [Messenger] Pass sender details to SendMessageToTransportsEvent | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | no | New feature? | yes | Deprecations? | no | License | MIT This is a feature suggestion that will allow listeners for `SendMessageToTransportsEvent` to be able to read the sender and sender alias from a sent message. Use case: To create metrics for messages that go through the system (and especially where to and from). Listener(s) can be created to measure this. They would listen to `WorkerMessageHandledEvent`, `WorkerMessageFailedEvent` and `SendMessageToTransportsEvent`. The first two receive envelopes that contain a `ReceivedStamp`, to determine where the message came from. However, the received envelopes for sent messages do not contain a stamp to read the sender. It would be great if this was possible to do with listener (instead of having to add middleware to each bus). Approach in this PR: stamp the envelope with `SentStamp` before dispatching `SendMessageToTransportsEvent`. Alternative approach: pass the info to the event directly: `new SendMessageToTransportsEvent($envelope, get_class($sender), $alias)`. And keep the stamping afterwards. **Edit**: I just noticed that one event is dispatched regardless of the number of senders. In that case the event could be dispatched after all the senders have been called (and thus all the stamps set). Commits ------- 92b512a add senders to SendMessageToTransportsEvent
-
-
feature #41171 [Messenger] Add simple transport based rate limiter to…
… Messenger (bobvandevijver) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [Messenger] Add simple transport based rate limiter to Messenger | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #36808 | License | MIT | Doc PR | - This PR adds the possibility to add a simple, transport based, rate limiter (as defined with the RateLimiter component) to the Messenger worker. Commits ------- 29a2585 [Messenger] Add simple transport based rate limiter to Messenger
-
bug #47283 [HttpFoundation] Prevent accepted rate limits with no rema…
…ining token to be preferred over denied ones (MatTheCat) This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #47282 | License | MIT | Doc PR | N/A When a rate limit is first accepted with no remaining token, following rejected rate limits will be ignored because they also will have no remaining token. The request would then be processed. Commits ------- 8188f1c [HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones
-
[HttpFoundation] Prevent accepted rate limits with no remaining token…
… to be preferred over denied ones
-
bug #47128 [Serializer] Throw InvalidArgumentException if the data ne…
…eded in the constructor doesn't belong to a backedEnum (allison guilhem) This PR was merged into the 5.4 branch. Discussion ---------- [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? |no | Tickets | Fix #46977 [Serializer] Collect deserialization errors on enum cause TypeError | License | MIT | Doc PR | Targeted case: Deserialization with "collect_denormalization_errors" set but the data to be serialized does not correspond to the scalar value of the targeted enum instance in the object's constructor. updated in last commit : Keep "from "(in the previous commits I had switched to "tryFrom") to map the data submitted to an enum instance targeted. Imho, even if the "collect_denormalization_errors" is specified, this type of error seems to have to be caught upstream. By just trying to collect the error we do not prevent the object from being instantiated. But this action is bound to fail because we already know that the data is not valid (checked by the BackedEnumNormalizer). This instantiation 'failure' leads to a confusing/misleading error (i.e. _Argument # 1 ($test) must be of type TestEnum, string given_) which is not the original error. Commits ------- c30f057 [Serializer] Throw InvalidArgumentException if the data needed in the constructor doesn't belong to a backedEnum
-
minor #47328 [Clock] use the clock mock to fix transient MonotonicClo…
…ck tests (xabbuh) This PR was merged into the 6.2 branch. Discussion ---------- [Clock] use the clock mock to fix transient MonotonicClock tests | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- b714b04 use the clock mock to fix transient MonotonicClock tests
Commits on Aug 18, 2022
-
-
Email image parts: regex for single closing quote
The regex for image src matches for single and double opening quotes: `([\'"])` The corresponding matching for non-closing characters is implemented for double quotes only: ([^"]+) This change adds a non-greedy regex `.+?` which matches for as few characters as possbile before the "correspondingly matched opening quote" `\\1` appears.
-
bug #47318 [PhpUnitBridge] fix order of returned array values for moc…
…ked hrtime() (xabbuh) This PR was merged into the 6.2 branch. Discussion ---------- [PhpUnitBridge] fix order of returned array values for mocked hrtime() | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- a2af29b fix order of returned array values for mocked hrtime()
-
minor #47319 revert #47270 to not use microtime() in the NativeClock …
…(xabbuh) This PR was merged into the 6.2 branch. Discussion ---------- revert #47270 to not use microtime() in the NativeClock | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 21f4055 Revert "minor #47270 [Clock] fix transient NativeClock test (xabbuh)"
-
[Serializer] Throw InvalidArgumentException if the data needed in the…
… constructor doesn't belong to a backedEnum
-
bug #47242 [DoctrineBridge] Do not ignore null IDs in EntityValueReso…
…lver (MatTheCat) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [DoctrineBridge] Do not ignore null IDs in EntityValueResolver | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #47166 | License | MIT | Doc PR | N/A The `EntityValueResolver` first try to fetch an entity by its ID but handle null and non-existent IDs the same. If a `null` ID is present, it feels weird to ignore it and try matching an entity using other request attributes. Better return `null` in this case. Commits ------- db05d4c [DoctrineBridge] Do not ignore null IDs in EntityValueResolver
-
Commits on Aug 17, 2022
-
* 6.1: [HttpFoundation] Fix tests on PHP 8.2 (bis)
-
* 6.0: [HttpFoundation] Fix tests on PHP 8.2 (bis)
-
* 5.4: [HttpFoundation] Fix tests on PHP 8.2 (bis)
-
* 4.4: [HttpFoundation] Fix tests on PHP 8.2 (bis)
-