Skip to content

Remove deprecated is_array function #1325

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

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

MartyEwings
Copy link
Contributor

use match expressions with Stdlib::Compat::Array instead. They are described at https://docs.puppet.com/puppet/latest/reference/lang_data_type.html#match-expressions.

@puppet-community-rangefinder
Copy link

is_array is a function

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

is_array is a function

Breaking changes to this file MAY impact these 158 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
Collaborator

@smortex smortex left a comment

Choose a reason for hiding this comment

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

While I agree with the removal, I do think we could go further and drop the compat data types too. These are basically the standard data types with bug-to-bug compatibility with the old functions if I recall correctly.

@bastelfreak
Copy link
Collaborator

@smortex I agree to 100%

@b4ldr b4ldr merged commit 8527049 into puppetlabs:main Apr 27, 2023
@davidcomeyne
Copy link

davidcomeyne commented Mar 14, 2025

Match expressions on the docs.puppet.com has been moved to https://www.puppet.com/docs/puppet/8/lang_data_type.html#match-expressions

An example how I changed it:
First:
if is_array($_value) {
Now:
if $_value =~ Array {

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.

5 participants