Releases: logtide-dev/logtide-php
Releases · logtide-dev/logtide-php
v0.7.4
Fixed
- Fixed
Options::$servicebeing silently ignored for any log captured without an explicit per-call service.Client::prepareEventused$event->getService() ?: $this->options->getService(), butEvent::__constructdefaults$serviceto the string'unknown', which is truthy — so the Elvis operator never fell through to the option. As a result, calls likeLogtideSdk::init(['service' => 'my-php-app'])followed bycaptureLog(...)always shippedservice: "unknown". The fallback now triggers when the event service is''or'unknown'. Closes #7.
Full Changelog: https://github.com/logtide-dev/logtide-php/blob/main/CHANGELOG.md
v0.7.3
Fixed
- Fixed
Event::$timeformatting that produced ISO 8601 with a numeric offset (e.g.2026-04-07T11:34:24+00:00) viaformat('c'). Logtide's backend uses Zod's strictz.string().datetime(), which only accepts ISO 8601 ending inZ, so everycaptureLog(...)call was rejected with HTTP 400 "Validation error". The SDK now emits UTC ISO 8601 with aZsuffix (2026-04-07T11:34:24.886Z). Closes logtide-dev/logtide#180. - Fixed empty
metadatafield being serialized as JSON array[]instead of object{}. The backend schema ismetadata: z.record(z.unknown()).optional(), which rejects arrays with "Expected object, received array". DefaultcaptureLog(...)calls without any metadata now serializemetadataas an empty JSON object via\stdClass, so the first-time-user happy path validates cleanly. - Fixed OTLP
startTimeUnixNano,endTimeUnixNano, and span eventtimeUnixNanobeing emitted in scientific notation (e.g."1.7755623882398E+18") due to a naive(string) ($float * 1e9)cast. OTLP requires a digit-only stringifieduint64. The SDK now usessprintf('%.0f', ...)to emit a fixed-point integer string.
Full Changelog: https://github.com/logtide-dev/logtide-php/blob/main/CHANGELOG.md
v0.7.2
Bug Fixes
- Fixed
ErrorListenerIntegrationclosure return type — kept: boolto satisfyset_error_handlercontract, and cast previous handler result with(bool)to safely handlenullreturns from chained handlers. Closes #6. - Fixed
beforeSendPHPDoc callable shape: second parameter corrected fromarray<string, mixed>toEventHint|nullto match actual call site. - Added typed callable shapes via PHPDoc to
Options::$beforeSend,Options::$beforeBreadcrumb, andOptions::$integrationsfor PHPStan validation. - Tightened
Scopeevent processor arrays fromcallable[]toarray<callable(Event): ?Event>.
v0.7.1
v0.7.0
Added
Monorepo Structure
- Restructured as Composer monorepo with 5 packages under
packages/* - Unified test suite with PHPUnit 10.5 (265 tests, 570 assertions)
- PHPStan level 8 static analysis across all packages
- PSR-12 code style enforcement with PHP_CodeSniffer
Core (logtide/logtide)
LogtideSdk- static entry point for SDK initializationClientBuilder- fluent client construction with sensible defaultsClient- capture logs, errors, breadcrumbs, and spansHub- global singleton for convenient access across your appScope- per-request context isolation with tags, extras, and breadcrumbsBatchTransport- automatic batching with retry logic and circuit breakerHttpTransportandOtlpHttpTransportfor log and span deliveryCurlHttpClientandGuzzleHttpClientHTTP client implementations- DSN parsing, error serialization, trace ID generation
- W3C Trace Context (
traceparent) propagation - Breadcrumb buffer with configurable max size
- Monolog handlers:
LogtideHandlerandBreadcrumbHandler - PSR-15 middleware for generic HTTP request tracing
- Global helper functions (
\LogTide\init(),\LogTide\captureException(), etc.) - Built-in integrations: Request, Environment, ExceptionListener, ErrorListener, FatalErrorListener
Laravel (logtide/logtide-laravel)
LogtideServiceProviderwith auto-discovery and publishable configLogtideMiddlewarefor automatic request tracingLogChannelfor Laravel logging integrationLogtideFacadefor static access- Breadcrumb integrations: DB queries, cache operations, queue jobs
Symfony (logtide/logtide-symfony)
LogtideBundlewith DI extension and semantic configurationRequestSubscriberfor automatic HTTP request tracingConsoleSubscriberfor CLI command tracingSymfonyIntegrationandDoctrineIntegrationfor breadcrumbs
Slim (logtide/logtide-slim)
LogtideMiddleware- PSR-15 middleware for request tracingLogtideErrorMiddleware- error capture with full request context- Automatic route pattern resolution from Slim routing
WordPress (logtide/logtide-wordpress)
LogtideWordPress- static initializer with WordPress hook registration- Lifecycle hooks:
wp_loaded,shutdown,wp_die_handler,wp_redirect,wp_mail WordPressIntegration- PHP error handler integrationDatabaseIntegration- slow query breadcrumbs via$wpdbHttpApiIntegration- outgoing HTTP request breadcrumbs- Multisite support (blog switch tracking, plugin activation/deactivation)
CI/CD
- GitHub Actions CI: PHPUnit tests, PHPStan, PHPCS on push/PR to
main/develop - GitHub Actions publish: Packagist publish on tag
v*.*.*or manual dispatch - PHP version matrix: 8.1, 8.2, 8.3, 8.4
- Branch model:
develop→main, hotfix directly tomain
Documentation
- README for every package with badges, quick start, API reference
- Root README with package table, architecture diagram, development guide
- Contributing guide, Code of Conduct, Changelog
- Branch protection documentation (
.github/BRANCH_PROTECTION.md)