Repository navigation
feat(laravel): route middleware, facade test assertions; README for Laravel users - #2
Merged
Merged
Conversation
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Dec 2, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Dec 3, 2026
…aravel users
- Add EnsureFlagsAreEnabled route middleware, aliased as "reflag":
->middleware('reflag:new-dashboard') or EnsureFlagsAreEnabled::using(...)
responds 404 unless every flag resolves to true.
- Document the fake's assertions on the Reflag facade, so tests can use
Reflag::assertFlagChecked() like Event::fake()/Event::assertDispatched().
- README: Laravel-first order, Pest test example, Inertia sharing, a
Supervisor config for reflag:listen, onOneServer() in the schedule, an
Artisan command table, a php artisan serve note, flag types next to
reading flags, a clearer configuration table, and missing imports.
roncohen
force-pushed
the
docs/laravel-native-readme
branch
from
December 3, 2026 07:32
ab858ca to
1ca1a6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes from a review of the README for anything that doesn't feel Laravel-native.
Code
EnsureFlagsAreEnabledroute middleware, aliased asreflag:->middleware('reflag:new-dashboard')orEnsureFlagsAreEnabled::using('a', 'b'). Responds 404 unless every flag resolves totrue.Reflagfacade docblock lists the fake's assertions, soReflag::assertFlagChecked()works in IDEs, matchingEvent::fake()/Event::assertDispatched().README
useimports and the undefined$user.share()example alongside the Blade bootstrap.reflag:listen(verified: SIGTERM drains telemetry and exits 0),onOneServer()in the schedule, and a table of Artisan commands.php artisan servewaits for telemetry; the configuration table no longer implies options beat env vars in Laravel.Tests: two new Laravel tests (middleware, facade assertions); the suite passes on PHP 8.2 and 8.5, PHPStan is clean, and the example app tests pass.