Download the PHP package boundwize/pyrameter without Composer

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

Pyrameter

Keep your PHPUnit test suite shaped like a pyramid.

Latest Version ci build Code Coverage PHPStan Downloads

Windows macOS Linux

Pyrameter classifies executed tests as unit, functional, integration, or e2e based on the code they use, then compares the totals with your target shape.

The Practical Test Pyramid article explains tests at different levels. Pyrameter helps you measure their distribution against the target shape you define.

Quick start

Install with Composer:

Register the extension in phpunit.xml:

Run PHPUnit as usual:

This uses the default rules and target shape.

Disable Pyrameter for one run

Set PYRAMETER_DISABLED to 1 to run PHPUnit without Pyrameter collecting tests, printing a report, or enforcing target violations:

The extension remains configured in phpunit.xml, but it does not register any subscribers for that run. Other values do not disable Pyrameter.

Configure

Default or empty configuration

Choose the starting point before adding rules:

Start with Behavior
PyrameterConfig::defaults() Starts with built-in rules and the default target shape. The rules cover common database, cache, and filesystem usage; Symfony and CodeIgniter functional tests; and Panther and WebDriver browser tests. Classification methods add rules; targetShape() replaces the targets.
PyrameterConfig::create() Starts with no rules or targets. Only rules you add can classify tests as heavier than unit.

Extend the built-in configuration:

Define the complete configuration yourself:

A complete pyrameter.php can combine rules, targets, and CI behavior:

Rules can match a class or trait, a namespace prefix, or a function:

Rule Example
usesClass() ->usesClass(PDO::class, TestKind::Integration)
usesNamespace() ->usesNamespace('App\Tests\Browser\\', TestKind::E2E)
usesFunction() ->usesFunction('file_put_contents', TestKind::Integration)

Rule exceptions

Use unless to ignore a rule when the test also consumes another class or trait:

Traits used by the test Result
InteractsWithDatabase integration
MakesHttpRequests functional
Both traits functional

The optional unless argument is also available on usesNamespace() and usesFunction(). Its values always identify classes or traits, regardless of the rule type. For example, a filesystem function rule can be suppressed when a test uses a virtual-filesystem trait:

A test that calls file_put_contents() and uses UsesVirtualFilesystem is classified as functional.

The equivalent CodeIgniter exception is already included in defaults():

Tests that use only DatabaseTestTrait are classified as integration; tests that also use ControllerTestTrait remain functional.

Load a configuration file from another path:

Classification

Usage Kind
No matching heavier rule unit
Framework test runtime functional
Database, cache, queue, filesystem, or external boundary integration
Browser driver usage e2e

Targets and CI

Targets are percentages. An omitted min defaults to 0; an omitted max defaults to 100. Without failOnViolation(), Pyrameter only reports violations.


All versions of pyrameter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
phpunit/phpunit Version ^11.5 || ^12.5 || ^13.3
nikic/php-parser Version ^5.8
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 boundwize/pyrameter contains the following files

Loading the files please wait ...