When I tested the module with Puppet 4, it wouldn't work. I can't remember exactly but it's either because php is not present when called first (that is why I rewrote some scripts in python) or because the scripts returned nothing.
There must be a way to comply by doing an if file exists then run the API call, if not return what Puppet would like.
@mkherlakian Please assign the puppet4 label