anomaly/decimal-field_type
A Laravel/PHP decimal field type for Anomaly CMS that adds fixed-point numeric fields to Streams. Configure precision and scale for reliable input, validation, and storage of prices, rates, and other decimal values requiring consistent accuracy.
Verdict up front: this is not a package to adopt, it is a package to read, fork, or reimplement. It is a single-purpose addon for the Anomaly Labs Streams Platform (the engine behind PyroCMS 3.x), not a general-purpose Laravel library. Its entire value is contingent on already running that CMS. At 0 stars, 0 dependents, no release since June 2020, and a composite score of 0.36, it carries the classic profile of an abandoned micro-addon: small, MIT-licensed, trivially reproducible, and unsupported.
Architecture fit
The package contributes one field type to the Streams Platform's field type registry. It ships a field type class extending the platform's base FieldType, a presenter, a config block (decimal places, min/max, possibly step), validation rules, and a database column type mapping to SQL DECIMAL(p,s). Registration happens through the platform's addon service provider and manifest, not through anything a vanilla Laravel application would consume. If the target system is not Streams/PyroCMS, the architecture fit is zero — there is no reusable decimal value object, cast, or validation rule here that survives extraction in a meaningful way. If the target is Streams, the fit is good by construction: it uses the platform's own extension points exactly as intended, which is precisely why it is so small.
Integration feasibility
Mechanically easy: composer require anomaly/decimal-field_type, service provider auto-discovery, then enable the addon and assign the field type to a stream field in the admin UI. The real gate is dependency resolution — the addon will carry a constraint against anomaly/streams-platform of roughly the 1.x/Laravel 5.5–6.x era, and Composer will refuse or silently downgrade on a modern Laravel. Feasibility therefore collapses to a single question: what platform version is in production? On a frozen legacy PyroCMS install, integration is an afternoon. On anything current, it is a non-starter without a fork and rewrite.
Technical risk
| Risk | Severity | Notes |
|---|---|---|
| Abandonment | High | No release in ~5 years, no dependents, no issue traffic. Assume no upstream fixes, ever. |
| Framework drift | High | PHP 7.x / Laravel 5.x-era constraints and idioms; unverified on PHP 8.1+ and Laravel 9+. |
| Supply chain | Low | MIT, tiny surface area, no transitive weight beyond the platform you already run. Forking is unencumbered. |
| Correctness | Medium | Decimal handling invites rounding, precision, and locale-separator bugs; no evidence of a test suite to confirm behavior. |
| Redundancy | Medium | The Streams Platform or the host app may already provide adequate numeric/decimal field handling, making the addon unnecessary. |
Key questions
DECIMAL(10,2) vs. (19,4)), and does the addon's config expose scale independently of precision?Stack fit
| Component | Requirement | Assessment |
|---|---|---|
| Framework | Laravel 5.5–6.x era | Modern Laravel: no fit |
| Platform | anomaly/streams-platform 1.x |
Mandatory; no standalone mode |
| PHP | 7.2–7.4 likely | Verify before any install on 8.x |
| Database | Column type DECIMAL(p,s) |
Portable across MySQL/Postgres |
| Front end | Platform-standard field input | Verify it is not tied to a specific admin theme build |
Migration path
Three realistic paths, in order of preference:
composer.json, and treat it as first-party code. Appropriate only if a legacy platform must stay untouched and reimplementation is politically or contractually blocked.Compatibility
The decisive checks before committing to any path: run composer why-not anomaly/streams-platform in the target project; inspect the addon's composer.json for platform and PHP constraints; run the platform's test suite plus a manual smoke test of decimal entry, validation rejection, and reload on PHP 8.x. Watch for Laravel helper removals (str_*, array_*), nullable-parameter deprecations, and any use of the string/array helpers in the presenter or validation path.
Sequencing
DECIMAL(19,4) for money) enforced in config rather than per-field discretion.Maintenance
Ownership transfers to you on day one. That is not a burden here — the codebase is small enough to audit in an afternoon and rewrite in a day — but it must be an explicit line item, not an assumed inheritance. Budget a fork-maintenance line and a named owner; an unowned fork is worse than an unowned dependency because nobody is watching upstream either.
Support
There is no upstream support channel with meaningful activity. Internal documentation should capture the field type's config options, the chosen precision/scale convention, and the rounding behavior, because the original author will not be answering questions in 2027.
Scaling
Runtime cost is negligible — a decimal column and a form input. The scaling concern is semantic, not performance: inconsistent precision across streams, aggregation and reporting queries that silently round, and downstream exports or analytics that reinterpret scale. Standardize precision at the platform level and enforce it in code review.
Failure modes
Ramp-up
Low for a developer already fluent in Streams addon conventions — half a day to read, one to two days to reimplement with tests. Effectively infinite for a developer without Streams experience, because the learning cost is the platform, not the addon. That asymmetry is the strongest argument for treating this as a template to copy rather than a dependency to install.
How can I help you explore Laravel packages today?