PHPackages                             naugrim/laravel-strict-config-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. naugrim/laravel-strict-config-helper

AbandonedLibrary[Utility &amp; Helpers](/categories/utility)

naugrim/laravel-strict-config-helper
====================================

Ensures your config returns the correct types

1.2.0(1y ago)13.0kMITPHPPHP ^8.1

Since Feb 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Naugrimm/laravel-strict-config-helper)[ Packagist](https://packagist.org/packages/naugrim/laravel-strict-config-helper)[ RSS](/packages/naugrim-laravel-strict-config-helper/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

Laravel Strict Config Helper
============================

[](#laravel-strict-config-helper)

Deprecation Notice
------------------

[](#deprecation-notice)

As Laravel 11+ supports using the `Config`-facade for the exact same purpose, this package will not be maintained anymore.

Note though, that Laravel currently does not have an equivalent to the `config_numeric` function in this package.

Usage
-----

[](#usage)

This package is mainly intended to work together with [PHPStan](https://phpstan.org/).

Laravel's helper `config($key, $default)` returns `mixed`. In higher PHPStan levels, you cannot perform certain operations on `mixed` types.

Example:

```
