puppetlabs / puppetlabs/puppetlabs-stdlib

has_key deprecated shim.

Open
#1,375 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

community
Dominant language
Ruby
Stars
349
Forks
573
Avg merge
3d 3h
Merged PRs (30d)
1

Description

As far as I can tell, in version 8.6.0 the has_key function was documented as being deprecated, but didnt
produce a deprecated warning.
But its been removed in version 9+.

So its gone from working silently to missing with no runtime notification to users.
I think it would be better to add a shim with a warning for the moment, so modules have a chance to convert to the "in" operator.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the has_key entry point and the existing deprecation-warning behavior in the repository. Confirm how the removed function is handled in version 9+ and identify the relevant test coverage; done means calls receive a deprecation warning while users can migrate to the "in" operator.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.