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

has_key deprecated shim. #1375

Open
robertc99 opened this issue Jun 16, 2023 · 4 comments
Open

has_key deprecated shim. #1375

robertc99 opened this issue Jun 16, 2023 · 4 comments

Comments

@robertc99
Copy link

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.

@alexjfisher
Copy link
Collaborator

Not sure on this one. Unlike the other cases, the replacement isn't something that's introduced in stdlib 9, but something that's been available in Puppet for a very long time.

@ekohl
Copy link
Collaborator

ekohl commented Jun 27, 2023

Would it be better to do a version 8.n+1 which emits a deprecation warning?

@robertc99
Copy link
Author

I dont think a new version 8 is useful as people upgrading from 8.6.0 are likely to go straight to the latest 9.x without going through a new 8.x.

@robertc99
Copy link
Author

Regardless of whether the replacement has been in puppet for a long time, there are still modules out there using has_key.
I think its not a good idea to go straight from working to broken without giving a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants