Download the PHP package tmonier/sylius-digital-product-passport-plugin without Composer
On this page you can find all versions of the php package tmonier/sylius-digital-product-passport-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tmonier/sylius-digital-product-passport-plugin
More information about tmonier/sylius-digital-product-passport-plugin
Files in tmonier/sylius-digital-product-passport-plugin
Package sylius-digital-product-passport-plugin
Short Description Digital Product Passport plugin for Sylius 2: open and versioned sustainability data model (origin, recyclability, repairability), public passport page, no regulatory compliance promise
License MIT
Informations about the package sylius-digital-product-passport-plugin
Digital Product Passport Plugin for Sylius
🇫🇷 Version française
Open and versioned sustainability data model for Sylius 2 products: origin, recyclability, repairability, with a public passport page.
Important: This plugin provides a preparatory data model aligned with ESPR (EU) 2024/1781. It makes NO promise of regulatory compliance until delegated acts by product category are published.
Features
- Versioned data model: a passport per product variant (product identifier, origin of materials, recyclability, repairability), with a version number and a revision history (
PassportRevision, recorded byPassportRevisionService). - Public passport page:
/product-passport/{id}, readable without an account, in English and French, showing the data, the passport version and the date of the last update. A passport with no data filled in is treated as unpublished and returns a 404. - Link from the product page: a "Product Passport" link in the product summary of the shop, through the
sylius_shop.product.show.content.info.summaryTwig hook. - JSON export:
DigitalProductPassport::toJson()returns the passport with its schema version (schemaVersion). - GS1 Digital Link and QR code: when the passport product identifier is a valid GTIN (8, 12, 13 or 14 digits, check digit verified), the admin product edit page shows a "Labels" tab with the GS1 Digital Link (
https://id.gs1.org/01/{GTIN}) and its QR code (SVG). An invalid GTIN is reported in the tab. - Compatible spare parts (optional): when
tmonier/sylius-customer-asset-management-pluginis installed and the passport has an equipment model code, the public page lists the variants compatible with that equipment model, with a link to their product page; a disabled product is listed as unavailable, without link. Without that plugin, the block is not shown. - Passport on the machine page (optional, customer-asset-management ^0.2.1): on the page of a machine of the customer's fleet, a block links to the published passport of its equipment model (same equipment model code) and lists its compatible spare parts. A model without a published passport shows no block.
Planned for later versions: an admin interface to edit passports, SVG and PNG download of the QR code, more data fields.
Installation
Enable the plugin in config/bundles.php:
Import the routes, for example in config/routes/tmonier_digital_product_passport.yaml:
Run the migrations:
Usage
There is no admin screen to edit passports yet: passports are created in code (fixtures, import or a command of your own), for example:
The product page then links to the public page /product-passport/{id}.
Screenshots
Public product passport page, as rendered in the Sylius B2B demo. Labels follow the shop locale; field values are stored as entered.
Requirements
- PHP 8.2 or higher
- Sylius 2.2.9+ or 2.3+
- Symfony 7.4 or 8.0 (tested in CI)
Development
Regulatory Context
This plugin anticipates the Digital Product Passport obligation from ESPR (EU) 2024/1781:
- Batteries: February 18, 2027 (Regulation (EU) 2023/1542, Art. 77)
- Other categories: indicative roadmap (textiles Q4 2027, furniture 2028, etc.)
Disclaimer: This plugin provides a preparatory data structure. It makes NO guarantee of regulatory compliance until delegated acts define the exact data requirements for each product category.
Author
Thibaut Monier – AI Delivery Manager / Tech Lead
License
MIT License. See LICENSE for details.