Installation
Install the package with Composer:
composer require renfordt/unit-lib
Requirements
- PHP 8.4 or higher.
The library has no runtime dependencies beyond PHP itself. The development dependencies (PHPUnit, PHPStan, Rector, Pint) are only needed when working on the library, not when consuming it.
Autoloading
Classes are registered under the Renfordt\UnitLib\ namespace using PSR-4 autoloading.
After installation, the classes are available through Composer's autoloader:
require 'vendor/autoload.php';
use Renfordt\UnitLib\Length;
$length = new Length(100, 'm');