Skip to content

[Serializer] Consider SerializedPath in debug command output #52730

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

Merged
merged 0 commits into from
Nov 26, 2023

Conversation

jschaedl
Copy link
Contributor

@jschaedl jschaedl commented Nov 25, 2023

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

The debug:serializer command does not show SerializedPath information and I figured it might makes sense to add it.

Corresponding symfony-docs pr symfony/symfony-docs#19184

Copy link
Member

@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

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

👍 I like it

@carsonbot carsonbot changed the title Consider SerializedPath in debug command output [Serializer] Consider SerializedPath in debug command output Nov 25, 2023
Comment on lines 109 to 115
if ($serializedName = $attributeMetadata->getSerializedName()) {
$data[$attributeMetadata->getName()]['serializedName'] = $serializedName;
}

if ($serializedPath = $attributeMetadata->getSerializedPath()) {
$data[$attributeMetadata->getName()]['serializedPath'] = (string) $serializedPath;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It outputs information of either SerializedName or SerializedPath, because both cannot be used in combination for the same property.

@fabpot
Copy link
Member

fabpot commented Nov 26, 2023

Thank you @jschaedl.

@fabpot fabpot closed this Nov 26, 2023
@fabpot fabpot force-pushed the improve-serializer-debug-command branch from dfbeb1d to 24cdc43 Compare November 26, 2023 17:03
@fabpot fabpot merged commit e7d73e8 into symfony:7.1 Nov 26, 2023
@jschaedl jschaedl deleted the improve-serializer-debug-command branch November 26, 2023 17:20
OskarStark added a commit to symfony/symfony-docs that referenced this pull request Dec 11, 2023
…ding `serializedPath` (jschaedl)

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

Discussion
----------

Improve `debug:serializer` command documentation by adding `serializedPath`

symfony/symfony#52730

Commits
-------

2c88dc8 Improve `debug:serializer` command documentation by adding `serializedPath`
@fabpot fabpot mentioned this pull request May 2, 2024
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.

5 participants