release: add inspections API in PHP SDK 1.4.0 - #15
Conversation
|
Final live-contract result: blocked by an upstream Fleet-Ops inspection bug, not ready to merge. The exact pinned implementation 0d11583 passes source overlay, migrations, health checks, seeding, form listing, and form retrieval. Submit an Inspection reaches the API with JSON including location coordinates, but fails with HTTP 500: SQLSTATE HY000 / 1364, field location does not have a default value. InspectionSubmission::createIssueFromFailures() creates an Issue without its required spatial location. The latest head of Fleet-Ops PR #319 is still the same revision and still omits this field. The subsequent retrieve fails because no successful submission ID was returned. Evidence: https://github.com/fleetbase/fleetbase-php/actions/runs/34694049246 All other 30 SDK checks passed, including 100% line/branch coverage, 87.86% mutation, PHP compatibility, consumer fixtures, and the release-candidate dry run. Candidate archive and SBOM checksums verified; archive contains 144 files with no forbidden development state. The separate website fix fleetbase/fleetbase.io#99 has all checks green, including Vercel, and can merge independently. No inspection assertions or seed behavior were weakened to hide this server failure. Completing this SDK release requires correcting the upstream Issue location assignment, repinning the tested source, and rerunning the full contract. |
Filing an inspection with a failed item answered 500: issues.location is a spatial column with no default, and createIssueFromFailures() left it out, so MySQL refused the insert (1364, "field location does not have a default value"). Found by the PHP SDK's live contract run in fleetbase/fleetbase-php#15 against this branch. The issue now takes where the failure was reported: the submission's own coordinates, else the vehicle's last known position, else the driver's, and an empty point when nothing is known. Read directly rather than through Utils::getPointFromMixed(), which throws when it cannot resolve a point, and every one of those sources is routinely empty. No test caught it because the harnesses stubbed ST_GeomFromText to hand back the WKT it was given, so a stored point could not be read again. The stub now answers as MySQL does, a 4-byte SRID and the geometry's WKB, and the tests cover an issue taking the submission's coordinates, the vehicle's, and the empty point.
|
Confirmed, and fixed upstream: fleetbase/fleetops#319 now carries Cause. Fix. The issue now takes where the failure was reported: the submission's own coordinates, else the vehicle's last known position, else the driver's, else an empty point. Read directly rather than through Why no test caught it. The inspection test harnesses stub To repin. |
|
Follow-up: fleetbase/fleetops#319 is green on Repin to |
Summary
Implement the six driver-facing inspection endpoints from fleetbase/postman#60 and prepare SDK 1.4.0 without changing existing consumers.
Live contract and upstream dependency
Postman #60 is merged, including #61 which fixes submission JSON Content-Type. Fleetbase #652 has merged the inspection seed. Fleet-Ops #319 is still open at preparation time.
The lock pins Postman d6a7cc5, Fleetbase a5dea4b, and Fleet-Ops inspection source 0d11583. CI overlays that exact package using the canonical Fleetbase sequence (replace package, rebuild classmap, clear caches, migrate, reload Octane), BEFORE minting and seeding fixtures. This verifies the actual inspection implementation rather than the older published image. Source overlay behavior is recorded in job summaries.
Release approval must confirm the inspection API is available in the intended Fleetbase deployment. A green pinned-source run does not establish published-image availability. No upstream PR is merged by this change.
Validation
Website coordination
A separate fleetbase.io PR removes the PHP completeness gate from the Postman bump, restores the no-change guard, and generates inspection API docs independently of SDK release timing. The website can merge its fix independently. Synchronize the new PHP catalog after 1.4.0 is published.
Merging this release/1.4.0 branch triggers normal release validation and the protected release environment. No merge, tag, or publication has been performed.