Download the PHP package jcvviljoen/php-stability-metrics without Composer

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

Stability

PHP Stable Dependency Metrics Analyser

Overview

Stability is a PHP-based tool designed to analyse and calculate the stability of software components in your architecture.

It leverages clean architecture principles and stable dependency metrics to provide insights into the maintainability and robustness of your codebase.

Stability is a nod to the Stable Dependency Principle and the Stable Dependency Metrics, where we are actually measuring Instability.

The goal is to identify components that are either too abstract or too unstable.

Why use Stability?

Stability can help you identify components that are either overly complex (too abstract) or too tightly coupled (too unstable).

By monitoring the metrics of your components as your project continues to develop, you can detect areas in your codebase / architecture that may need refactoring early on.

This can help you improve the maintainability and robustness of your codebase, while also making it easier to understand. These metrics can also be used to guide your development process, and to convince stakeholders of the need for improvement.

Installation

To install the package, use Composer to include it as a dev-dependency:

Usage

To calculate the stability of your components, run the following command:

Various arguments are also supported (don't worry, any invalid setup will guide you through the process anyway):

For example, you can specify a custom configuration file (as long as it is a supported format):

Configuration fields

There are various configuration fields that you can use to customise the analysis, all of which is explained in the sample configuration file.

You can do the following:

Be Creative

You don't have to restrict yourself to only one application source. You can also analyse your project at a higher (or lower) level of granularity!

For example, let's consider a modular monolith. You can:

Should you find something interesting or would like to analyse something specific, please share or contribute!

Features

* See the Roadmap for potential future features.

Stable Dependency Metrics

Stability uses the following metrics to evaluate the stability of components:

Abstractness (A)

Measures the ratio of abstract classes and interfaces to the total number of classes. A higher value indicates more abstract components.

Instability (I)

Measures the ratio of outgoing dependencies to the total number of dependencies. A higher value indicates more unstable components (i.e. components that are hard to change due to their high number of dependencies).

Distance from the Main Sequence (DMS)

Combines abstractness and instability to determine how far a component is from the ideal balance of being abstract and stable.

You can read more about the principles being applied in the CLEAN_ARCHITECTURE file.

Contributing

Contributions are welcome!

Please see the CONTRIBUTING file for more information.

License

This project is licensed under the MIT License — see the LICENSE file for details.

Credits & References

This project is largely inspired by the work of Robert C. Martin, who introduced the concept of stable dependency metrics in his book "Clean Architecture".

Also, shout out to Sergio Rodríguez for a good summary of the book that can be found here.

And lastly, thanks to Thiago Cordeiro for his mentorship and guidance in the development of this project.


All versions of php-stability-metrics with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3|^8.4
ext-json Version *
symfony/console Version ^6.0|^7.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 jcvviljoen/php-stability-metrics contains the following files

Loading the files please wait ....