PHPackages                             webfleet-connect/php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. webfleet-connect/php-sdk

ActiveLibrary

webfleet-connect/php-sdk
========================

A typed community PHP SDK for the WEBFLEET.connect API

0.1.0(yesterday)00MITPHPPHP ^8.3CI passing

Since Jul 23Pushed yesterdayCompare

[ Source](https://github.com/ivashchukk/webfleet-connect-php-sdk)[ Packagist](https://packagist.org/packages/webfleet-connect/php-sdk)[ RSS](/packages/webfleet-connect-php-sdk/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (7)Versions (3)Used By (0)

Webfleet Connect PHP SDK
========================

[](#webfleet-connect-php-sdk)

An unofficial, typed PHP 8.3+ client for the WEBFLEET.connect CSV/JSON API. The first release focuses on driver trips, logbooks, and historical GPS coordinates.

The SDK follows the current Webfleet authentication model: the username and password are sent with HTTP Basic Auth. They are never added to the request URL. Account and API key remain API query parameters as required by Webfleet.

Installation
------------

[](#installation)

```
composer require webfleet-connect/php-sdk
```

Create a client
---------------

[](#create-a-client)

```
use Webfleet\Connect\Credentials;
use Webfleet\Connect\WebfleetClient;

$client = WebfleetClient::create(new Credentials(
    account: 'company-account',
    username: 'api-user',
    password: 'secret',
    apiKey: 'api-key',
));
```

Credentials can also be loaded explicitly from `WEBFLEET_CONNECT_ACCOUNT`, `WEBFLEET_CONNECT_USERNAME`, `WEBFLEET_CONNECT_PASSWORD`, and `WEBFLEET_CONNECT_APIKEY`:

```
$client = WebfleetClient::create(Credentials::fromEnvironment());
```

Historical coordinates
----------------------

[](#historical-coordinates)

Coordinates are preserved in Webfleet's integer microdegree format. `GeoPoint::latitude()` and `longitude()` return regular decimal degrees.

```
use Webfleet\Connect\Query\TracksQuery;
use Webfleet\Connect\Value\DateRange;
use Webfleet\Connect\Value\ObjectIdentifier;

$object = ObjectIdentifier::number('VEHICLE-01');
$range = new DateRange(
    new DateTimeImmutable('2026-07-20T00:00:00+00:00'),
    new DateTimeImmutable('2026-07-21T00:00:00+00:00'),
);

foreach ($client->tracks(new TracksQuery($object, $range)) as $point) {
    echo $point->recordedAt?->format(DATE_ATOM), ' ',
        $point->position?->latitude(), ', ',
        $point->position?->longitude(), PHP_EOL;
}
```

Webfleet limits one `showTracks` request to 48 hours. For a longer range, use the lazy iterator. It divides requests into valid windows, removes overlap duplicates, and applies the documented request limit:

```
foreach ($client->trackHistory($object, $longRange) as $point) {
    // Points are fetched and yielded one window at a time.
}
```

Logbook and driver trips
------------------------

[](#logbook-and-driver-trips)

`showLogbook` contains the current logbook state, including driver information and trip start/end coordinates. `showLogbookHistory` is the audit history of manual edits; it is not GPS history.

```
use Webfleet\Connect\Query\LogbookHistoryQuery;
use Webfleet\Connect\Query\LogbookQuery;

$entries = $client->logbook(LogbookQuery::forObject($object, $range));
$changes = $client->logbookHistory(LogbookHistoryQuery::forObject($object, $range));
```

For a direct driver-filtered trip report:

```
use Webfleet\Connect\Query\TripQuery;
use Webfleet\Connect\Value\DriverIdentifier;

$trips = $client->trips(TripQuery::forDriver(
    DriverIdentifier::number('DRIVER-01'),
    $range,
));
```

Driver trip reports are limited to one request per minute. A range over one calendar month also requires an object number. The query objects validate these restrictions before a request is sent.

Lookups and raw actions
-----------------------

[](#lookups-and-raw-actions)

```
$drivers = $client->drivers();
$objects = $client->fleetObjects();

$raw = $client->request('showStandStills', [
    'objectno' => 'VEHICLE-01',
    ...$range->toParameters(),
]);

foreach ($raw->rows as $row) {
    // Exact Webfleet field names and values.
}
```

The raw escape hatch sends GET requests. It does not provide typed mutation methods or POST payload support in version 0.1.

HTTP clients and rate limiting
------------------------------

[](#http-clients-and-rate-limiting)

Guzzle is used by `WebfleetClient::create()`. Applications can inject any PSR-18 client and PSR-17 request factory with `WebfleetClient::withHttpClient()`. An optional `RateLimiterInterface` can replace the built-in, per-client rolling-window limiter.

All requested and returned timestamps use ISO-8601 and are normalized to UTC. Missing fields in Webfleet responses become `null`; the original row remains available through each DTO's `source` property.

Development
-----------

[](#development)

```
composer install
composer check
```

Tests use mocked PSR responses and never require live credentials. An optional `composer test-integration` command uses the four credential variables plus `WEBFLEET_CONNECT_TEST_OBJECTNO`; it is excluded from the normal test suite.

License
-------

[](#license)

MIT. This community project is not an official Webfleet product.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ffa65756e812f0e343aa59bafda75779768aaf07887ef7a73c88958e0bb42a4f?d=identicon)[ivashchukk](/maintainers/ivashchukk)

---

Top Contributors

[![ivashchukk](https://avatars.githubusercontent.com/u/42264703?v=4)](https://github.com/ivashchukk "ivashchukk (2 commits)")

---

Tags

gpsfleetwebfleettelematics

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webfleet-connect-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/webfleet-connect-php-sdk/health.svg)](https://phpackages.com/packages/webfleet-connect-php-sdk)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k543.5M2.7k](/packages/aws-aws-sdk-php)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k46](/packages/neuron-core-neuron-ai)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

36789.4k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
