PHPackages                             packagefactory/atomicfusion-constants - 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. packagefactory/atomicfusion-constants

AbandonedNeos-package[Utility &amp; Helpers](/categories/utility)

packagefactory/atomicfusion-constants
=====================================

Language construct for constants as an addition to Neos.Fusion

v1.0.0(8y ago)38PHP

Since Apr 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/PackageFactory/atomic-fusion-constants)[ Packagist](https://packagist.org/packages/packagefactory/atomicfusion-constants)[ RSS](/packages/packagefactory-atomicfusion-constants/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PackageFactory.AtomicFusion.Constants
=====================================

[](#packagefactoryatomicfusionconstants)

> Constants as a language construct for fusion

Warning!
--------

[](#warning)

This is experimental technology. Constants are currently not part of the fusion language. You can however install this package to make this functionality available to your project.

Our goal is to make this part of the fusion core in the future. It is very likely though, that Syntax, Scoping and implementation details will deviate from what is presented here.

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

[](#installation)

PackageFactory.AtomicFusion.Constants is available via packagist. You can install this package with composer:

```
composer require packagefactory/atomicfusion-constants
```

We use semantic-versioning so every breaking change will increase the major-version number.

Usage
-----

[](#usage)

This package introduces the `const:` declaration, that let's you define constants within a fusion file. With `const::*` you can use the defined constant anywhere in your fusion file:

```
const: PI = 3.14

prototype(Vendor.Site:MyCircleArea) < prototype(PackageFactory.AtomicFusion:Component) {
	radius = 5
	renderer = ${const::PI * props.radius * props.radius}
}

```

Constants are scoped to the file they are defined in and cannot be overwritten or redeclared within that file.

Constant names need to be ALL\_UPPERCASE and can contain letters, numbers and underscores. A name needs to start with either a letter or an underscore.

Magic Constants
---------------

[](#magic-constants)

### \_\_FILE\_\_

[](#__file__)

Similar to PHP's `__FILE__` constant, you can use `const::__FILE__` to reference the location of the current fusion file.

```
prototype(Vendor.Site:MyContentElement) < prototype(Neos.Fusion:Template) {
	@process.attachFileName = ${value + 'Brought to you by ' + const::__FILE__}
}

```

### \_\_DIR\_\_

[](#__dir__)

Similar to PHP's `__DIR__` constant, you can use `const::__DIR__` to reference the directory of the current fusion file.

```
prototype(Vendor.Site:MyContentElement) < prototype(Neos.Fusion:Template) {
	templatePath = ${const::__DIR__ + '/MyContentElement.html'}
}

```

License
-------

[](#license)

see [LICENSE file](LICENSE)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

2950d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1159e78bff9c03cc5ed626447ca5072097107f58af459a9b8bac8d933ba8298c?d=identicon)[wilhelm.behncke](/maintainers/wilhelm.behncke)

---

Top Contributors

[![grebaldi](https://avatars.githubusercontent.com/u/2522299?v=4)](https://github.com/grebaldi "grebaldi (15 commits)")

### Embed Badge

![Health badge](/badges/packagefactory-atomicfusion-constants/health.svg)

```
[![Health](https://phpackages.com/badges/packagefactory-atomicfusion-constants/health.svg)](https://phpackages.com/packages/packagefactory-atomicfusion-constants)
```

###  Alternatives

[neos/fusion-form

Fusion Form

19724.3k31](/packages/neos-fusion-form)[packagefactory/atomicfusion-proptypes

Fusion port of react-propTypes for the fusion-prototypes PackageFactory.AtomicFusion:Component and Neos.Fusion:Component

12200.0k4](/packages/packagefactory-atomicfusion-proptypes)

PHPackages © 2026

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