Allow Enum objects part of a type map to be serialized and deserialized#105
Open
agustingomes wants to merge 3 commits into
Open
Allow Enum objects part of a type map to be serialized and deserialized#105agustingomes wants to merge 3 commits into
agustingomes wants to merge 3 commits into
Conversation
agustingomes
commented
Mar 7, 2026
| "require": { | ||
| "php": "~8.2", | ||
| "crell/attributeutils": "~1.3", | ||
| "crell/attributeutils": "dev-master#a118b55 as 1.3.1", |
Contributor
Author
There was a problem hiding this comment.
Before merging this PR (if that is the direction we want to move towards) I will make sure I update this to a released version.
Owner
There was a problem hiding this comment.
I should probably go make a new release of that soon... 😅
Crell
reviewed
Mar 9, 2026
Crell
reviewed
Mar 9, 2026
Crell
reviewed
Mar 9, 2026
ceb045c to
b537a88
Compare
Crell
reviewed
Apr 10, 2026
Owner
|
(Haven't forgotten this, just been busy. And about to go on vacation for a few days.) |
Contributor
Author
No rush, I completely understand, time is often limited these days, so take your time. |
This change uses the upstream commit allowing Crell#10 to be fixed. NOTE: it is expected a new release of `crell/attributeutils` to be released. using directly the hash is for the purpose of validating the implementation changes in this PR
This commit implements serialization of an enum within a Type Map.
Therefore, individual enums being passed in a list, would be serialized as:
```
{"type": "enum", "value": "the-enum-value"}
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This proposed change aims to allow Enum objects part of a TypeMap to be serialized and deserialized by establishing a serialized structure expected when working with enums in this context.
Motivation and context
fixes #10
How has this been tested?
composer all-checkshelped validate the proposed changes.Types of changes
What types of changes does your code introduce? Put an
xin all the boxes that apply:Checklist:
Go over all the following points, and put an
xin all the boxes that apply.Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.