Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cf Request Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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

  • Breaking for Laravel 10 estates. Dropping L10 is a hard compatibility break. Any application still on Laravel 10 is pinned to v3.0.x and will not receive the HTTP client fix or future patches. This is the single largest risk and it is a deliberate, defensible EOL call — but it must be surfaced to stakeholders as a forced upgrade path, not a routine bump.
  • Laravel 13 support is forward-looking. Shipping support for a framework major ahead of broad ecosystem adoption means the package's own compatibility claim is validated against a CI matrix, not against production reality. Treat L13 as declared compatible until the framework itself is GA and battle-tested.
  • Implicit PHP floor shift. The CI matrix moves to PHP 8.3/8.4. Even though the release notes do not state a PHP requirement change, the tested-and-supported surface is now 8.3+. Runtimes on 8.2 should be assumed unsupported.
  • Transitive dependency. 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.
  • Maintainer concentration. Single-maintainer package with a small contributor base (Dependabot is a listed contributor). Bus-factor risk is real but proportionate to the package's small blast radius.

Key questions

  1. What is the actual composer.json PHP constraint — is 8.2 still permitted, or does the v3.1.0 floor now require 8.3?
  2. What does omniterm ^3.0 change, and does it introduce its own framework or PHP constraints that could conflict with our matrix?
  3. Is Laravel 13 released, and if not, what is the package's stated policy for pre-GA framework support?
  4. Is the ->body() change behaviorally identical to getBody()->getContents() for all response types we consume, including streams and large payloads?
  5. What is the maintenance commitment for the v3.0.x line now that L10 is dropped — security patches only, or full stop?
  6. How many of our applications are still on Laravel 10, and what is their migration timeline?

Integration Approach

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:

  • From v3.0.x on Laravel 11/12: near-no-op. Dependency floor changes on omniterm, plus the internal HTTP client fix. Validate in staging, ship.
  • From v3.0.x on Laravel 10: blocked. The package upgrade is gated behind a Laravel major upgrade. This must be sequenced as a framework migration program, not a dependency bump, and should be tracked as its own workstream with its own risk register.

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

  1. Inventory Laravel and PHP versions across all applications consuming this package; quantify the L10 exposure.
  2. Review omniterm v3 changelog and constraints; confirm no conflict with our PHP matrix.
  3. Upgrade non-L10 applications first — lowest risk, delivers the HTTP client fix.
  4. Run composer test:all and a static analysis pass in our CI against the upgraded branch.
  5. Canary one low-traffic Cloudflare-fronted service; verify client IP resolution and header handling are unchanged.
  6. Roll out broadly; pin to ^3.1 only after the canary holds.
  7. Treat L10 applications as a separate migration epic with an explicit deadline tied to L10's own support runway.

Operational Impact

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

  • Silent IP misattribution. The highest-impact failure: if the package is absent, misconfigured, or incompatible with the framework version, the application sees the Cloudflare edge IP as the client. Downstream effects include broken rate limiting, corrupted audit logs, geo/logic errors, and mis-scoped security controls. This fails quietly — nothing throws. Mandate an assertion in the smoke-test suite that a known request resolves to a non-Cloudflare-range client IP.
  • Version drift. A transitive omniterm update or a Laravel minor could shift behavior without a corresponding change in this package. Lock files plus the vendor test matrix mitigate.
  • Forward-compat false confidence. A Laravel 13 claim validated only in vendor CI may not hold under our specific middleware ordering. Do not adopt L13 in production until the framework is GA and we have run our own suite.
  • Abandonment. Single-maintainer risk; the mitigation is that the package is small enough to vendor or reimplement in-house if necessary. Keep the integration isolated behind configuration so that replacement is a contained exercise.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package