wizacha/new-relic-polyfill

This package is abandoned and no longer maintained. No replacement package was suggested.

Polyfill for the New Relic PHP extension

1.0.1 2017-10-02 09:44 UTC

This package is auto-updated.

Last update: 2020-10-20 08:15:12 UTC


README

Polyfill for the New Relic PHP extension.

Total Downloads

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.

Installation

composer require wizacha/new-relic-polyfill

That's all you need to do!