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

Remove deprecated has_key function #1319

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

MartyEwings
Copy link
Contributor

@MartyEwings MartyEwings commented Apr 25, 2023

Note: Deprecated since Puppet 4.0.0, this can now be achieved in the Puppet
language with the following equivalent expression:

    $my_hash = {'key_one' => 'value_one'}
    if 'key_one' in $my_hash {
      notice('this will be printed')
    }

@puppet-community-rangefinder
Copy link

has_key is a function

Breaking changes to this file MAY impact these 125 modules (near match):

This module is declared in 318 of 580 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Copy link
Contributor

@LukasAud LukasAud left a comment

Choose a reason for hiding this comment

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

LGTM but what is the equivalent expression here?

@smortex
Copy link
Collaborator

smortex commented Apr 25, 2023

LGTM but what is the equivalent expression here?

I adjusted the initial message description to include the example.

@david22swan david22swan merged commit 323d8b4 into puppetlabs:main Apr 26, 2023
evgeni added a commit to evgeni/puppetlabs-apache that referenced this pull request Apr 26, 2023
In the next puppetlabs-stdlib major version this function will be dropped.
Native Puppet is used instead.

puppetlabs/puppetlabs-stdlib#1319 broke this
traylenator added a commit to traylenator/puppet-filebeat that referenced this pull request May 9, 2023
The deprecated `has_key` method has been removed from upstream
stdlib.

puppetlabs/puppetlabs-stdlib#1319
pcfens pushed a commit to pcfens/puppet-filebeat that referenced this pull request May 9, 2023
The deprecated `has_key` method has been removed from upstream
stdlib.

puppetlabs/puppetlabs-stdlib#1319
traylenator added a commit to traylenator/podman that referenced this pull request Jun 20, 2023
traylenator added a commit to traylenator/podman that referenced this pull request Jun 20, 2023
traylenator added a commit to traylenator/podman that referenced this pull request Jun 20, 2023
ldaneliukas added a commit to ldaneliukas/puppet-tuned that referenced this pull request Jun 22, 2023
LadyNamedLaura added a commit to LadyNamedLaura/puppet-role that referenced this pull request Jun 25, 2023
This should help with compatibility with stdlib >= 9.0.0
puppetlabs/puppetlabs-stdlib#1319
Scnaeg added a commit to Scnaeg/puppet-sssd that referenced this pull request Jul 26, 2023
Function was removed from stdlib in v9.0.0:
puppetlabs/puppetlabs-stdlib#1319
deric added a commit to deric/puppet-beegfs that referenced this pull request Aug 10, 2023
rrotter added a commit to mlibrary/puppetlabs-apache that referenced this pull request Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants