Download the PHP package brunitto/cakephp-new-relic without Composer

On this page you can find all versions of the php package brunitto/cakephp-new-relic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cakephp-new-relic

CakePHP NewRelic

CakePHP New Relic plugin.

Build status

Build Status

Overview

This plugin extends the CakePHP Request cycle, adding a specialized Dispatcher Filter that adds support for New Relic. The current version supports:

For more information, visit:

PHP Frameworks: Integrating support for New Relic

Requirements

This plugin has the following requirements:

Development requirements:

Installation

Install the plugin using Composer, executing the following command in your project's root directory (where the composer.json file is located.)

composer require brunitto/cakephp-new-relic

Usage

Enable name transaction

Using Dispatcher

Add the Dispatcher Filter to the bootstrap.php file:

// New Relic name transaction dispatcher filter
DispatcherFactory::add('NewRelic.NameTransaction');

Using Middleware

Add the Middleware to the src/Application.php file after the RoutingMiddleware:

$middlewareQueue
    ->add(new RoutingMiddleware($this))
    ->add(new NameTransactionMiddleware());

Enable browser timing

Load the plugin helper within src/View/AppView.php, add the following line within the initialize() method:

$this->loadHelper('NewRelic.NewRelic');

Like this:

public function initialize()
{
    parent::initialize();
    $this->loadHelper('NewRelic.NewRelic');
}

In your Layouts files, use the NewRelic helper methods to get the browser timing header and footer.

The header goes right before the </head> element:

<head>
...
<!-- NEW RELIC BROWSER TIMING HEADER -->
<?= $this->NewRelic->getBrowserTimingHeader() ?>
</head>

And the footer goes right before the </body> element:

<body>
...
<!-- NEW RELIC BROWSER TIMING FOOTER -->
<?= $this->NewRelic->getBrowserTimingFooter() ?>
</body>

Middleware support

This plugin is ready for Middleware, as defined in:

Middleware

Development guidelines

Install dependencies

Install using composer program:

$ composer install --ignore-platform-reqs

Running tests

Run using phpunit program:

$ vendor/bin/phpunit tests --color

Releasing a new version

  1. Plan a release on GitHub, using Semantic Versioning, defining which issues will be on this release
  2. Checkout to development and merge master, starting from the last stable version
  3. Work in development, commiting and pushing to origin when you have working code. This will trigger Travis CI and run tests as soon as possible. If you fix an issue, use the , fix #N suffix in commit messages, where #N is the issue identifier. This will close issues on GitHub
  4. When the development is ready to go, merge in master and creates two soft tags: the version tag 1.2.3 and the stable tag. It might be necessary to remove the stable tag before pushing. The version tag is used by GitHub and Packagist to define a new release and a stable release
  5. Push master to origin including the tags and wait for Travis CI to run and the tests to pass

Issues

If you have some problem with this plugin, please open an issue on:

https://github.com/brunitto/cakephp-new-relic/issues

Contribute

If you'd like to contribute, you can fork the project, add features and send pull requests in the official repository:

https://github.com/brunitto/cakephp-new-relic


All versions of cakephp-new-relic with dependencies

PHP Build Version
Package Version
Requires cakephp/cakephp Version >=3.6 <4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package brunitto/cakephp-new-relic contains the following files

Loading the files please wait ....