PHPackages                             dvdoug/boxpacker - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. dvdoug/boxpacker

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

dvdoug/boxpacker
================

An implementation of the 3D (actually 4D) bin packing/knapsack problem (aka creating parcels by putting items into boxes)

4.1.1(10mo ago)6522.7M—6.8%165[39 issues](https://github.com/dvdoug/BoxPacker/issues)17MITPHPPHP ^8.2CI passing

Since Jul 28Pushed 3mo ago39 watchersCompare

[ Source](https://github.com/dvdoug/BoxPacker)[ Packagist](https://packagist.org/packages/dvdoug/boxpacker)[ Docs](https://boxpacker.io/)[ GitHub Sponsors](https://github.com/dvdoug)[ RSS](/packages/dvdoug-boxpacker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (92)Used By (17)

BoxPacker
=========

[](#boxpacker)

[![Build Status](https://github.com/dvdoug/BoxPacker/workflows/CI/badge.svg?branch=master)](https://github.com/dvdoug/BoxPacker/actions?query=workflow%3ACI+branch%3Amaster)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/35b88393903ba53de0467244cbc8d1971302e19c5c94ed047a2927b892b779b7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6476646f75672f426f785061636b65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dvdoug/BoxPacker/?branch=master)[![Download count](https://camo.githubusercontent.com/0882d3a471549012067e264260784c9975caf1be1926d1e3460b6a8c6d02560c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6476646f75672f626f787061636b65722e737667)](https://packagist.org/packages/dvdoug/boxpacker)[![Current version](https://camo.githubusercontent.com/819de336bc554a20123272625bde1a792edd2b99135ac74a2c148df9a2eeec9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6476646f75672f626f787061636b65722e737667)](https://packagist.org/packages/dvdoug/boxpacker)[![Documentation](https://camo.githubusercontent.com/f6681940cd4047dff44facc25bded67a3b1016fcae32970586a9a9a90aa9e31d/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f626f787061636b65722f62616467652f3f76657273696f6e3d737461626c65)](https://www.boxpacker.io/en/stable/)

An implementation of the "4D" bin packing/knapsack problem i.e. given a list of items, how many boxes do you need to fit them all in taking into account physical dimensions and weights.

Especially useful for e.g. e-commerce contexts when you need to know box size/weight to calculate shipping costs, or even just want to know the right number of labels to print.

See [documentation](https://boxpacker.io/) for more details.

License
-------

[](#license)

BoxPacker is MIT-licensed.

###  Health Score

70

—

ExcellentBetter than 100% of packages

Maintenance68

Regular maintenance activity

Popularity65

Solid adoption and visibility

Community40

Growing community involvement

Maturity91

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 93.6% 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 ~48 days

Recently: every ~149 days

Total

91

Last Release

301d ago

Major Versions

2.7.0 → 3.6.02020-04-26

2.7.1 → 3.6.12020-06-11

1.7.3 → 2.7.22020-09-28

2.7.2 → 3.6.22020-09-28

3.12.1 → 4.0.02023-12-04

PHP version history (6 changes)0.1PHP &gt;=5.3.0

1.0PHP &gt;=5.4.0

3.0.0PHP ^7.1

1.7.3PHP ^7.1||^8.0

3.12.0PHP ^7.4||^8.0

4.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bbb34b74a2b5e65b0c67011c6c5339eedc29e6b95d46428ad1044f021f0bbab?d=identicon)[dvdoug](/maintainers/dvdoug)

---

Top Contributors

[![dvdoug](https://avatars.githubusercontent.com/u/1571110?v=4)](https://github.com/dvdoug "dvdoug (977 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (44 commits)")[![colinmollenhour](https://avatars.githubusercontent.com/u/38738?v=4)](https://github.com/colinmollenhour "colinmollenhour (7 commits)")[![IBBoard](https://avatars.githubusercontent.com/u/388582?v=4)](https://github.com/IBBoard "IBBoard (4 commits)")[![Gemorroj](https://avatars.githubusercontent.com/u/885731?v=4)](https://github.com/Gemorroj "Gemorroj (3 commits)")[![Cosmologist](https://avatars.githubusercontent.com/u/966525?v=4)](https://github.com/Cosmologist "Cosmologist (2 commits)")[![bram123](https://avatars.githubusercontent.com/u/7457368?v=4)](https://github.com/bram123 "bram123 (2 commits)")[![radamich](https://avatars.githubusercontent.com/u/5845281?v=4)](https://github.com/radamich "radamich (1 commits)")[![dobecker](https://avatars.githubusercontent.com/u/14109475?v=4)](https://github.com/dobecker "dobecker (1 commits)")[![Garbee](https://avatars.githubusercontent.com/u/868301?v=4)](https://github.com/Garbee "Garbee (1 commits)")[![joachimdeboer](https://avatars.githubusercontent.com/u/5341133?v=4)](https://github.com/joachimdeboer "joachimdeboer (1 commits)")[![acabala](https://avatars.githubusercontent.com/u/530622?v=4)](https://github.com/acabala "acabala (1 commits)")

---

Tags

binpackingboxpackerknapsack-problemphpcontainerboxshippingpackagingknapsackboxespackingbinpackingbin packingboxpackingparcelparcelpacking

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/dvdoug-boxpacker/health.svg)

```
[![Health](https://phpackages.com/badges/dvdoug-boxpacker/health.svg)](https://phpackages.com/packages/dvdoug-boxpacker)
```

###  Alternatives

[psr/container

Common Container Interface (PHP FIG PSR-11)

10.0k1.0B3.7k](/packages/psr-container)[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[league/container

A fast and intuitive dependency injection container.

86787.8M343](/packages/league-container)[cspray/annotated-container

Create Dependency Injection containers configured with PHP8 Attributes.

411.3k5](/packages/cspray-annotated-container)

PHPackages © 2026

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