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.
Verdict up front: this is a narrow, single-purpose test-harness utility with effectively no adoption (4 stars, 0 dependents, one release in Aug 2023). Score 0.25 reflects low strategic value rather than a bad idea. Treat it as a pattern to evaluate, not a dependency to adopt by default.
Architecture fit. The package targets Laravel Dusk suites that need to change application configuration mid-test — e.g., flipping a payment provider, enabling a feature toggle, or switching locale without rebooting the app between scenarios. That is orthogonal to production architecture: it should live entirely in require-dev, boot only in testing, and be removable without touching product code. Fit is only good if we (a) already run a meaningful Dusk suite and (b) have a recurring matrix-of-configuration testing need. If either is false, the answer is no.
Integration feasibility. Composer install is trivial. The hard part is validating the mechanism: Laravel config is per-request, so a "live" change made over HTTP only persists across Dusk's browser requests if the package writes to a file, cache, or database that the app re-reads at boot. That mechanism determines whether the package is a clean test seam or an invasive hack that mutates .env/config files on disk.
Technical risk.
bootstrap/providers.php, no config/app.php providers array). Auto-discovery may still work, but this must be proven on our actual version matrix, not assumed.Key questions to answer before any code is written.
app()->environment('testing')?php artisan config:cache, or does caching silently nullify changes?composer.json PHP/Laravel constraints?Stack fit. Presumed Laravel 9/10 + Dusk. Confirm against our supported matrix before scoping anything. If we are on Laravel 11+, assume incompatibility until a spike proves otherwise.
Migration path. None required — it is a greenfield dev dependency with no data or schema implications. The path that does matter is the exit path: the package must be wrapped behind an internal helper (e.g., TestConfig::set($key, $value)) so that removing it is a one-file change, not a suite-wide rewrite. Design that wrapper on day one.
Alternatives to exhaust first. Most of this package's value is replicable with first-party Laravel primitives, and a TPM should force that comparison:
Config::set() in test bootstrap / per-test setup..env.dusk.local) for whole-run config variation.If Pennant or a per-test bootstrap hook covers our scenarios, we skip the dependency entirely.
Sequencing.
require-dev only, exclude from production builds, wrap behind the internal helper, add a smoke test that fails loudly on upgrade.Maintenance. We own it. Upstream is dormant; expect no fixes. Budget a small but permanent line item: vendoring or forking, version pinning, and a compatibility check on every Laravel upgrade. The realistic outcome is a fork within 12 months if we keep using it.
Support. No vendor, no SLA, no community. A four-star package means the bus factor is one person in one timezone. Internal ownership must be assigned explicitly, and that owner must not be the only person who understands the resulting test suite.
Scaling. Traffic scaling is a non-issue — test-only. The real scaling constraint is CI parallelism: if mutated state lands in a shared file, cache, or database, parallel Dusk workers will race and produce order-dependent flakiness. Also weigh runtime: live toggling per test can be slower than booting a fresh app with the right config, which inverts the package's premise at suite scale.
Failure modes.
config:cache in CI making mutations inert.Ramp-up. Low for an experienced Laravel engineer — under a day to learn the API. The hidden cost is institutional: undocumented behavior lives in whoever wrote the tests. Mandate a short internal README covering the wrapper, the guard mechanism, and the teardown contract before the first suite depends on it.
How can I help you explore Laravel packages today?