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

Return fully namespaced ingredient constant #2164

Merged

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Aug 6, 2021

What is this pull request for?

Using const_get returns the constant from within the Alchemy::Ingredients
module, not the full constant. This can lead to errors with ingredients
that have a reserved constant name (like the File ingredient)

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@tvdeyen tvdeyen added this to the 6.0 milestone Aug 6, 2021
@tvdeyen tvdeyen requested a review from a team August 6, 2021 11:11
Copy link
Contributor

@rmparr rmparr left a comment

Choose a reason for hiding this comment

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

Looks good!

Using const_get returns the constant from within the Alchemy::Ingredients
module, not the full constant. This can lead to errors with ingredients
that have a reserved constant name (like the File ingredient)
@tvdeyen tvdeyen force-pushed the fix-ingredient-constant-normalization branch from cd6f631 to 2840cb3 Compare August 6, 2021 11:25
@tvdeyen tvdeyen merged commit f19297f into AlchemyCMS:main Aug 6, 2021
@tvdeyen tvdeyen deleted the fix-ingredient-constant-normalization branch August 6, 2021 11:31
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