alebatistella/duskapiconf
alebatistella/duskapiconf is a Laravel package that helps configure Laravel Dusk for API testing. It streamlines Dusk environment and test-runner setup, reducing manual boilerplate so you can run API-focused Dusk tests more easily with less configuration friction.
config() calls made inside a test never reach the process serving the request. This package closes that gap, letting a test flip server-side configuration and assert what the customer actually sees — the "config was changed" path, tested at the UI rather than mocked at the unit level.Consider the pattern if all of these hold:
composer require and forget.Look elsewhere if:
Pennant::activate) and is the idiomatic path for anything that is genuinely a feature flag. This package is not a substitute.config() directly cover most "what if the config differed" questions without a browser at all.config:cache, live mutation won't take effect without a restart; the whole premise breaks.Non-negotiable if adopted in any form: the mutation endpoint is a privilege-escalation surface. Register routes only under app()->environment(['local', 'testing']), require authentication or a signed request, allowlist which keys may be mutated, and log every change.
Executives: A small open-source utility that lets our automated browser tests change application configuration on the fly, so flag-gated and integration-gated features can be verified end-to-end instead of by hand. It is not a strategic dependency — the same capability is roughly half a day of engineering — so the recommendation is to build it internally behind our environment guardrails rather than adopt an unmaintained, single-maintainer package. The value is cycle time: fewer manual QA passes per configuration permutation, and a cheaper path to supporting more of them.
Engineering: The problem it solves is real — Dusk hits a live server, so test-side config() mutations are invisible to the process under test. The package exposes a route that mutates server-side config from the test. That route is also the risk. If we build it: gate route registration on local/testing only, require a signed or authenticated request, allowlist mutable keys, log mutations, and never ship it in a production build artifact. Use Pennant for anything that's actually a flag; reserve this pattern for genuinely non-flag config (gateway stubs, limits, maintenance mode). Read the package's source as a spec — the abandoned-dependency risk outweighs the modest implementation savings.
How can I help you explore Laravel packages today?