Forked from wizacha/new-relic-polyfill and adds new methods that are missing.
Using New Relic's PHP extension requires us to use this pattern everywhere:
if (extension_loaded('newrelic')) {
newrelic_set_appname($name);
}
This package is a polyfill re-declaring all the functions provided by New Relic when the extension is not installed. In other words, after installing this polyfill you can rely on the function to exist:
newrelic_set_appname($name);
If the extension is installed, everything will work as expected. If not (for example on your development machine) nothing will happen.
composer require wizacha/new-relic-polyfill
That's all you need to do!