mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 12:18:43 +09:00
* Refactor API request/response HTTP helpers * Centralize exception and response handling * Use ResponseEmitter in installer entrypoints * Add HTTP ResponseFactory and refactor Box_App * Extract route matching into HTTP matcher * Fix route param parsing and remove UrlHelper * Fix exception status code crash and clean up refactor leftovers ApiResponseFactory::getStatusCode() required an int code, but Throwable::getCode() can return a string (e.g. PDOException's SQLSTATE), so any non-FOSSBilling exception with a non-integer code crashed API error handling with a TypeError instead of returning a JSON error. Numeric-string codes are normalized to int to preserve prior loose- comparison behavior; non-numeric codes fall back to the default status. Also removes now-dead ErrorPage::generatePage(), redundant manual requires of ResponseEmitter (already covered by composer's classmap autoload), and duplicate emitResponse() calls in exceptionHandler().