-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Added ScalarDenormalizer for denormalize any scalar values #35136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The used phpDocumentor library DocBlockReflection contained an BC break that broke this component. The patch was applied in the recent released v4.3.4 version. But since it is unclear how long this issue existed it is not possible to exclude a certain version. Therefor also `\RuntimeExpception` needs to be catched. The BC break is possibly caused by a change in the TypeResolver library used by the DocBlockReflection which is now supporting the more populair generics notation for arrays.
This PR was merged into the 4.3 branch. Discussion ---------- [HttpClient] fix typo | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 3a25878 [HttpClient] fix typo
…ically and remove duplicated code (fancyweb) This PR was merged into the 3.4 branch. Discussion ---------- [Console][FormatterHelper] Use helper strlen statically and remove duplicated code | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - All those helpers methods are static and are accessed with `self::` everywhere else. They are not an extension point. Commits ------- f0d227d [Console][FormatterHelper] Use helper strlen statically and remove duplicated code
…gue and catalogue operations (ArtemBrovko) This PR was merged into the 3.4 branch. Discussion ---------- [Translator] fix performance issue in MessageCatalogue and catalogue operations | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - In our project we use lots of catalogue operations during importing of translations to our system and we ran into performance issue. Code profiler showed lots or `array_replace` calls in [MessageCatalogue::add](https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/MessageCatalogue.php#L128) method. This method is actually called by [MessageCatalogue::set](https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/MessageCatalogue.php#L70), which is quite an overkill, because `MessageCatalogue::set` is meant to set only one translation at a time. Method was reworked. `MergeOperation` and `TargetOperation` was reworked as well to use this improved `MessageCatalogue::set` method instead of constructing array with only one translation and passing it to `MessageCatalogue::add` method. Table shows execution time before and after | | Time in seconds (avg. of 10 executions) ----------- | ------ Before | 50 After | 8 Looks like 4.* and 5.* versions can also be improved by the same changes. <!-- 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/roadmap): - 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 master. --> Commits ------- 5179af4 [Translator] Performance improvement in MessageCatalogue and catalogue operations.
…s name This fixes the same problem as symfony@6dbac13 but for HTTP transport.
…ndrill API Previous code tries to pass attachments to API, but uses incorrect structure and as a result all attachments are missing when the email is sent.
…ess when sender has name (vilius-g) This PR was merged into the 4.3 branch. Discussion ---------- [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | This fixes the same problem as symfony@6dbac13 but for HTTP transport. I am also not sure that `from_email` parameter is needed here at all as it is optional for this API call. Commits ------- 9e12a6d [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
…hen sending via Mandrill API (vilius-g) This PR was merged into the 4.3 branch. Discussion ---------- [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Previous code tries to pass attachments to API, but uses incorrect structure and as a result all attachments are missing when the email is sent. This also adds previously missing attachment names. Commits ------- 7b1bbb6 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
…ation annotation (fancyweb) This PR was merged into the 3.4 branch. Discussion ---------- [PhpUnitBridge] Add test case for @expectedDeprecation annotation | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Useful twice because it also tests the fact that a test that expects a deprecation and that does not perform any assertion is not considered risky. Commits ------- dba1804 [PhpUnitBridge] Add test case for @expectedDeprecation annotation
… $testsWithWarnings stack (fancyweb) This PR was merged into the 4.3 branch. Discussion ---------- [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - As far as I can see, it is unused since 4.0. Commits ------- 50ba566 [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
Should target master as it's a new feature. |
…orm themes (cmen) This PR was merged into the 4.3 branch. Discussion ---------- [TwigBridge][Form] Added missing help messages in form themes | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix symfony#35006 | License | MIT | Doc PR | / Results:      Commits ------- 5374d4f [TwigBridge][Form] Added missing help messages in form themes
…e locale (fancyweb) This PR was merged into the 4.3 branch. Discussion ---------- [Routing] Fix i18n routing when the url contains the locale | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | symfony#34469 | License | MIT | Doc PR | - This PR fixes different scenarios with i18n routing. Commits ------- cd40bb8 [Routing] Fix i18n routing when the url contains the locale
…tent (Stuart Fyfe) This PR was squashed before being merged into the 4.3 branch. Discussion ---------- [Mailer] Remove line breaks in email attachment content Line breaks are not allowed in attachment content when sending over the API. | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix symfony#33671, Closes symfony#32645 | License | MIT | Doc PR | This is a fix for symfony#33671. Send grid's API throws a 400 error when sending email attachments with default base64 encoding. Removing the line breaks resolves this issue. Commits ------- a28a7f9 [Mailer] Remove line breaks in email attachment content
…protocol version (nicolas-grekas) This PR was merged into the 4.3 branch. Discussion ---------- [HttpClient] NativeHttpClient should not send >1.1 protocol version | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 8b61c95 [HttpClient] NativeHttpClient should not send >1.1 protocol version
First of all this is bug fix (see #33784). Or that issue can be resolved only in master? |
…e decorated definition
…vice_locator on the decorated definition (malarzm) This PR was merged into the 4.3 branch. Discussion ---------- [DI] DecoratorServicePass should keep container.service_locator on the decorated definition | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix symfony#33670 (comment) | License | MIT | Doc PR | - `container.service_locator` is special because it tells how the arguments of the constructor should be interpreted. /cc @malarzm Commits ------- 99dab87 [DI] DecoratorServicePass should keep container.service_locator on the decorated definition
…n the CPU can deal with (nicolas-grekas) This PR was merged into the 4.3 branch. Discussion ---------- [HttpClient] Don't read from the network faster than the CPU can deal with | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Something I spotted while working on symfony#35115: both the curl and native clients don't play well with heavily compressed HTTP streams: they decompress faster than userland can process chunks. The attached patch moves the decompression logic to the chunk generator. This means internally we only deal with raw compressed chunks, and they are decompressed only when passing the value to userland. Commits ------- ac3d77a [HttpClient] Don't read from the network faster than the CPU can deal with
For serialization, scalar values are handled directly in the I wonder if we shouldn't add support for normalization in this new class too (while keeping the existing code in It looks like a bug fix to me too. |
…calarDenormalizer)
# Conflicts: # src/Symfony/Component/Serializer/CHANGELOG.md # src/Symfony/Component/Serializer/Tests/SerializerTest.php
#35235 is a corrected copy of this PR. |
Was added
ScalarDenormalizer
class that allows deserialize scalar data (single or array).