Download the PHP package koh/sylius-ucp without Composer

On this page you can find all versions of the php package koh/sylius-ucp. 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-ucp

sylius-ucp

UCP adapter (Universal Commerce Protocol, Google/Shopify) for Sylius

Adapter for the Universal Commerce Protocol (UCP, ucp.dev) — the open agentic-commerce standard — against Sylius: the business profile, capability negotiation, catalog search and lookup over REST, and the permalink handoff into the buyer's cart.

What it serves

Route Method Purpose
/.well-known/ucp GET, HEAD UCP business profile (UCP 2026-08-25)
/ucp/v1/catalog/search POST dev.ucp.shopping.catalog.search
/ucp/v1/catalog/lookup POST dev.ucp.shopping.catalog.lookup, batch
/ucp/v1/catalog/product POST dev.ucp.shopping.catalog.lookup, one product in detail
/ucp/buy/{items} GET dev.ucp.shopping.permalink: 303 into the buyer's cart
/ucp/v1/openapi.json GET, HEAD OpenAPI description of the catalog routes

The profile is also announced in llms.txt and /.well-known/api-catalog when the corresponding koh bundles are installed.

The profile declares exactly these three capabilities. Checkout is not declared and not served: a UCP checkout is completed by the platform with a payment instrument through a payment handler the business declares, and a shop selling age-restricted goods takes no instrument from an agent — the purchase runs in the buyer's browser, behind the shop's own gates and payment provider. The permalink is the capability UCP defines for that handoff. payment_handlers is present and empty, as the schema requires. The shop signs nothing, so the profile publishes no keys.

Install

Requires PHP 8.3 or later and Sylius 2.2 or 2.3.

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

Import the routes:

The catalog routes under /ucp/v1/ need no session; the permalink route /ucp/buy does — it fills the buyer's cart — so it must stay in the shop firewall.

Configure

Container parameters, all optional, for what the configuration does not cover: koh_sylius_ucp.version (2026-08-25), koh_sylius_ucp.endpoint_base (/ucp/v1; changes what the profile announces, not where the routes listen), koh_sylius_ucp.profile_fetch_limit (20) and koh_sylius_ucp.profile_fetch_interval (1 minute).

Negotiation

Every catalog request must name its platform profile in UCP-Agent, an RFC 8941 dictionary:

The shop fetches and validates that profile, then checks the protocol version and the capability before it runs the operation:

Case Answer
no header, not a dictionary, no profile string, not https, credentials, a host resolving to a non-public address 400 invalid_profile_url
fetch failed: timeout, non-2xx, redirect 424 profile_unreachable
not JSON, larger than 256 KiB, not a UCP profile 422 profile_malformed
the shop's budget for unknown profiles is spent 503 profile_unreachable, Retry-After
ucp.version other than 2026-08-25 422 version_unsupported
the operation's capability not declared at 2026-08-25 200, UCP error response capabilities_incompatible

Transport errors carry {code, content, continue_url}; continue_url is the storefront. Capabilities whose schema URL fails UCP's authority binding are ignored.

The URL comes from an anonymous caller, so the fetch is fenced: https only, no redirects, every resolved address must be public (RFC 6890 ranges, including 100.64/10, 169.254/16, NAT64 and IPv4-mapped IPv6); 2 s to connect, 4 s in total; the body is cut at 256 KiB. Connecting directly, the connection is pinned to the checked address. If KOH_UCP_PROXY or, failing that, HTTPS_PROXY is set, the fetch goes through that proxy instead and ignores NO_PROXY; the pin cannot apply there, so the proxy has to refuse internal destinations itself. The own setting is for an egress proxy that admits only listed hosts and gives this fetch a port of its own. Profiles are cached in cache.app for five minutes and failures for one; at most 20 uncached fetches a minute across all workers (rate limiter on cache.app). Nothing is kept in service state, so FrankenPHP's worker mode needs no reset.

Catalog

Invalid requests answer 400 with the UCP error response (ucp.status: "error", invalid_request, path naming the member). Responses are Cache-Control: no-store.

Permalink

GET /ucp/buy/{items}?continue_to=/… where items is id:quantity[,id:quantity…] (ids raw if they match [A-Za-z0-9._-]+, otherwise ~ + base64url). The buyer opens it; each item goes into the buyer's own cart through sylius.cart_item_add, the event the shop's add-to-cart button fires, so the shop's gates (age confirmation, quantity rules) run as if the buyer had clicked. If a gate refuses, nothing is added and the buyer lands on the fallback route with a notice; the same link works once the gate is satisfied. The answer is always 303 with Cache-Control: no-store and Referrer-Policy: no-referrer; loading the link places no order. The handoff is CartHandoff from koh/sylius-agent-contracts, shared with ACP's continue_url: a gate signals a refusal with an exception implementing its CartGateRefusalInterface (any RuntimeException still counts unless koh_agent.cart_handoff.runtime_exception_is_refusal is off).

Upgrading

Decommission

Remove the composer require, the config/bundles.php entry, the route import and the configuration. Carts filled through permalinks are the buyers' own Sylius carts; nothing else is stored.

Security

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

Licence

MIT — see LICENSE.


Part of the AI Ready Platform (content commerce: Sylius × TYPO3). Status: basic skeleton.


All versions of sylius-ucp with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
koh/sylius-agent-contracts Version ^1.5
doctrine/orm Version ^2.18 || ^3.5
doctrine/persistence Version ^3.3 || ^4.0
psr/cache Version ^1.0 || ^2.0 || ^3.0
sylius/sylius Version ^2.2.9 || ^2.3.0
symfony/config Version ^6.4 || ^7.4
symfony/dependency-injection Version ^6.4 || ^7.4
symfony/event-dispatcher Version ^6.4 || ^7.4
symfony/event-dispatcher-contracts Version ^3.8.1
symfony/http-client Version ^6.4 || ^7.4 || ^8.0
symfony/http-client-contracts Version ^3.8.1
symfony/http-foundation Version ^6.4 || ^7.4
symfony/http-kernel Version ^6.4 || ^7.4
symfony/rate-limiter Version ^6.4 || ^7.4 || ^8.0
symfony/routing Version ^6.4 || ^7.4
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-ucp contains the following files

Loading the files please wait ...