PHPackages                             smic/fluid-signature - 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. [Templating &amp; Views](/categories/templating)
4. /
5. smic/fluid-signature

ActiveTypo3-cms-extension[Templating &amp; Views](/categories/templating)

smic/fluid-signature
====================

ViewHelper to define expected variables in a fluid template

23.8kPHP

Since May 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/smichaelsen/fluid-signature)[ Packagist](https://packagist.org/packages/smic/fluid-signature)[ RSS](/packages/smic-fluid-signature/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Fluid Signature
===============

[](#fluid-signature)

Define expected variables of fluid templates.

> **Warning**: Fluid has a [similiar functionality](https://github.com/NamelessCoder/Fluid/blob/master/src/ViewHelpers/ParameterViewHelper.php) in version 3.x and plans to have it also in 2.x. This solution is not compatible with what might become available in TYPO3 soon. If you want to migrate to the native functionality later it will be manual labor.

Why?
----

[](#why)

Fluid often silently fails when you forget to pass a variable to a template, because any undefined variable will just evaluate as null.

```

Hello {firstName} {lastName}!

```

=&gt; Hello Kasper !

On the other hand fluid also doesn't care if you pass variables to a template that aren't used.

```

Hello {firstName}!

```

=&gt; Hello Kasper!

That means passing too many or too few variables or mistyping their name is a common source of error.

Solution
--------

[](#solution)

By using an `` tag you can define the expected variables at a certain point in your fluid code.

```

    Hello {firstName} {lastName}{f:if(condition: country, then: ' from {country}')}!

=> ❌ Exception: Required fluid variable lastName is not available

=> ❌ Exception: Variable profession was provided but not allowed

=> ✅ Hello Kasper Skårhøj!

=> ✅ Hello Kasper Skårhøj from Denmark!

```

Attributes
----------

[](#attributes)

`required`: Comma separated list of variables. If given, an exception is thrown if any of the variables in not defined in the current variable context.

`allowed`: Comma separated list of variables. If given the current variable context is checked for any variables that are not in `required` or `allowed` and an exception is thrown if a variable is found. `allowed=""` means only the `required` variables are allowed.

`defaultValues`: Associative array. `defaultValues="{country: 'Iceland'}"` means `country` will be set to `Iceland` if it is not defined in the current variable context.

Installation
------------

[](#installation)

`composer require smic/fluid-signature dev-main`

The package is tested with TYPO3 v10, but should be compatible from v8 to v11.

I'll accept bug reports for TYPO3 v10 and v11 and pull requests for earlier versions.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/886face3e57e668db2bf95d62325f423baf7e9d8949a9e4c84d3a0e6c3891920?d=identicon)[smichaelsen](/maintainers/smichaelsen)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/smic-fluid-signature/health.svg)

```
[![Health](https://phpackages.com/badges/smic-fluid-signature/health.svg)](https://phpackages.com/packages/smic-fluid-signature)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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