Download the PHP package perfbase/cakephp without Composer

On this page you can find all versions of the php package perfbase/cakephp. 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

Perfbase

Perfbase for CakePHP

CakePHP integration for Perfbase.

Packagist Version License CI PHP Version CakePHP Version

This package is a thin adapter over perfbase/php-sdk. It wires CakePHP HTTP requests and command lifecycles into the shared SDK and leaves transport, payload construction, extension handling, and submission to perfbase/php-sdk.

What it profiles

Out of scope in v1:

Requirements

The package fails open when the extension is unavailable. Your CakePHP application keeps running, but no Perfbase trace data is collected until the extension is installed and loaded.

If your application wants manual custom spans outside the automatic HTTP and console integration, depend on and use perfbase/php-sdk directly. This package does not add a separate Cake-specific manual tracing API.

Installation

Install the package from Packagist:

Install the Perfbase PHP extension if it is not already available:

Restart PHP-FPM, RoadRunner workers, Swoole workers, or your web server after installing the extension.

Load the plugin in your application:

Once the plugin is loaded:

CakePHP 4 does not get automatic command profiling. That path is CakePHP 5 only.

Quick start

Create config/perfbase.php in your application:

Set your API key in the environment:

Start with a sample rate like 0.1 or lower in production, then tune based on traffic and overhead.

Configuration model

The plugin ships defaults in config/perfbase.php.

Configuration is resolved in this order:

  1. Package defaults
  2. Application config/perfbase.php if present
  3. Existing Configure::write('Perfbase', ...) values

That means explicit runtime configuration wins over file-based configuration.

Supported configuration

Core settings

Setting Default Purpose
enabled false Global on/off switch
debug false Re-throw profiling failures instead of failing open
log_errors true Log profiling failures when debug is off
api_key null Perfbase API key
api_url https://ingress.perfbase.cloud Receiver base URL
sample_rate 0.1 Sampling rate from 0.0 to 1.0
profile_http_status_codes [...range(200, 299), ...range(500, 599)] HTTP response codes that should be submitted
timeout 10 Submission timeout in seconds
proxy null Optional outbound proxy
flags FeatureFlags::DefaultFlags Perfbase extension feature flags
environment production Trace environment tag
app_version '' Application version tag

profile_http_status_codes is configured in CakePHP config rather than an environment variable. The default [...range(200, 299), ...range(500, 599)] submits successful responses and server errors, while dropping common noisy client responses such as 404. Add codes like 404 if you want to keep them.

Runtime config

If you want to override settings programmatically, do it before the plugin uses the config:

Feature flags

The plugin passes feature flags straight through to the Perfbase extension via the shared SDK.

Examples:

Common flags:

Filters

The package supports include and exclude filters for http and console contexts.

Supported pattern styles:

The HTTP lifecycle matches against normalized identifiers, not just the raw URL. It prefers route-derived action names and falls back to stable controller/action or path identifiers when needed.

How it behaves

HTTP requests

HTTP profiling is provided by PerfbaseMiddleware. The middleware guarantees lifecycle cleanup with try/finally and attaches response or exception data before submission.

By default, only responses with a status code in profile_http_status_codes are submitted. The shipped default is [...range(200, 299), ...range(500, 599)].

Recorded attributes include:

Span names follow the format http.{METHOD}.{identifier}.

http_url is recorded without the query string. This is deliberate so tokens, emails, and other sensitive query parameters are not shipped as trace metadata.

CakePHP 5 console commands

CakePHP 5 command profiling is automatic once the plugin is loaded. The plugin registers Cake5ConsoleListener with the global event manager and tracks active command lifecycles by command object hash so repeated or nested commands do not collide.

Recorded attributes include:

Span names follow the format console.{command-name}.

CakePHP 4 console commands

CakePHP 4 does not expose the same global command lifecycle events as CakePHP 5. Command profiling is therefore opt-in. Extend ProfiledCommand:

Failure behavior

This package is designed to fail open:

The adapter does not implement its own buffering or retry layer. Submission is delegated to the shared SDK.

Example production setup

For a low-overhead production baseline:

That gives you a useful production trace stream with conservative overhead.

Troubleshooting

The extension is unavailable

Check that the extension is loaded:

If needed, reinstall it:

Restart any long-lived PHP workers afterwards.

No traces are appearing

Check these first:

Overhead is higher than expected

To reduce overhead:

Development

Useful commands:

The package currently has full PHPUnit coverage and a clean PHPStan pass against the checked-in source.

Documentation

Full documentation is available at perfbase.com/docs.

License

Apache-2.0. See LICENSE.txt.


All versions of cakephp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4 <8.6
ext-json Version *
cakephp/cakephp Version ^4.4 || ^5.0
perfbase/php-sdk Version ^1.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 perfbase/cakephp contains the following files

Loading the files please wait ...