kavist/rajaongkir
Laravel wrapper for the RajaOngkir API that simplifies shipping cost calculation and Indonesian province/city lookups, making it easy to integrate ongkir rates into e-commerce checkout flows with clean, ready-to-use methods.
file_get_contents() signals the package is optimizing for breadth of hosting compatibility over control/depth — relevant if your infra runs on shared hosting or constrained PHP environments where cURL is disabled.file_get_contents() simplicity, PMs should plan for caching layer and fallback logic at the feature level (e.g., cache subdistrict/city lookups), since the client itself now offers less built-in control.Consider adopting when:
allow_url_fopen enabled but cURL disabled — v1.1.0 explicitly targets this compatibility case.Look elsewhere or proceed with caution when:
file_get_contents() is weaker than cURL here — expect less observability and harder debugging of timeouts/failures.allow_url_fopen disabled (common in hardened/secure hosting) — the new implementation may fail where cURL worked.Illuminate\Support\Facades\Http).For executives: This is a Laravel package that lets our product calculate Indonesian shipping costs and destination data via RajaOngkir — a core capability for launching and operating in the Indonesian market. The v1.1.0 update improves compatibility with a wider range of hosting environments by removing a dependency on cURL, which lowers deployment friction and broadens where we can run the app. Bottom line: faster go-to-market for Indonesia features with lower infra constraints, though we should still plan for caching and monitoring around it.
For engineering: v1.1.0 swaps BasicClient from cURL to file_get_contents() to reduce cURL dependency. Trade-offs to note: we lose granular timeout/header control and richer error handling; we gain compatibility on environments without cURL. Prerequisites: allow_url_fopen must be enabled, and we should add our own timeout protection, caching (province/city/subdistrict data changes rarely), retry/fallback logic, and structured error logging. Recommend wrapping calls in a service layer so we can swap the underlying HTTP client later without touching feature code. Also flag: verify no behavioral regressions in production hosts (e.g., SSL verification, redirects, and error surfacing may differ from cURL).
How can I help you explore Laravel packages today?