Skip to content

[Serializer] Fix unknown expected types normalization the Promotion constructor type when know type #53945

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

Closed
wants to merge 7,589 commits into from

Conversation

Myks92
Copy link
Contributor

@Myks92 Myks92 commented Feb 14, 2024

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

When we use the normalizer with Promotion Constructor, a Non Normalizable Value Exception occurs with unknown type even when the type is known. This Pull request fix this error.

nicolas-grekas and others added 30 commits January 2, 2024 14:35
* 6.3:
  append instead of replacing potentially non-existent named-arguments
  [Validator] added missing Polish translation
  add translations for the MacAddress constraint
  remove invalid changelog entry
  Added missing Serbian (sr_Latn) translations
  [Cache][DependencyInjection][Lock][Mailer][Messenger][Notifier][Translation] Url decode username and passwords from `parse_url()` results
  [Security] added missing Albanian translations
  [Validator] Add missing Hungarian translation
  [Serializer] Fix using deserialization path
  [Validator] Add missing hr translation
…homasLandauer)

This PR was squashed before being merged into the 6.4 branch.

Discussion
----------

[Form] Adding more ``@var`` PHPDoc's to silence psalm

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes (kind of)
| New feature?  | no
| Deprecations? | no
| Issues        | none
| License       | MIT

... as announced in #52861 (comment)

Commits
-------

e47b557 [Form] Adding more ``@var`` PHPDoc's to silence psalm
* 5.4:
  [Validator] added missing Hungarian translation
  [Validator] add missing lv translation
  fix the exception being thrown
This PR was merged into the 6.3 branch.

Discussion
----------

[Cache] synchronize RelayProxy

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

Commits
-------

2771e7c synchronize RelayProxy
* 6.3:
  synchronize RelayProxy
  [Validator] added missing Hungarian translation
  [Validator] add missing lv translation
  fix the exception being thrown
This PR was merged into the 6.4 branch.

Discussion
----------

[FrameworkBundle] fix lowest deps

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

Commits
-------

24655b7 fix lowest deps
* 6.4:
  fix lowest deps
  synchronize RelayProxy
  [Form] Adding more `@var` PHPDoc's to silence psalm
  [Validator] added missing Hungarian translation
  [Validator] add missing lv translation
  fix the exception being thrown
  fix syntax error
  fix redis messenger scheme comparison
  [Scheduler] Separate id and description in message providers
  [Form] Adding `@var` PHPDoc to silence psalm
  append instead of replacing potentially non-existent named-arguments
  [Validator] added missing Polish translation
  add translations for the MacAddress constraint
  remove invalid changelog entry
  Added missing Serbian (sr_Latn) translations
  [Cache][DependencyInjection][Lock][Mailer][Messenger][Notifier][Translation] Url decode username and passwords from `parse_url()` results
  [Security] added missing Albanian translations
  [Validator] Add missing Hungarian translation
  [Serializer] Fix using deserialization path
  [Validator] Add missing hr translation
…ubmitEvent` (fancyweb)

This PR was merged into the 6.4 branch.

Discussion
----------

[Form] Fix assigning data in `PostSetDataEvent` and `PostSubmitEvent`

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | #53364
| License       | MIT

Ref #51043 where we changed the behavior on 6.4 since we don't assign the data property anymore.

cc `@HeahDude`

Commits
-------

61d71c4 [Form] Fix assigning data in PostSetDataEvent and PostSubmitEvent
* 6.4:
  [Form] Fix assigning data in PostSetDataEvent and PostSubmitEvent
* 5.4: (22 commits)
  update translation fr
  prevent incompatible Translator implementations to be used
  [Validator] added missing Serbian Latin translation
  [Validator] added missing Czech translations
  [Validator] added missing Portuguese translation
  [Validator] added missing Luxembourgish translation
  [Validator] added missing Greek translations
  [Validator] added missing Azerbaijani translations
  [Validator] added missing Slovenian translations
  [Validator] added missing Bulgarian translations
  [Validator] added missing Turkish translations
  [Validator] added missing Russian translations
  [Validator] added missing Danish translations
  [Notifier] Fix FrameworkExtension factory classes (MessageBird & TurboSms)
  [Validator] added missing Macedonian translation
  [Validator] added missing Slovak translations
  [Form][Security][Validator] Normalize translation files
  [Console] CS fix
  Add missing Indonesian translation
  [Validator] added missing Ukrainian translation
  ...
* 6.3: (22 commits)
  update translation fr
  prevent incompatible Translator implementations to be used
  [Validator] added missing Serbian Latin translation
  [Validator] added missing Czech translations
  [Validator] added missing Portuguese translation
  [Validator] added missing Luxembourgish translation
  [Validator] added missing Greek translations
  [Validator] added missing Azerbaijani translations
  [Validator] added missing Slovenian translations
  [Validator] added missing Bulgarian translations
  [Validator] added missing Turkish translations
  [Validator] added missing Russian translations
  [Validator] added missing Danish translations
  [Notifier] Fix FrameworkExtension factory classes (MessageBird & TurboSms)
  [Validator] added missing Macedonian translation
  [Validator] added missing Slovak translations
  [Form][Security][Validator] Normalize translation files
  [Console] CS fix
  Add missing Indonesian translation
  [Validator] added missing Ukrainian translation
  ...
* 6.4: (23 commits)
  update conflict rules
  update translation fr
  prevent incompatible Translator implementations to be used
  [Validator] added missing Serbian Latin translation
  [Validator] added missing Czech translations
  [Validator] added missing Portuguese translation
  [Validator] added missing Luxembourgish translation
  [Validator] added missing Greek translations
  [Validator] added missing Azerbaijani translations
  [Validator] added missing Slovenian translations
  [Validator] added missing Bulgarian translations
  [Validator] added missing Turkish translations
  [Validator] added missing Russian translations
  [Validator] added missing Danish translations
  [Notifier] Fix FrameworkExtension factory classes (MessageBird & TurboSms)
  [Validator] added missing Macedonian translation
  [Validator] added missing Slovak translations
  [Form][Security][Validator] Normalize translation files
  [Console] CS fix
  Add missing Indonesian translation
  ...
…#[Ignore]` attribute (nikophil)

This PR was merged into the 6.4 branch.

Discussion
----------

[Serializer] `GetSetMethodNormalizer`: fix BC break with `#[Ignore]` attribute

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

This PR fixes a subtle BC break introduced by https://github.com/symfony/symfony/pull/52294/files: `GetSetMethodNormalizer` no more ignores methods marked as `#[Ignore]` with the old class `Symfony\Component\Serializer\Annotation\Ignore`

Commits
-------

ab42c55 [Serializer] GetSetMethodNormalize: fix BC break with Ignore attribute
* 6.4:
  [Serializer] GetSetMethodNormalize: fix BC break with Ignore attribute
…ttpKernel component (xabbuh)

This PR was merged into the 6.4 branch.

Discussion
----------

[ErrorHandler] fix rendering exception pages without the HttpKernel component

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #53430
| License       | MIT

Commits
-------

172862c fix rendering exception pages without the HttpKernel component
* 5.4:
  [Validator] added missing Spanish translations
  [Messenger] Amazon SQS Delay has a max of 15 minutes
  Add missing translations using ChatGPT
  [Validator] added missing Finnish, Italian, and Serbian Cyryllic translations
  Add .github/sync-translations.php
* 6.3:
  [Validator] added missing Spanish translations
  [Messenger] Amazon SQS Delay has a max of 15 minutes
  Add missing translations using ChatGPT
  [Validator] added missing Finnish, Italian, and Serbian Cyryllic translations
  Add .github/sync-translations.php
* 6.4:
  [Validator] added missing Spanish translations
  fix rendering exception pages without the HttpKernel component
  [Messenger] Amazon SQS Delay has a max of 15 minutes
  Add missing translations using ChatGPT
  [Validator] added missing Finnish, Italian, and Serbian Cyryllic translations
  Add .github/sync-translations.php
This PR was merged into the 6.3 branch.

Discussion
----------

[Translation] add support for nikic/php-parser 5.0

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Issues        |
| License       | MIT

Commits
-------

1627f6b add support for nikic/php-parser 5.0
* 6.3:
  add support for nikic/php-parser 5.0
* 6.4:
  add support for nikic/php-parser 5.0
@Myks92 Myks92 changed the title [Serializer] Fix normalization promotion constructor unknown type when know type [Serializer] Fix normalization the Promotion constructor unknown type when know type Feb 14, 2024
@Myks92 Myks92 changed the title [Serializer] Fix normalization the Promotion constructor unknown type when know type [Serializer] Fix unknown expected types normalization the Promotion constructor type when know type Feb 14, 2024
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, for branch 5.4

@Myks92 Myks92 changed the base branch from 5.4 to 7.0 February 14, 2024 16:37
Copy link
Contributor

@mtarld mtarld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but you should target the 5.4 branch as that bug is already existing in that version

Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👍🏼

@Myks92 Myks92 changed the base branch from 7.0 to 5.4 February 15, 2024 19:51
@Myks92 Myks92 closed this Feb 15, 2024
nicolas-grekas added a commit that referenced this pull request Feb 22, 2024
…w type (Myks92)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[Serializer] Fix unknown types normalization type when know type

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

When we use the normalizer with Promotion Constructor, a Non Normalizable Value Exception occurs with unknown type even when the type is known. This Pull request fix this error.

Previously, a PR #53945 was proposed for extraction, in which `@mtarld` asked to change the target branch to 5.4

Commits
-------

a4c2961 [Serializer] Fix unknown types normalization type when know type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.