PHPackages                             reinfi/laminas-typed-params - 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. reinfi/laminas-typed-params

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

reinfi/laminas-typed-params
===========================

A Laminas Framework module for typed params plugin to solve static code analysis.

1.2.0(1y ago)112.2k↓78.1%1MITPHPPHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

Since May 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/reinfi/laminas-typed-params)[ Packagist](https://packagist.org/packages/reinfi/laminas-typed-params)[ RSS](/packages/reinfi-laminas-typed-params/feed)WikiDiscussions main Synced 2d ago

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

Laminas controller plugin for params to solve static code analysis.

=======

1. [Installation](#installation)
2. [Configuration](#configuration)
3. [Differences](#differences)

### Installation

[](#installation)

1. Install with Composer: `composer require reinfi/laminas-typed-params`.
2. Enable the module via config in `appliation.config.php` under `modules` key:

```
    return [
        'modules' => [
            'Reinfi\TypedParams',
            // other modules
        ],
    ];
```

### Configuration

[](#configuration)

To enable static code analysis to find your controller plugin you need to add it to your controller class.

```
use Laminas\Mvc\Controller\AbstractActionController;
use Reinfi\TypedParams\Plugin\TypedParams;

/**
 * @method TypedParams typedParams()
 */
class MyController extends AbstractActionController {

    public function indexAction()
    {
        $id = $this->typedParams()->fromRoute('id')->asNonEmptyString();
    }
}
```

In this example static code analysis will now know that id is always a non empty string.

### Differences

[](#differences)

As of now you can not have conditional return types in the `@method` Annotation, i.e.

```
/**
 * @method ($param is string ? TypedValue : TypedParams) typedParams(string $param, $default = null)
 */
```

For that reason the invocation of the plugin always returns the plugin itself and you need to use the public methods.

In difference to the laminas mvc controller plugin `params` which returns route parameters if invoked with a parameter.

```
public function __invoke($param = null, $default = null)
{
    if ($param === null) {
        return $this;
    }
    return $this->fromRoute($param, $default);
}
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~408 days

Total

3

Last Release

699d ago

PHP version history (3 changes)1.0.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0

1.1.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0

1.2.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd12a82b28a65cedc8e06642dabfbfd70fd512287bbaed49aaac0072fe898e41?d=identicon)[reinfi](/maintainers/reinfi)

---

Top Contributors

[![reinfi](https://avatars.githubusercontent.com/u/9324423?v=4)](https://github.com/reinfi "reinfi (7 commits)")

---

Tags

pluginlaminascontroller

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/reinfi-laminas-typed-params/health.svg)

```
[![Health](https://phpackages.com/badges/reinfi-laminas-typed-params/health.svg)](https://phpackages.com/packages/reinfi-laminas-typed-params)
```

###  Alternatives

[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)[rwoverdijk/assetmanager

An assetmanager module for Laminas.

2142.1M49](/packages/rwoverdijk-assetmanager)[laminas/laminas-component-installer

Composer plugin for injecting modules and configuration providers into application configuration

304.4M108](/packages/laminas-laminas-component-installer)[sylius/promotion

Flexible promotion management for PHP applications.

28505.6k15](/packages/sylius-promotion)[sylius/money-bundle

Currencies and money formatting engine bundle for Symfony.

19681.3k26](/packages/sylius-money-bundle)[sylius/product

Product catalog system with support for product options and variants.

24394.2k22](/packages/sylius-product)

PHPackages © 2026

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