Download the PHP package koh/sylius-acp without Composer

On this page you can find all versions of the php package koh/sylius-acp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sylius-acp

koh/sylius-acp

Agentic Commerce Protocol (ACP) for Sylius: the ACP cart service with a buyer handoff, a discovery document at /.well-known/acp.json, publication of the ACP product feed to agents, and a read-only catalogue endpoint for in-page tools.

Requires PHP 8.3 or later and Sylius 2.2 or 2.3.

Install

Register the bundle and the shared contracts bundle it builds on:

Import the routes:

Clear the cache and check that both endpoints answer:

Configure

Everything has a default; the file is only needed to change one:

Carts

Why carts and not checkout: an ACP checkout session is completed with payment_data for a payment handler and MUST create an order, and every handler ACP 2026-04-17 defines goes through delegate_payment. A shop without a payment provider for agents cannot offer that honestly. Carts carry no payment and are never completed through the API; continue_url hands them to a person.

Routes (fixed, like the feed):

Call Route
POST /api/agent/carts create
GET /api/agent/carts/{id} retrieve
PUT /api/agent/carts/{id} replace the lines
POST /api/agent/carts/{id}/cancel cancel, answers the last state
GET /acp-cart/{id} continue_url, opened by the buyer

ACP product feed

In ACP the Product Feed API is hosted by the agent: the merchant publishes to it, and agents must not call feed endpoints on merchants (RFC "Product Feeds", §3.1). This bundle therefore serves no ACP feed route; it builds the feed and hands it to the agent in either of the RFC's two publication models.

Contents, per channel and locale: every enabled product of the channel with a translation in the locale and at least one enabled variant priced in the channel. Each line validates against Product of ACP 2026-04-17 (schema.feed.json), metadata.json against FeedMetadata.

ACP field Sylius source
Product.id product code (the cart's product_id)
Product.title product name in the locale
Product.description.plain description, else short description; markup stripped, entities decoded
Product.url {channel hostname}/{locale}/products/{slug}
Product.media[] product images, main first: {hostname}{media_path_prefix}{path}
Variant.id variant code — the id the cart service accepts as line_items[].id
Variant.title variant name, else product name – option values
Variant.url the product URL
Variant.price channel price, minor units, channel base currency (EUR)
Variant.list_price channel original price, only when above the price
Variant.availability available and in_stock/out_of_stock, by the shop's stock check
Variant.categories[] product taxons as paths below the root, main taxon first, taxonomy merchant
Variant.condition ["new"]
Variant.variant_options[] option name and value in the locale, in the product's option order
Variant.media[] images attached to the variant
Variant.seller acp_feed.seller
FeedMetadata id = feed_id, target_country, updated_at = time of export

Not emitted, because Sylius has no source for them: barcodes, unit_price, marketplace, Variant.description.

Offline full replacement

Writes var/acp-feed/metadata.json and var/acp-feed/products.jsonl (one product per line). The catalogue is read in keyset batches and written as it is read, so memory stays flat for large catalogues. Both files are written under a temporary name and renamed into place. Uploading them is up to you: the agent's onboarding says where. A full replacement removes from the agent every product the snapshot does not contain.

API upsert

Run push from the scheduler of your choice, e.g. hourly.

Output

GET /.well-known/acp.json with carts on (validates against DiscoveryResponse of ACP 2026-04-17):

GET /api/agent/feed?page=1&limit=2 — the catalogue endpoint. A shop-specific shape for in-page tools, not ACP; agents that speak ACP get the catalogue from the feed published to them:

limit is clamped to 1…max_limit and page to at least 1; a page above max_page answers an empty list without a database query. The page is cut in the query (offset and row limit), so a crafted query string can neither pull the whole catalogue in one request nor make the database read it. limit counts products; count is the number of variants returned. Descriptions are plain text, at most 500 characters.

q narrows the feed to products whose name contains the term (in the channel's locale, enabled and in this channel only; at most 100 characters). Without it the feed lists the channel's latest products.

POST /api/agent/carts with {"line_items": [{"id": "T_SHIRT_M", "quantity": 2}]} (validates against Cart of ACP 2026-04-17, schema.cart.json):

The discovery document is cached for an hour, the catalogue endpoint for 15 minutes; cart answers are no-store.

Decommission

Remove the composer require, the config/bundles.php entry, the route import, config/packages/koh_acp.yaml and any schedule running koh:acp:feed:push. No database table and no cache pool of its own; agent carts are Sylius carts and expire with them.

Security

Report vulnerabilities privately — see SECURITY.md. Advisories are published as CSAF 2.0 at https://ole-hartwig.eu/.well-known/csaf/.

The family threat model, covering this package, is at https://github.com/ohartwig/sylius-agent-ready/blob/main/docs/threat-model.md.

Licence

MIT — see LICENSE.


All versions of sylius-acp with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
doctrine/orm Version ^2.18 || ^3.5
doctrine/persistence Version ^3.1 || ^4.0
koh/sylius-agent-contracts Version ^1.5
psr/cache Version ^2.0 || ^3.0
sylius/resource Version ^1.14.2
sylius/sylius Version ^2.2.9 || ^2.3.0
symfony/config Version ^7.4 || ^8.0
symfony/console Version ^7.4 || ^8.0
symfony/dependency-injection Version ^7.4 || ^8.0
symfony/event-dispatcher Version ^7.4 || ^8.0
symfony/event-dispatcher-contracts Version ^3.8.1
symfony/http-client-contracts Version ^3.8.1
symfony/http-foundation Version ^7.4 || ^8.0
symfony/http-kernel Version ^7.4 || ^8.0
symfony/rate-limiter Version ^7.4 || ^8.0
symfony/routing Version ^7.4 || ^8.0
symfony/serializer Version ^7.4 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package koh/sylius-acp contains the following files

Loading the files please wait ...