PHPackages                             biano/star-php - 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. biano/star-php

ActiveLibrary

biano/star-php
==============

1.0.0(3y ago)05PHPPHP &gt;= 7.4

Since Jun 8Pushed 3y ago2 watchersCompare

[ Source](https://github.com/BianoCZ/star-php)[ Packagist](https://packagist.org/packages/biano/star-php)[ RSS](/packages/biano-star-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Biano Star
==========

[](#biano-star)

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

[](#installation)

Install with [Composer](https://getcomposer.org/):

```
composer require biano/star-php

```

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

[](#requirements)

- This library uses [HTTPlug](http://httplug.io/) for HTTP client abstraction.
- This library uses [HTTP Factories](https://www.php-fig.org/psr/psr-17/) for manipulating HTTP requests.

You will need to install implementations of these abstraction layers to be able to use this library.

Create an order
---------------

[](#create-an-order)

```
use Biano\Star\Item;
use Biano\Star\Order;
use DateTimeImmutable;

$items = [
    new Item('item-1', 1, 1230.50),
    new Item('item-2', 3, 234.90),
];
$order = new Order('order-123', 1935.20, 'CZK', 'user@your-eshop.com', new DateTimeImmutable('+1 week'), ...$items);
```

The `Biano\Star\Item` constructor has the following signature: `public function __construct(string $id, int $quantity, float $unitPrice, ?string $name = null, ?string $image = null);`

- `$id` is your internal ID of the product, that you send to Biano in your product feed.
- `$quantity` is the quantity of this product in this order.
- `$unitPrice` is the price for one unit of this product.
- `$name` is an optional parameter with the name of the product.
- `$image` is an optional URL of an image of the product.

The `Biano\Star\Order` constructor has the following signature: `public function __construct(string $id, float $price, string $currency, ?string $customerEmail, ?DateTimeImmutable $shippingDate, Biano\Star\Item ...$items)`

- `$id` is your internal ID of this order.
- `$price` is the total price of this order.
- `$currency` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of this order.
- `$customerEmail` is the email of the customer. This parameter can be `null`, in which case the order won't be tracked by Biano Star.
- `$shippingDate` is the expected shipping date of this order. This parameter can be `null`, in which case you should then use alternative ways to specify the shipping date. For more information, consult the Biano Star manual.
- `$items` is an array of order items. Notice the usage of the spread operator (`...`), as this parameter is variadic.

Send order to Biano
-------------------

[](#send-order-to-biano)

```
use Biano\Star\Project;
use Biano\Star\Star;
use Biano\Star\Version;

$star = new Star($httpClient, $requestFactory, $streamFactory);
$response = $star->createPurchase(Project::cz(), Version::v1(), 'your-merchant-id', 'current-url', $order);
```

Choose the correct country of your eshop, supply a version parameter (currently only `v1` is supported), your eshop's Merchant ID, current URL of the page the order is being created at (this is usually something like the last step of your shopping cart, or the "Thank you" page on return from the payment gate), and the order.

Update the shipping date
------------------------

[](#update-the-shipping-date)

**This feature must be enabled by Biano. Contact your Biano partner first!**

```
use Biano\Star\Project;
use Biano\Star\Star;

$star = new Star($httpClient, $requestFactory, $streamFactory);
$response = $star->updateShippingDate(Project::cz(), 'your-merchant-id', 'order-123', new DateTimeImmutable('2022-06-08'));
```

Choose the correct country of your eshop, supply your eshop's Merchant ID, the order ID, and the new shipping date.

You can update the shipping date as many times as you want.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

1440d ago

### Community

Maintainers

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

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

---

Top Contributors

[![lookyman](https://avatars.githubusercontent.com/u/3863468?v=4)](https://github.com/lookyman "lookyman (5 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/biano-star-php/health.svg)

```
[![Health](https://phpackages.com/badges/biano-star-php/health.svg)](https://phpackages.com/packages/biano-star-php)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[league/uri

URI manipulation library

1.1k206.4M277](/packages/league-uri)[php-http/client-common

Common HTTP Client implementations and tools for HTTPlug

1.0k225.5M571](/packages/php-http-client-common)[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[kriswallsmith/buzz

Lightweight HTTP client

2.0k31.3M443](/packages/kriswallsmith-buzz)

PHPackages © 2026

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