pdphilip/cf-request
cf-request is a Laravel package for accessing Cloudflare request data. It exposes headers like the connecting IP, visitor country, Ray ID, and other Cloudflare metadata, making edge information easy to use without manual header parsing.
Architecture fit
pdphilip/cf-request is a narrow, single-purpose integration package: it sits between Laravel's HTTP layer and Cloudflare-fronted traffic (real client IP resolution, trusted-proxy handling, Cloudflare-specific request/header behavior). Architecturally it is a leaf dependency — it wraps framework primitives rather than imposing its own abstractions, so it does not constrain application structure. Fit is high for any Laravel app behind Cloudflare, and near-zero for apps that are not. The pdphilip/omniterm ^3.0 dependency is the only meaningful architectural coupling and should be evaluated as part of the same trust boundary.
Integration feasibility
Straightforward. Composer-installable, no infrastructure requirements, no queue/daemon/worker footprint. The v3.1.0 change set is small and low-surface: a version-support expansion, a CI/test-harness improvement, a dependency floor bump, and one internal API correctness fix (getBody()->getContents() → ->body()). The last item is the only behavioral touchpoint, and it aligns the package with Laravel's documented HTTP client API — it is a correctness fix, not a feature change. A competent Laravel engineer can integrate and validate this in under a day.
Technical risk
omniterm ^3.0 is a major-version floor bump; its own changelog, license, and maintenance posture must be reviewed independently. A major bump in a transitive dependency is a common source of silent breakage.Key questions
composer.json PHP constraint — is 8.2 still permitted, or does the v3.1.0 floor now require 8.3?omniterm ^3.0 change, and does it introduce its own framework or PHP constraints that could conflict with our matrix?->body() change behaviorally identical to getBody()->getContents() for all response types we consume, including streams and large payloads?Stack fit Fits cleanly into a standard Laravel service stack with no additional runtime components. The relevant axes are: Laravel major (11/12/13), PHP minor (8.3/8.4), and deployment topology (behind Cloudflare vs. direct). The first two are now explicitly enumerated by the package's own test matrix — a meaningful maturity signal, because it means the supported combinations are continuously verified rather than asserted.
Migration path Two distinct paths, and they should not be conflated:
omniterm, plus the internal HTTP client fix. Validate in staging, ship.Compatibility
The new per-version Composer scripts (test:l11, test:l12, test:l13, test:all) are the most operationally useful item in this release for a TPM: they make compatibility claims reproducible. Recommend running composer test:all in our own CI against the pinned versions we actually deploy, rather than trusting the vendor matrix. The Larastan 3 fix also implies static analysis is now clean — worth adopting as a gate on our side if we are not already.
Sequencing
omniterm v3 changelog and constraints; confirm no conflict with our PHP matrix.composer test:all and a static analysis pass in our CI against the upgraded branch.^3.1 only after the canary holds.Maintenance
Low steady-state burden. No migrations, no schema, no background processes, no config surface of consequence. The main recurring cost is staying inside the supported matrix: once on ^3.1, we inherit an obligation to keep Laravel and PHP within 11–13 and 8.3–8.4 respectively. Renovate/Dependabot on this package is cheap and worth enabling, but pin majors and require manual review on any omniterm bump.
Support Support surface is thin and mostly upstream. Internal first-line support will rarely see this package directly — failures manifest as application-level symptoms (wrong client IP, failed request validation, rate limiting applied to the wrong identity). Document the dependency in the service catalog with a note that it governs Cloudflare real-IP behavior, so on-call engineers can connect symptoms to cause. Escalation beyond first line goes to the open-source maintainer, which is a genuine constraint: there is no commercial support contract. Budget for the possibility of forking or vendoring.
Scaling Effectively no scaling cost. The package operates per-request on the HTTP path and adds no I/O, no external calls, and no state. It scales linearly with request volume like any middleware. The one thing to watch is any per-request parsing of Cloudflare headers — confirm it is O(1) and does not allocate per request under high concurrency; a canary load test on a Cloudflare-fronted endpoint will answer this.
Failure modes
omniterm update or a Laravel minor could shift behavior without a corresponding change in this package. Lock files plus the vendor test matrix mitigate.Ramp-up Minimal. A mid-level Laravel engineer can understand the package's role in an hour — it is a thin wrapper, not a framework. The ramp-up cost is not in the code but in the situational knowledge: knowing that the app sits behind Cloudflare, that this package mediates trust, and that its absence produces silent rather than loud failures. Capture that in the runbook. Budget roughly one engineer-day for integration and validation on an already-supported stack, and treat the Laravel 10 migration as a separate, substantially larger effort.
How can I help you explore Laravel packages today?