production()17 reasons, each a before and an after. Select the problems you have and see how many match.
env-settings:make writes
'' and
0 with a // TODO next to them.
Nothing ever complained when one stayed that way. The class resolved to an empty domain and a zero timeout, the
application booted, and the failure surfaced later somewhere unrelated — the exact bug this package exists to
prevent, one layer further in.
env-settings:check turns that into a build failure.
✗ App\Settings\AuthSettings
domain empty string, but set in development()
timeout 0, but set in development()
webhook_url still contains "TODO"
1 of 6 classes incomplete for [production]: 3 values to fill in.
Mark a property #[AllowEmpty] if its empty value is intentional.
CI stops here — the empty domain never reaches production.
[ production ] — 5 settings classes complete.
This demo, right now — development, staging, testing and production all pass.
''
0
0.0
false
[]
null
Plus any string containing TODO, in any casing — the marker
env-settings:make leaves behind.
env-settings:check --env=production
env-settings:check
env-settings:check "App\Settings\AuthSettings"
A named environment, the current APP_ENV, or a single class.
retry_attempts: 0 may be exactly what every environment wants.
A value is only reported when another environment supplies a real one for the same property — the shape of a
class where one factory was filled in and another forgotten.
A useful consequence, found while building this page: a freshly generated class where every factory is still a placeholder reports as complete. There is no filled-in sibling to compare against yet. The check catches the environment you forgot, not the class you have not started.
Turning this check on flagged a value in the demo that was never wrong:
✗ App\Settings\NotificationSettings
sandbox_mode false, but set in development()
Sandbox mode is deliberately off in production — not a placeholder anyone forgot. One attribute says so:
#[AllowEmpty] public bool $sandbox_mode,
The check goes quiet; env-settings:diff still reports
sandbox_mode * | true | false.
Silencing the gate never hides the difference.
It exits non-zero when anything is incomplete, so it is a gate rather than a report — no extra plumbing required.
# .github/workflows/ci.yml
- name: Verify settings are complete
run: php artisan env-settings:check --env=production