Skip to content
CAI
Software that uses CAICheck a score

prolic/fpp

58.4

Adequate · 22 September 2026

3.9k

lines of production code

PHP

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a domain-specific language (DSL) and code generation tool called FPP, designed to parse .fpp files and automatically generate corresponding PHP classes. It provides a configuration-driven pipeline that transforms data structures, commands, and events defined in the DSL into typed PHP code. The architecture supports immutable data types with functional accessors and includes a CLI tool for customizing the generation process.

Features

Introduce FPP file parser and code generation pipeline

Added new PHP files in src/Functions that implement a parser for the .fpp domain-specific language and a code generation pipeline. The changes include basic parser combinators (basic\_parser.php), FPP-specific parsers for namespaces, imports, and type definitions (fpp\_parser.php), and a main entry point (fpp.php) that scans directories for .fpp files, parses them, and generates PHP classes. This enables users to define data structures in .fpp files and automatically generate corresponding PHP code.

src/Functions · high confidence

Architecture

Refactored type system to use interfaces and configuration objects

The internal type system has been refactored to use the \Type\ interface instead of the \MabeEnum\-backed \Type\ class, and the \Definition\ class now relies on a new \TypeConfiguration\ object to manage parsing, building, and validation logic. This change removes the \Deriving\ and \DerivingSet\ classes in favor of a more flexible configuration-based approach, allowing for better separation of concerns and easier extension of type behaviors.

src · high confidence

Behavioural changes

Major rewrite of the FPP library with new build and CI configuration

The library has been rewritten from scratch, introducing support for immutable data types with functional accessors and setters. This release is a breaking change and is not compatible with version 0.1.0. The project now uses Kahlan for testing instead of PHPUnit, and includes new configuration files (.php\_cs, .travis.yml, autoload.php) to support the new structure and continuous integration.

(repo-wide) · high confidence

Refactored type system with dedicated classes for each primitive and domain type

The type definitions in src/Type have been refactored to use dedicated classes for each primitive and domain type, including Bool\, Command, Data, DateTimeImmutable, Enum, Event, Float\, Guid, Int\, Marker, String\, and Uuid. Each type now has its own file (e.g., Bool\_.php, Command.php) with specific parsing, building, and validation logic. This change improves code organization and maintainability by separating concerns for each type.

src/Type · high confidence

Updated demo files to reflect new FPP syntax and structure

The demo directory was updated to showcase the latest FPP syntax and structure. The old demo files (one.fpp, two.fpp, and generated.php) were removed, and new files (command.fpp, event.fpp, example.fpp) were added. These new files demonstrate the updated syntax for defining commands, events, and data types, including the use of namespaces, markers, and various data types like string, int, float, and enum.

demo · medium confidence

fpp CLI tool refactored to support configuration-driven generation

The fpp executable in the bin directory has been refactored to replace the previous hardcoded scanning and parsing logic with a configurable approach. The tool now supports a configuration array that defines type mappings, printer settings, and file parsing rules. A new --gen-config flag allows users to generate a default fpp-config.php file, enabling customization of the code generation process. The script now dynamically locates the autoloader and processes files based on the provided configuration, improving flexibility and maintainability.

bin · high confidence

Test coverage

Added test coverage for FPP parser components; Added unit tests for parser combinators and FPP helper functions; Removed obsolete test files.

Dependencies

Update PHP version requirement and replace dependencies

The project now requires PHP 7.4 instead of 7.1. The dependency on marc-mabe/php-enum has been removed and replaced with phunkie/phunkie, nette/php-generator, and nette/utils. In the dev dependencies, phpunit and prooph/php-cs-fixer-config have been replaced with kahlan/kahlan, satooshi/php-coveralls, and vimeo/psalm. The composer.json file also adds a BSD-3-Clause license and a bin entry for the fpp executable.

(dependencies) · medium confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 62 → 58 (-3.3)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 87 → 93 (+5.6)
  • Architecture 73 → 91 (+18.7)
  • Maturity 44 → 42 (-2.2)
  • Readiness 78 → 54 (-23.6)
  • Security 92 → 95 (+2.7)

Resolved (21)

  • Change coupling clique: Bool_.php, Data.php, Float_.php, Guid.php, Int_.php, String_.php, Uuid.php (src/Type/Bool_.php)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (src/Type/Guid.php)
  • Duplicated block (11 lines × 2) (src/Functions/fpp_parser.php)
  • Duplicated block (11 lines × 2) (src/Type/Command.php)
  • Duplicated block (5 lines × 14) (src/Functions/fpp_parser.php)
  • Duplicated block (5 lines × 4) (src/Functions/fpp_parser.php)
  • Duplicated block (7 lines × 11) (src/Type/Bool_.php)
  • Duplicated block (7 lines × 3) (src/Type/Float_.php)
  • Duplicated block (8 lines × 2) (src/Functions/fpp.php)
  • Duplicated block (9 lines × 2) (src/Type/Command.php)
  • Duplicated block (9 lines × 2) (src/Type/Command.php)
  • Duplicated block (9 lines × 2) (src/Type/Guid.php)
  • Duplicated block (9 lines × 3) (src/Type/Command.php)
  • Duplicated block (9 lines × 4) (src/Type/Bool_.php)
  • No exposed public API
  • Test reliability not included
  • The 'Add FPP File Type' step lists keywords but does not show how to configure the File Watcher's output path or error handling (the clip truncates it). (docs/PhpStorm-Integration.md)
  • The command message example uses 'RegisteredUser as registered-user' but the generated type is not shown in the text. (docs/Messages.md)
  • …and 1 more

New (19)

  • Dependency hygiene PARTLY measured — Composer dependencies read, no committed lock to grade for currency
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (src/Type/Command.php)
  • Duplicated block (11 lines × 2) (src/Type/Guid.php)
  • Duplicated block (12 lines × 2) (src/Functions/fpp_parser.php)
  • Duplicated block (12 lines × 3) (src/Type/Command.php)
  • Duplicated block (13 lines × 2) (src/Type/Command.php)
  • Duplicated block (13–15 lines × 2) (src/Type/Command.php)
  • Duplicated block (31 lines × 2) (src/Type/Guid.php)
  • Duplicated block (4–9 lines × 14) (src/Functions/fpp_parser.php)
  • Duplicated block (5 lines × 4) (src/Functions/fpp_parser.php)
  • Duplicated block (7 lines × 2) (src/Functions/fpp.php)
  • Duplicated block (7 lines × 3) (src/Type/Float_.php)
  • Duplicated block (7 lines × 4) (src/Type/Bool_.php)
  • Hotspot: src/Functions/fpp.php (src/Functions/fpp.php)
  • Members sharing a duplicated core (13 members, 50+ identical tokens) (src/Functions/fpp_parser.php)
  • Members sharing a duplicated core (4 members, 50+ identical tokens) (src/Type/Bool_.php)
  • No ADRs found

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

prolic/fpp was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 4ad74c54526a621005075bdca6a636de43511234 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.