ashallendesign/laravel-config-validator
Validate your Laravel config at runtime or via Artisan. Define rulesets for config files with custom messages and environment targeting, generate rulesets quickly, and optionally publish defaults. Catch missing/invalid config early in local, CI, or production.
Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.9.1...v2.10.0
Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.9.0...v2.9.1
.gitattributes file by @ash-jc-allen in https://github.com/ash-jc-allen/laravel-config-validator/pull/74Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.8.0...v2.9.0
nunomaduro/larastan to larastan/larastan and added support for Larastan 3. #70Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.7.0...v2.8.0
Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.6.1...v2.7.0
Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.6.0...v2.6.1
runInline method by @ash-jc-allen in https://github.com/ash-jc-allen/laravel-config-validator/pull/64Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.5.0...v2.6.0
Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.4.0...v2.5.0
Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.3.0...v2.4.0
Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.2.0...v2.3.0
illuminate/validation and illuminate/view by @kohenkatz in https://github.com/ash-jc-allen/laravel-config-validator/pull/49Full Changelog: https://github.com/ash-jc-allen/laravel-config-validator/compare/v2.1.0...v2.2.0
illuminate/command. #40illuminate/cache dependency requirement. #40config/validation to config-validation. #31stubs/config-validation. #36As of Laravel Config Validator v1.3.0, the package can now be run using PHP 8.
As of Laravel Config Validator v1.2.0, the package now comes with some default rulesets. To start using these rulesets, you can publish them using the following command:
php artisan vendor:publish --tag=config-validator-defaults
The above command will copy the validation files and place them in a config/validation folder in your project. These rules are just to get you started, so there are likely going to be rules in the files that don't apply to your app. So, once you've published them, feel free to delete them or edit them as much as you'd like.
errors() method to the ConfigValidator classthrowExceptionOnFailure() method to the ConfigValidator classA new errors() method has now been added to the ConfigValidator class and can be used for getting any errors caught during the validation. The errors are returned as an array.
A new throwExceptionOnFailure() method has now been added to the ConfigValidator class and can be used for determining whether if exceptions should be thrown if the validation fails.
The example below shows how to prevent any exceptions from being thrown if the validation fails:
$configValidator = new ConfigValidator();
$errors = $configValidator->throwExceptionOnFailure(false)
->run()
->errors();
The config:validate command has been updated to make use of the new errors() and throwExceptionOnFailure() methods. Now, instead of a single validation error being returned as an exception, all of the validation error messages will be displayed in the console within a table.
How can I help you explore Laravel packages today?