PHPackages                             ronappleton/laravel-typed-config - 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. ronappleton/laravel-typed-config

AbandonedLibrary

ronappleton/laravel-typed-config
================================

PHP Stan compliant config helper for Laravel, use config without stan complaining!

1.0.2(2y ago)92152MITPHP

Since Feb 29Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/ronappleton/laravel-typed-config)[ Packagist](https://packagist.org/packages/ronappleton/laravel-typed-config)[ RSS](/packages/ronappleton-laravel-typed-config/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (2)

[![banner.jpg](banner.jpg)](banner.jpg)

Laravel Typed Config
====================

[](#laravel-typed-config)

Note
----

[](#note)

The Laravel team added this for version 11. So this should only be used for versions prior to 11

[See the commit](https://github.com/laravel/framework/commit/6802941843ffefec6054ed37450b2a53ade72f64)

### Overview

[](#overview)

Super simple package, with a super simple job.

Provide type based config value accessors for use within Laravel to avoid Php Stan complaining about mixed types after fetching a value from a configuration file.

### Installation

[](#installation)

```
composer require ronappleton/laravel-typed-config
```

### Usage

[](#usage)

A facade is registered `TypedConfig`

Import `Appleton\TypedConfig\Facades\TypedConfig`

This will then give you access to:

```
TypedConfig::string(string $key, string $default = null): string

TypedConfig::int(string $key, int $default = null): int

TypedConfig::bool(string $key, bool $default = null): bool

TypedConfig::array(string $key, array $default = null): array

TypedConfig::float(string $key, float $default = null): float

TypedConfig::object(string $key, object $default = null): object

TypedConfig::classString(string $key, string $default = null): string
```

Note: `classString` is a special case, it will also check the class exists.

Also `Repository` macros have been added to allow the use through the config helper

```
config()->string('key', 'default')

config()->int('key', 1)
```

for example.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance43

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

802d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e2afdd94a6f21a4ec2c5df569b80c1d47d6f5d0428f866f55c4bc117856b58b?d=identicon)[Ron Appleton](/maintainers/Ron%20Appleton)

---

Top Contributors

[![ronappleton](https://avatars.githubusercontent.com/u/3792420?v=4)](https://github.com/ronappleton "ronappleton (9 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ronappleton-laravel-typed-config/health.svg)

```
[![Health](https://phpackages.com/badges/ronappleton-laravel-typed-config/health.svg)](https://phpackages.com/packages/ronappleton-laravel-typed-config)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
