Skip to content

Add class for managing deprecations#248

Merged
mcclayton merged 7 commits intomasterfrom
mc/deprecations
Nov 20, 2020
Merged

Add class for managing deprecations#248
mcclayton merged 7 commits intomasterfrom
mc/deprecations

Conversation

@mcclayton
Copy link
Copy Markdown
Contributor

@mcclayton mcclayton commented Nov 19, 2020

Adding in a class for managing deprecations and introducing a deprecation configuration option to the blueprinter config.
Deprecations can be set to the following behavior options:

When functionality in Blueprinter is invoked, that has been deprecated, the default behavior is to
write a deprecation notice to stderror.

However, deprecations can be configured to report at three different levels:

Key Result
:stderr (Default) Deprecations will be written to stderror
:raise Deprecations will be raised as Blueprinter::BlueprinterErrors
:silence Deprecations will be silenced and will not be raised or logged

Example:

Blueprinter.configure do |config|
  config.deprecation = :raise
end

@adamwells
Copy link
Copy Markdown
Contributor

Looks good, thanks for adding this

@mcclayton mcclayton merged commit 26f0968 into master Nov 20, 2020
@mcclayton mcclayton deleted the mc/deprecations branch November 20, 2020 18:39
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.

3 participants