PHPackages                             stefandoorn/3dbinpacking-php-api - 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. [API Development](/categories/api)
4. /
5. stefandoorn/3dbinpacking-php-api

AbandonedLibrary[API Development](/categories/api)

stefandoorn/3dbinpacking-php-api
================================

3dbinpacking.com PHP API

0.5(9y ago)31.9kMITPHPPHP &gt;=5.5

Since Oct 28Pushed 8y ago2 watchersCompare

[ Source](https://github.com/stefandoorn/3dbinpacking-php-api)[ Packagist](https://packagist.org/packages/stefandoorn/3dbinpacking-php-api)[ RSS](/packages/stefandoorn-3dbinpacking-php-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (9)Used By (0)

Note: this package is not maintained anymore and will be abandoned. If you would like to take over, please let me know through the issues.
------------------------------------------------------------------------------------------------------------------------------------------

[](#note-this-package-is-not-maintained-anymore-and-will-be-abandoned-if-you-would-like-to-take-over-please-let-me-know-through-the-issues)

3dbinpacking.com PHP API Wrapper
================================

[](#3dbinpackingcom-php-api-wrapper)

[![Build Status](https://camo.githubusercontent.com/2f08db977ce6931c24de07f1a9094c33d48337af3685da1d26e57331dbe6dd07/68747470733a2f2f6170692e7472617669732d63692e6f72672f73746566616e646f6f726e2f336462696e7061636b696e672d7068702d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/stefandoorn/3dbinpacking-php-api)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b6cd3a996379535583da7682bb5bb95cfba19389f96aac0196154e9560c8232e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73746566616e646f6f726e2f336462696e7061636b696e672d7068702d6170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stefandoorn/3dbinpacking-php-api/?branch=master)[![Test Coverage](https://camo.githubusercontent.com/bba945dbd06f5554c4ec30d0ff82c3f350f566c81927ce85842ee9b499f5c434/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73746566616e646f6f726e2f336462696e7061636b696e672d7068702d6170692f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/stefandoorn/3dbinpacking-php-api/coverage)[![Code Climate](https://camo.githubusercontent.com/7ee8a743e5d7833d3c98f607f5079fc8b1cbca6f8eaab3abe2e958d41180136a/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73746566616e646f6f726e2f336462696e7061636b696e672d7068702d6170692f6261646765732f6770612e737667)](https://codeclimate.com/github/stefandoorn/3dbinpacking-php-api)[![StyleCI](https://camo.githubusercontent.com/38bae3843773818f3255f60b26a8db82cd4fd8924716c23cf7ad5ae63b1735be/68747470733a2f2f7374796c6563692e696f2f7265706f732f34353132323536332f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/45122563)[![Latest Stable Version](https://camo.githubusercontent.com/f68582ca3bbd5519ac610606c0abc80425dadd36f3f3adf6afd721ec1a42918d/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746566616e646f6f726e2f336462696e7061636b696e672d7068702d6170692e7376673f7374796c653d666c6174)](https://packagist.org/packages/stefandoorn/3dbinpacking-php-api)[![Total Downloads](https://camo.githubusercontent.com/09e138a029004a34b5a6ef4a4dff1ef38a5639a33b8f71220c6e2b5056721133/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746566616e646f6f726e2f336462696e7061636b696e672d7068702d6170692e7376673f7374796c653d666c6174)](https://packagist.org/packages/stefandoorn/3dbinpacking-php-api)[![License](https://camo.githubusercontent.com/41a1fef7f8dad918859bf1c8ad87ae05ef66d19d6972672532fdd4a3b57a3466/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73746566616e646f6f726e2f336462696e7061636b696e672d7068702d6170692e7376673f7374796c653d666c6174)](https://packagist.org/packages/stefandoorn/3dbinpacking-php-api)

This library acts as a PHP wrapper around the API available at [3dbinpacking.com](http://www.3dbinpacking.com).

WARNING: this package is abandoned and will not receive support. It will stay available on GH.
==============================================================================================

[](#warning-this-package-is-abandoned-and-will-not-receive-support-it-will-stay-available-on-gh)

Table Of Content
----------------

[](#table-of-content)

1. [Requirements](#requirements)
2. [Installation](#installation)
3. [Example](#example)
4. [License](#license-section)

Requirements
------------

[](#requirements)

This library uses PHP 5.5+.

To use the 3dbinpacking.com API Wrapper, you have to [request an access key from 3dbinpacking.com](http://www.3dbinpacking.com). For every request, you will have to provide the username &amp; API Key.

Note: this service is **NOT** free of usage.

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

[](#installation)

It is recommended that you install the library [through composer](http://getcomposer.org/). To do so, run the Composer command to install the latest stable version of the API wrapper:

```
composer require stefandoorn/3dbinpacking-php-api
```

Example
-------

[](#example)

```
// Build packing request
$request = new \BinPacking3d\Entity\Request();

$bin = new \BinPacking3d\Entity\Bin();
$bin->setWidth(100);
$bin->setHeight(120);
$bin->setDepth(130);
$bin->setMaxWeight(10);
$bin->setOuterWidth(110);
$bin->setOuterHeight(130);
$bin->setOuterDepth(140);
$bin->setWeight(0.1);
$bin->setIdentifier('Test');
$bin->setInternalIdentifier(1);
$request->addBin($bin);

// Item
$item = new \BinPacking3d\Entity\Item();
$item->setWidth(50);
$item->setHeight(60);
$item->setDepth(70);
$item->setWeight(5);
$item->setItemIdentifier('Test');
$item->setProduct(['product_id' => 1]);
$request->addItem($item);

// Set extra info
$request->setApiKey('API KEY');
$request->setUsername('USERNAME');

// Perform request and get results
$boxes = $packIntoMany->run();

// Process result, in here we get all the packed boxes including the items per box
foreach ($boxes->yieldBins() as $packedBox) {
    // Get weight of box
    $weight = $packedBox->getUsedWeight();

    // Get dimensions
    $height = $packedBox->getOuterHeight();
    $width = $packedBox->getOuterWidth();
    $depth = $packedBox->getOuterDepth();

    // Get identifier
    $identifier = $packedBin->getIdentifier();

    // Get items in this box
    foreach ($packedBox->yieldItems() as $item) {
    	// Get additional product data supplied (e.g. IDs, SKUs, etc)
    	$product = $item->getProduct();

    	// Add to database etc...
    }
}

```

Optional you can add a [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) compatible logger to the Request object:

```
$log = new \Monolog\Logger('binpacking');
$log->pushHandler(new \Monolog\Handler\StreamHandler('binpacking.log', \Monolog\Logger::DEBUG));

```

Optional you can add a Cache driver compatible with [doctrine/cache](https://github.com/doctrine/cache), e.g.:

```
$cacheDriver = new \Doctrine\Common\Cache\RedisCache();
$redis = new Redis;
$redis->connect($redisHost);
$cacheDriver->setRedis($redis);
$packIntoMany->setCache($cacheDriver);

```

License
-------

[](#license)

3dbinpacking.com API Wrapper is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83% 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 ~66 days

Total

5

Last Release

3589d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b7e3e1dbf1349563371dca037785c04abe3865e7b3c9e88f8493ecadad571911?d=identicon)[stefandoorn](/maintainers/stefandoorn)

---

Top Contributors

[![stefandoorn](https://avatars.githubusercontent.com/u/4903082?v=4)](https://github.com/stefandoorn "stefandoorn (44 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (6 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (3 commits)")

---

Tags

phpapibin packing3d3dbinpacking

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stefandoorn-3dbinpacking-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/stefandoorn-3dbinpacking-php-api/health.svg)](https://phpackages.com/packages/stefandoorn-3dbinpacking-php-api)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[resend/resend-php

Resend PHP library.

574.7M21](/packages/resend-resend-php)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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