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

Laravel Request Forwarder Laravel Package

moneo/laravel-request-forwarder

Forward incoming Laravel HTTP requests to another URL or microservice with simple, configurable middleware. Preserve headers, methods, and payloads—ideal for proxies, webhooks, and gradual migrations.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Check your Laravel version first. As of v2.0.1 the package requires Laravel 11+; Laravel 10 support was dropped because it is EOL. If your app is still on Laravel 10, pin the previous major (composer require <vendor>/<package>:^1.0) and plan the framework upgrade before taking v2.
  2. Install and publish.
    composer require <vendor>/<package>:^2.0
    php artisan vendor:publish --provider="<Vendor>\<Package>\<PackageServiceProvider>"
    
    Read composer.json in the package (illuminate/* constraints) and the UPGRADE/CHANGELOG notes before running composer update in a mixed-dependency project — v2.0.1 is a patch release on top of v2.0.0, so the Laravel 10 drop is inherited from the major, not new in the patch.
  3. Where to look first: the service provider (what gets bound and whether anything is registered globally), the config file (defaults you will actually want to override in config/<package>.php), and the test helpers/traits — the release note about "log testing" points at the package's testing surface, which is where most day-to-day value lives.
  4. First use case: replace brittle assertions on log files with the package's log-testing helper in a feature test — dispatch the job/request, then assert the expected level, message, and context were logged. Verify against your app's actual log channel config, not the package default, on the first run.

Implementation Patterns

  • Test-scoped fakes. Install the package's log fake in setUp() and tear it down in tearDown() so state never leaks between tests. Prefer this over reading storage/logs/laravel.log, which is order-dependent and polluted by parallel runs.
  • Assert on structure, not formatting. Assert level + message + context keys (Log::assertLogged('error', fn ($message, $context) => ...)) rather than the rendered line. This is exactly the class of assertion that broke across Laravel 11 minors and was fixed in v2.0.1 — formatting-coupled assertions will keep breaking.
  • Feature-test integration. Use the helpers in HTTP/job tests where the log write is a side effect of real application flow; keep unit tests free of the fake so you still exercise the real handler at least once (a single smoke test asserting the channel writes to disk).
  • CI matrix. Run the suite across the Laravel 11 minors you actually deploy (11.0 → latest). Since v2.0.1 is explicitly a "fix log testing across Laravel 11 versions" release, pin laravel/framework in the matrix rather than floating ^11.0 if you want reproducible log assertions.
  • Version pinning workflow. In composer.json, use ^2.0.1 for the package and let the lock file pin the framework. When bumping framework minors, run only the logging-related tests first (php artisan test --filter=Log) to isolate regressions cheaply.
  • Extension points. If the shipped assertions don't cover a case (e.g. asserting a specific channel or a daily rotation), wrap them in your own base test case / custom assertion rather than forking — keeps upgrades to v2.x cheap.

Gotchas and Tips

  • The Laravel 10 drop is the real breaking change. It landed in v2.0.0 and is only restated by this patch. Treat ^2.0 as "Laravel 11+ only" and audit composer.lock in any package you maintain that depends on this one — a transitive ^2.0 constraint will force your own Laravel 11 floor.
  • v2.0.1 is a patch, not a feature release. It fixes CI compatibility and log-testing behavior across Laravel 11 versions. There are no new APIs or deprecations to adopt; the only action item is upgrading the patch and re-running your log tests.
  • Log-testing flakiness has several causes — config caching, Monolog handler differences across framework minors, and tests that assert on formatted output. When an assertion fails only in CI: php artisan config:clear, confirm LOG_CHANNEL in phpunit.xml (set it explicitly rather than inheriting .env), and check whether the fake was installed before the code under test booted.
  • Debugging a failed assertion: dump the collected entries before asserting. If the fake is empty, the write probably went to a different channel or the logger was resolved before your fake was installed (service-provider boot order, queued jobs running in a different process).
  • Don't suppress the framework. Keep at least one non-faked test that writes a real log line; fake-only suites hide misconfigured channels until production.
  • Confirm supported versions against composer.json, not the README. Release-note wording about "Laravel 11 versions" is about test compatibility, not a guarantee of every future 11.x — pin and test what you deploy.
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.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk