Skip to content
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

Add deprecated attribute to elements and contents #30

Merged
merged 2 commits into from
Jan 21, 2021

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jan 19, 2021

Adds the deprecated attribute to elements and essence serializers. This attribute has been introduced in Alchemy 5.2

@tvdeyen tvdeyen requested a review from mamhoff January 19, 2021 15:37
Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

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

Nice, and even compatible with past Alchemy versions!

This attrobute is a new feature that was introduced in Alchemy 5.2

We use the definition hash here instead of the Element#deprecated? method
because we still support older versions of Alchemy
and a hash simply returns nil for an unkown key
In Alchemy 5.2 contents can be deprecated. Since this is just a Hash key we can
simply use it even for older versions of Alchemy
@tvdeyen tvdeyen force-pushed the re-add-deprecated-attribute branch from f07af94 to 8f59fd7 Compare January 19, 2021 16:17
@tvdeyen tvdeyen merged commit d81d885 into main Jan 21, 2021
@tvdeyen tvdeyen deleted the re-add-deprecated-attribute branch January 21, 2021 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants