Skip to content

Releases: tiny-blocks/http-error-handler

v2.0.4

Choose a tag to compare

@gustavofreze gustavofreze released this 24 Oct 18:38
f2f8114
  • Ask the documentation site for a new build when a release is published.

v2.0.3

Choose a tag to compare

@gustavofreze gustavofreze released this 24 Oct 17:28
3dc4482
  • Raise ergebnis/composer-normalize to ^2.54, guzzlehttp/psr7 to ^3.2, infection/infection to ^0.35, phpstan/phpstan to ^2.3, phpunit/phpunit to ^13.4, sentry/sentry to ^4.34, tiny-blocks/http to ^7.2.
  • Drop --coverage from the Infection run.
  • Order members and parameters as the conformance hooks require, without changing any public signature.

v2.0.2

Choose a tag to compare

@gustavofreze gustavofreze released this 24 Oct 14:11
  • Point the PHP tooling image at the floating gustavofreze/php:8.5-cli alias, so every rebuild of the image reaches the tooling with no change here.
  • Pin the CI runners to ubuntu-26.04.
  • Remove the comments from the Makefile.
  • Run Dependabot updates monthly and bump gustavofreze/auto-assign to 2.1.1.
  • Docs: point the contributing guidelines to the .github repository of the organization.

v2.0.1

Choose a tag to compare

@gustavofreze gustavofreze released this 26 Sep 10:08
b1412b1
  • Keep the request and the user out of every event a reporter built with SentryReporter::initializedWith sends: the SDK reads no body, and the request and the user it gathers are dropped before sending.

v2.0.0

Choose a tag to compare

@gustavofreze gustavofreze released this 28 Aug 13:50
6d14fa8
  • Add the ErrorReporter seam and the ReportedError context every reporter reads, so a handled error reaches error tracking without the middleware knowing the provider.
  • Add the SentryReporter adapter, which either boots the SDK from the deployment values or captures onto a hub the application already holds.
  • Add ReportingFilter, so the consumer decides which handled errors reach the provider and a client error never spends quota.
  • Add ReportingPriority and PrioritizedError, the four level urgency scale stated once in neutral terms and translated by each adapter.
  • Add ReportingContext and ReportingTags, the exception side and request side supplements a report carries, which is how a value resolved below the middleware crosses the PSR-7 immutability gap.
  • Add RouteMiddleware, so a report carries the route the request matched instead of the raw path that names one request rather than one endpoint.
  • Add withMessage, which settles the message the response answers with before the body is built, so no layer above parses and re-encodes it.
  • Validate the headers a mapping rule declares, so a malformed field fails while the table is declared rather than on the request that would return it.

v1.3.0

Choose a tag to compare

@gustavofreze gustavofreze released this 07 Aug 15:54
c7d3579
  • Raise tiny-blocks/http to ^7.0.
  • Raise infection/infection to ^0.34, phpunit/phpunit to ^13.2, and guzzlehttp/psr7 to ^3.0.
  • Allow multiline concatenation in Generic.Strings.UnnecessaryStringConcat, matching the canonical ruleset.
  • Remove the versioned Claude configuration, now centralized in tiny-blocks/tiny-blocks.
  • Remove the CodeQL workflow.
  • Align .gitattributes and .gitignore with the canonical ecosystem assets.

v1.2.0

Choose a tag to compare

@gustavofreze gustavofreze released this 29 Jul 22:20
5c26e96
  • Answer an unmapped exception that carries a 4xx status with that status, instead of a generic 500.
  • Log a response in the 4xx range as a warning, and keep every other status as an error.
  • Derive the log level from the status actually returned, so a mapped 422 is no longer logged as an error.
  • Cover the routing exceptions of a PSR-15 stack with a vendor driver test suite.
  • Bump tiny-blocks/http to ^6.4 and tiny-blocks/http-correlation-id to ^2.1.

v1.1.0

Choose a tag to compare

@gustavofreze gustavofreze released this 11 Jul 18:15
0732ebb
  • Adopt the tiny-blocks/http-correlation-id 2.0 API: the logger is wrapped per request with CorrelatedLogger when the correlation ID attribute is present, replacing the removed CorrelatedLogger::resolve().

v1.0.0

Choose a tag to compare

@gustavofreze gustavofreze released this 01 Jul 13:53
fae23d9
  • Map exceptions thrown by downstream handlers to structured JSON error responses (machine-readable code, HTTP status 400-599, message, optional headers) as a PSR-15 middleware.
  • Declare exception-to-error rules through a fluent, first-match-wins ExceptionMappingTable, matching by exact class, any of a list, or subclass, and resolving to a fixed MappedError or one built from the matched throwable by a closure.
  • Log errors through an optional PSR-3 logger with configurable verbosity (ErrorHandlingSettings), enriched with the request correlation id via tiny-blocks/http-correlation-id.
  • Handle unmapped exceptions with a configurable generic 500 fallback or a rethrow to an outer error boundary.