PHPackages                             click66/psr-forms - 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. click66/psr-forms

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

click66/psr-forms
=================

PSR-compliant form handling and rendering for PHP

0.2.0(5mo ago)038GPL-2.0-onlyPHPPHP ^8.2

Since Oct 17Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/click66/php-psr-forms)[ Packagist](https://packagist.org/packages/click66/psr-forms)[ RSS](/packages/click66-psr-forms/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

PSR Forms
=========

[](#psr-forms)

Very simple stateless form renderer and handler, compliant with PSR request and response interfaces.

Still a work in progress.

Currently utilises the Formr library () as a base.

Example usage
-------------

[](#example-usage)

### Simple implementation

[](#simple-implementation)

```
$factory = new \Click66\Forms\Factory();
$formr = \Click66\Forms\Formr\Adaptr();

$formRenderer = $factory->makeFormRenderer($formr);
$formHandler = $factory->makeFormHandler($formr);

# In your POST route:
$response = $formHandler->process(
    $request,   # PSR-7 RequestInterface
    ['Name(required)', 'Message(required)'],
    function ($data) {
        var_dump($data);    # $data contains the validated form data

        if (true) { # Do something with your data
            return new \Click66\Forms\Result\Success('Thank you for using the service!');   # Messages flashed to session
        } else {
            return new \Click66\Forms\Result\Failure('Something has gone wrong, please try again later.');
        }
    }
)->respond(fn () => response(303)->withHeader('Location', '/form'));    # Return a PSR response. Will run at conclusion of form processing, regardless of outcome.
```

### Captcha usage

[](#captcha-usage)

```
$captcha = new \Click66\Forms\Captcha\Captcha(
    new \Click66\Forms\Captcha\Credentials(...),
    new \Click66\Forms\Captcha\RecaptchaV2\Verifier(...),   # Currently supports Google ReCaptcha v2.
)
$factory = (new \Click66\Forms\Factory())->withCaptcha($captcha);

# The rest is the same - CAPTCHA will be processed and validated automatically
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance71

Regular maintenance activity

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Total

2

Last Release

165d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7510cfac5bfff32978061b0fcc6d4ed0b61baee006e047ea6dc624171d85e604?d=identicon)[click66](/maintainers/click66)

---

Top Contributors

[![click66](https://avatars.githubusercontent.com/u/6927916?v=4)](https://github.com/click66 "click66 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/click66-psr-forms/health.svg)

```
[![Health](https://phpackages.com/badges/click66-psr-forms/health.svg)](https://phpackages.com/packages/click66-psr-forms)
```

###  Alternatives

[phpoffice/math

Math - Manipulate Math Formula

3111.7M8](/packages/phpoffice-math)

PHPackages © 2026

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