PHPackages                             ayeo/gs1 - 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. ayeo/gs1

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

ayeo/gs1
========

Support for GS1 system

1.1.0(10y ago)616.1k↑368.8%2[1 issues](https://github.com/ayeo/gs1/issues)MITPHPPHP &gt;=5.4.0

Since May 28Pushed 10y ago3 watchersCompare

[ Source](https://github.com/ayeo/gs1)[ Packagist](https://packagist.org/packages/ayeo/gs1)[ Docs](https://github.com/ayeo/gs1)[ RSS](/packages/ayeo-gs1/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

GS1 support
===========

[](#gs1-support)

Library supports gs1 systems. Provides ability to generate logistic labels and impose usage of valid gs1 objects. All functionality is availaible through Gs1Facade object. Library takes care about generating barcode, sscc numbers and calculating check digits.

Company and Location objects
============================

[](#company-and-location-objects)

Library is delivered only with location and company interfaces. You must use your own objects. That is done for purpose ypu probably want to work with existing classes. Example implementation below:

```
class MyCustomCompany implements CompanyInterface
{
    public function getGcp()
    {
       return new Model\Gcp('123456');
    }

    public function getName()
    {
       return "My Custom Name";
    }

    public function getLocation()
    {
        $location = new MyCustomLocation();
    }
}
```

```
class MyCustomLocation implements LocationInterface
{
    public function getAddress()
    {
        $address = new Model\Address;
        $address->streetName = 'Secret Avenue';
        $address->buildingNumber = 10;
        $address->countryName = "England";
        $address->postcode = 'NG10 5GH';
    }

    public function getLocationNumber()
    {
        return '00';
    }

    public function getTelephoneNumber()
    {
        return '560 560 506';
    }

    public function getFaxNumber()
    {
        return '';
    }

    public function getWebsiteAddress()
    {
        return 'ayeo.pl';
    }
}
```

Content object
==============

[](#content-object)

```
$content = new Model\Content;
$content->setName('test product');
$content->setBatchSymbol('abc12345');
$content->setGrossWeight(2);
$content->setGtin('1234512345123');
$content->setQuantity(120);
$content->setBestBefore(new DateTime);
```

Example use
===========

[](#example-use)

```
$gs1 = new Gs1Facade($company);
$label = $gs1->buildLabel($content, $orderNumber = '000102', $logicticCounter = 232);
```

Label contains all nessecary data such as SSCC, barcode, GTIN, full company data etc

Custom Barcode structure
========================

[](#custom-barcode-structure)

See code (docs to do)

###  Health Score

33

—

LowBetter than 76% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

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

Total

4

Last Release

3704d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e19f24a709e451d9017d8748a8f42a03a3974a9ab065aeda950ec96b229d7f4?d=identicon)[ayeo](/maintainers/ayeo)

---

Top Contributors

[![ayeo](https://avatars.githubusercontent.com/u/60191?v=4)](https://github.com/ayeo "ayeo (9 commits)")[![maureis](https://avatars.githubusercontent.com/u/6088053?v=4)](https://github.com/maureis "maureis (2 commits)")

---

Tags

gcpgs1ssccglnlogistic label

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ayeo-gs1/health.svg)

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

###  Alternatives

[ronanguilloux/isocodes

PHP library - Validators for standards from ISO, International Finance, Public Administrations, GS1, Book and Music Industries, Phone numbers &amp; Zipcodes for many countries

8103.3M23](/packages/ronanguilloux-isocodes)[kreait/gcp-metadata

Get the metadata from a Google Cloud Platform environment.

664.8M1](/packages/kreait-gcp-metadata)[ayeo/gs1_barcode

Generate GS1-128 standard barcode

52109.8k](/packages/ayeo-gs1-barcode)[asinfotrack/yii2-audittrail

Yii2-audittrail is a behavior and a set of widgets to track all modifications performed on a model

1626.9k](/packages/asinfotrack-yii2-audittrail)

PHPackages © 2026

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