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

fix: Improve doing_it_wrong messages for using deprecated parameters in Timber::get_post(), Timber::get_attachment() and Timber::get_image() #2999

Merged
merged 1 commit into from
May 15, 2024

Conversation

gchtr
Copy link
Member

@gchtr gchtr commented May 14, 2024

Related:

Issue

Error messages might be confusing if you use Timber::get_image() with a wrong parameter. You will get error messages that say there was an error with Timber::get_post().

Solution

Use different error messages per method.

Impact

Better understanding of error.

Usage Changes

None.

Considerations

This can be removed in a next major version.

Testing

Not in particular.

…in Timber::get_attachment() and Timber::get_image()
@gchtr gchtr added the 2.0 label May 14, 2024
@gchtr gchtr added this to the 2.2.0 milestone May 14, 2024
@gchtr gchtr self-assigned this May 14, 2024
Copy link
Member

@Levdbas Levdbas left a comment

Choose a reason for hiding this comment

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

Nice work, the helper method is a nice solution!

@Levdbas Levdbas linked an issue May 14, 2024 that may be closed by this pull request
@Levdbas
Copy link
Member

Levdbas commented May 15, 2024

@gchtr , these tests now succeed as well :D

@Levdbas Levdbas merged commit e6cdf7e into 2.x May 15, 2024
24 checks passed
@Levdbas Levdbas deleted the 2.x-get-post-deprecations branch May 15, 2024 09:06
This was referenced May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

: [ Timber ] Timber::get_post() was called
2 participants