Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.3.0] - 2026-09-09

### Added

- First-class Trailers service and resource, covering creation, retrieval, queries, updates, deletion, tracking, vehicle attachment and detachment, and connection history.
- `vehicles->listVehicleTrailers()` and Equipment `attachEquipment()` / `detachEquipment()` actions.

### Changed

- Updated the locked Postman contract and executable PHP catalog from 241 to 264 requests, including all trailer and equipment scenarios.
- Trailer scenarios reuse the canonical Device and Equipment methods; vehicle trailer listings belong to VehicleService.
- Updated the disposable Fleetbase stack and package pins to include the Trailers API.

### Fixed

- Contract tests now use canonical placeholder names for legacy envelopes when scenario URLs spell the same identifier differently.
- Restored the complete PHP example catalog required by the website's Postman submodule update.

## [1.2.0] - 2026-09-06

### Added
Expand Down Expand Up @@ -88,7 +106,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Latest baseline whose public API is explicitly preserved by 1.1.0.


[Unreleased]: https://github.com/fleetbase/fleetbase-php/compare/1.2.0...HEAD
[Unreleased]: https://github.com/fleetbase/fleetbase-php/compare/1.3.0...HEAD
[1.3.0]: https://github.com/fleetbase/fleetbase-php/compare/1.2.0...1.3.0
[1.2.0]: https://github.com/fleetbase/fleetbase-php/compare/1.1.2...1.2.0
[1.1.2]: https://github.com/fleetbase/fleetbase-php/compare/1.1.1...1.1.2
[1.1.1]: https://github.com/fleetbase/fleetbase-php/compare/1.1.0...1.1.1
Expand Down
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![Downloads](https://img.shields.io/packagist/dt/fleetbase/fleetbase-php.svg)](https://packagist.org/packages/fleetbase/fleetbase-php)
[![License: AGPL-3.0-or-later](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue.svg)](LICENSE)

The official PHP client for the [Fleetbase API](https://fleetbase.io/docs/api). It supports Fleetbase Cloud and self-hosted installations, offers explicit methods for all 220 locked Fleetbase and Core API requests, and retains the public API used by the 1.0.x SDK.
The official PHP client for the [Fleetbase API](https://fleetbase.io/docs/api). It supports Fleetbase Cloud and self-hosted installations, covers all 264 locked Fleetbase and Core API requests, and retains the public API used by earlier SDK releases.

Version 1.1.0 changed the license to `AGPL-3.0-or-later`. Published 1.0.x tags remain under the MIT license shipped with those releases. Review the [migration guide](docs/migration-guide.md) before upgrading.

Expand Down Expand Up @@ -54,7 +54,7 @@ echo $place->id;

Never commit an API key. Load it from your runtime secret manager or environment.

Existing property access remains supported (`$fleetbase->orders`). Explicit accessors such as `$fleetbase->orders()` are available for static analysis and dependency injection. Browse [all 220 generated PHP examples](docs/api-examples.md); CI executes each exact snippet against a hermetic transport.
Existing property access remains supported (`$fleetbase->orders`). Explicit accessors such as `$fleetbase->orders()` are available for static analysis and dependency injection. Browse [all 264 generated PHP examples](docs/api-examples.md); CI executes each exact snippet against a hermetic transport.

### Endpoint arguments

Expand All @@ -81,6 +81,32 @@ $manifests = $fleetbase->drivers->listDriverManifests($driverId, [

Methods with two URL identifiers take both identifiers before the data array, for example `capturePhotoForOrder($orderId, $subjectId, $data, $requestOptions)`. Collection methods take data first and request options second. The published 1.1.0 envelope form remains supported, including named `parameters:` and `options:` arguments, but new documentation uses the positional/direct form.

### Trailers

Version 1.3.0 adds first-class trailers and equipment attachment actions:

```php
$trailer = $fleetbase->trailers->create([
'name' => 'Refrigerated trailer',
'type' => 'reefer',
'status' => 'available',
]);

$connection = $fleetbase->trailers->attachTrailerToVehicle($trailer->id, [
'vehicle' => $vehicleId,
'position' => 1,
]);
$fleetbase->trailers->trackTrailer($trailer->id, [
'latitude' => 1.29027,
'longitude' => 103.851959,
]);
$history = $fleetbase->trailers->listTrailerConnections($trailer->id);
$trailers = $fleetbase->vehicles->listVehicleTrailers($vehicleId);
$fleetbase->trailers->detachTrailerFromVehicle($trailer->id);
```

Attach devices and equipment through their own services, using `attachDevice($deviceId, $data)` and `attachEquipment($equipmentId, $data)`. Standard trailer CRUD also supports `createTrailer`, `retrieveTrailer`, `queryTrailers`, `updateTrailer`, and `deleteTrailer`.

## Configuration

The second constructor argument accepts client configuration. The third legacy argument retains the debug flag without printing requests or credentials.
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"@api:snapshot",
"@php tools/check-api-compatibility.php --baseline=contracts/public-api-1.0.2.json --current=build/contracts/public-api-current.json",
"@php tools/check-api-compatibility.php --baseline=contracts/public-api-1.0.3.json --current=build/contracts/public-api-current.json",
"@php tools/check-api-compatibility.php --baseline=contracts/public-api-1.1.0.json --current=build/contracts/public-api-current.json"
"@php tools/check-api-compatibility.php --baseline=contracts/public-api-1.1.0.json --current=build/contracts/public-api-current.json",
"@php tools/check-api-compatibility.php --baseline=contracts/public-api-1.2.0.json --current=build/contracts/public-api-current.json"
],
"check": [
"@lint",
Expand Down
24 changes: 12 additions & 12 deletions contracts/contract-lock.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"schema_version": 1,
"generated_at": "2026-09-06",
"generated_at": "2026-09-09",
"sdk_baselines": {
"required_compatibility": {
"version": "1.0.2",
"git_ref": "1.0.2",
"commit": "569fe88e0359d567f30588820243d1d69ab418ec"
},
"latest_published": {
"version": "1.1.0",
"git_ref": "1.1.0",
"commit": "e48d2ca1556a383edd7b7c882ad20594311f10c2"
"version": "1.2.0",
"git_ref": "1.2.0",
"commit": "3e8cf88e080936b5cf3eb8c13dd2f88d040c75bd"
}
},
"sources": {
"fleetbase_stack": {
"repository": "https://github.com/fleetbase/fleetbase",
"ref": "origin/main",
"commit": "699ceffef9c3a503d30fcc064da486469fd7ca4b",
"core_api_submodule": "b7691c06ffdfe8f8874352e746aa8e523d5e3531",
"fleetops_submodule": "e3b8cf9833e9d0fb245f5d339a970e3ef0e36985"
"commit": "2612278517a56e5389e98c8fd08648e583c87226",
"core_api_submodule": "4c763ce293d2e794f9260aca11fb4b52413a74ac",
"fleetops_submodule": "2980fb39cd4ff58442d287907849efea3a2805ba"
},
"postman": {
"repository": "https://github.com/fleetbase/postman",
"ref": "origin/main",
"commit": "9b59befdc1b4623ba40bf5661bd5e88f1dac673e",
"commit": "7fe06b7c5e415a9aa292869e9037910896b049ad",
"scope": [
"Fleetbase API",
"Fleetbase Core API"
],
"expected_requests": 241,
"expected_groups": 36
"expected_requests": 264,
"expected_groups": 37
},
"core_api": {
"repository": "https://github.com/fleetbase/core-api",
"ref": "origin/main",
"commit": "b7691c06ffdfe8f8874352e746aa8e523d5e3531"
"commit": "4c763ce293d2e794f9260aca11fb4b52413a74ac"
},
"fleetops": {
"repository": "https://github.com/fleetbase/fleetops",
"ref": "origin/main",
"commit": "e3b8cf9833e9d0fb245f5d339a970e3ef0e36985"
"commit": "2980fb39cd4ff58442d287907849efea3a2805ba"
}
}
}
Loading
Loading