PHPackages                             jmusila/unit-conversions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jmusila/unit-conversions

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jmusila/unit-conversions
========================

Perform unit conversions in PHP

1.1.1(4y ago)08MITPHPPHP ^8

Since Sep 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jmusila/unit-conversions)[ Packagist](https://packagist.org/packages/jmusila/unit-conversions)[ Docs](https://github.com/jmusila/unit-conversions)[ RSS](/packages/jmusila-unit-conversions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

Perform unit conversions in PHP
===============================

[](#perform-unit-conversions-in-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/af2a2b94731beb0ca14242e0e6601ce47d3600d02225e64c7eaf9bdf4cad2c5d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6d7573696c612f756e69742d636f6e76657273696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jmusila/unit-conversions)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9cd437be65622e93be2d4b398d5fddba367f07b8eaecb2b4e3a3e977f03d32f0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6a6d7573696c612f756e69742d636f6e76657273696f6e732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/jmusila/unit-conversions/actions?query=workflow%3ATests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/4eefb9393543cd9554db2c350b5279be19a1a36d5e3416e7b4df08f166c1c538/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6a6d7573696c612f756e69742d636f6e76657273696f6e732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/jmusila/unit-conversions/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/f8bbbd5636fc87bcc4c08cfb05a80f8c345034d2fc919c243e385841feccd2a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6d7573696c612f756e69742d636f6e76657273696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jmusila/unit-conversions)

---

This package can be used as to scaffold a framework agnostic package. Follow these steps to get started:

1. Press the "Use template" button at the top of this repo to create a new repo with the contents of this skeleton
2. Run "php ./configure.php" to run a script that will replace all placeholders throughout all the files
3. Have fun creating your package.
4. If you need help creating a package, consider picking up our [Laravel Package Training](https://laravelpackage.training) video course.

---

This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require jmusila/unit-conversions
```

Usage
-----

[](#usage)

```
use Jmusila\UnitConversions\Weight;

Weight::fromKilograms(100)->toTons(); // returns 0.1;
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Jonathan Musila](https://github.com/jmusila)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1692d ago

PHP version history (2 changes)1.0.0PHP ^7.4

1.0.1PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fe0c133fe0b7121de2d14b4621855de52b6296ebb67ba66f0a2b89fd3fe6919?d=identicon)[jmusila](/maintainers/jmusila)

---

Top Contributors

[![jmusila](https://avatars.githubusercontent.com/u/42172425?v=4)](https://github.com/jmusila "jmusila (21 commits)")

---

Tags

unit-conversionsjmusila

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jmusila-unit-conversions/health.svg)

```
[![Health](https://phpackages.com/badges/jmusila-unit-conversions/health.svg)](https://phpackages.com/packages/jmusila-unit-conversions)
```

###  Alternatives

[spatie/unit-conversions

Perform unit conversions in PHP

343.5k](/packages/spatie-unit-conversions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
