Merge pull request #6882 from pixelfed/shleeable-patch-2

Refactor: Add additional strict modes for testing environments only
pull/6883/head
dansup 4 weeks ago committed by GitHub
commit e1b60d070b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -176,8 +176,10 @@ class AppServiceProvider extends ServiceProvider
URL::forceRootUrl(config('app.url'));
// Model::shouldBeStrict(! $this->app->isProduction()); // In the future replace this instead of preventLazyLoading
Model::preventLazyLoading(true);
// Enable strict testing in dev/test only (false in production)
Model::preventLazyLoading(! $this->app->isProduction());
Model::preventSilentlyDiscardingAttributes(! $this->app->isProduction());
Model::preventAccessingMissingAttributes(! $this->app->isProduction());
}
/**

Loading…
Cancel
Save