Download the PHP package ux2dev/speedy without Composer

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

Speedy PHP SDK

Warning: Developer testing version of the library — use at your own risk.

Framework-agnostic PHP SDK for the Speedy courier API at https://api.speedy.bg/v1. Covers all ten Speedy service groups (Shipment, Print, Track, Pickup, Location, Calculate, Client, Validation, Services, Payments) as resource methods that return typed Response DTOs. Works with plain PHP or Laravel.

Requirements

Installation

Quick start — plain PHP

Quick start — Laravel

The package auto-registers SpeedyServiceProvider and a Speedy facade.

Publish the config:

Set credentials in .env:

Use the facade:

Multiple accounts

account() returns an immutable clone — the default stays untouched.

How the SDK is organised

Layer Location Purpose
Config Ux2Dev\Speedy\Config\SpeedyConfig Base URL + credentials, validated, password redacted
Transport Ux2Dev\Speedy\Http\SpeedyTransport PSR-18 dispatch, auth auto-injection, error mapping
Request DTOs Ux2Dev\Speedy\Dto\Request\{Group}\*Request Generated, toArray()
Response DTOs Ux2Dev\Speedy\Dto\Response\{Group}\*Response Generated, fromArray()
Model DTOs Ux2Dev\Speedy\Dto\Model\* Shared entities (Address, Office, Site, ...)
Resources Ux2Dev\Speedy\Resources\{Group} Generated, one method per operation
Root client Ux2Dev\Speedy\Speedy Aggregator
Laravel Ux2Dev\Speedy\Laravel\* Service Provider + multi-account Manager + Facade

Generated from bin/endpoints.json (a hand-curated catalog of 45 operations) plus bin/schemas/ (a snapshot of https://api.speedy.bg/v1/schema) by bin/generate.php.

Resources

10 generated resource groups, mirroring Speedy's service organisation:

Every resource method takes a Request DTO plus optional $language and $clientSystemId overrides, and returns a typed Response DTO:

Print Service

Print endpoints currently follow Speedy's documented JSON envelope (PrintVoucherResponse carries the PDF as a pdf byte-array). When you need the binary path directly, the SDK exposes Ux2Dev\Speedy\Http\PrintResult with body, contentType, filename, plus bytes(), saveTo($path), isPdf(), and isZpl() helpers.

Errors

Successful return paths always carry a "good" Response DTO. When the API responds with a populated error field, the transport throws Ux2Dev\Speedy\Exception\ApiException with structured fields (apiCode, apiMessage, context, errorId, component, httpStatus). The raw response body is intentionally not retained on the exception — the structured fields cover every documented error attribute, and dropping the body avoids leaking PII or credentials into logs and traces.

Exception When
ConfigurationException Invalid SpeedyConfig input or unknown Laravel account
TransportException PSR-18 client failure (network, timeout)
InvalidResponseException Empty body, malformed JSON, or unexpected envelope
ApiException Speedy returned a non-null error field

All extend SpeedyException.

Regenerating the SDK

Testing

The suite mocks a PSR-18 client to exercise every resource method end-to-end.

License

MIT


All versions of speedy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.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 ux2dev/speedy contains the following files

Loading the files please wait ...