ash-jc-allen / laravel-config-validator

A library for validating your Laravel app's config.
MIT License
200 stars 11 forks source link

disable config validator temporary #55

Closed erth5 closed 2 years ago

erth5 commented 2 years ago

I get errors by start run Laravel Dusk in a local environment Is there a possibility to deactivate config validator temporary without remove from composer.json? Or Did I have configure dusk ?

The config is correct but changed while dusk runs $php artisan dusk Environment modified. Restarting server... .... Environment modified. Restarting server...

failure-Tests_Browser_DebugTest_testRidirect-0

ash-jc-allen commented 2 years ago

Hey! Sorry that you're having issues with this. Where are you calling the validator from? I see that you have the AppServiceProvider@boot method in your stack trace. Are you calling it from there? 🙂

ash-jc-allen commented 2 years ago

I'm going to close this issue for the time being so that I can keep on top of my open issues. But, if you're still having this issue, please feel free to reopen the issue. Thanks! 😄

erth5 commented 2 years ago

I found the Cause, I used

    if (App::environment() === 'local') {

        (new ConfigValidator())
            ->run();
    }

to check the config on startup, but Dusk use own environment

ash-jc-allen commented 2 years ago

Perfect! I'm glad that you managed to get this sorted 😄