Project Options List

Tier 0 · Story 10Complete

This is the complete reference for all options available in tyhp.json. Options can also be passed as CLI arguments where noted. CLI arguments take precedence over file-based configuration.

General Options

Source File Options

Output Options

These options are nested under the "output" key in tyhp.json.

Build Options

These options are nested under the "build" key in tyhp.json, except where noted.

Not in this alpha

build.generateSourcemap and build.generateTyhpdef are planned (Stories 17 and 20) and do not produce output in 805.0.0-alpha.1.

Optimization Options

Tier 3 · Story 23Planned

Not in this alpha

Optimizer options are Stories 23/24. In this alpha the optimize pass is a no-op.

These options are nested under the "build" key in tyhp.json and control the compiler optimizer. Each option also has a corresponding CLI flag that overrides the file value.

PSR-4 Autoload Options

Checker Options

These options are nested under the "checker" key in tyhp.json. They control resource limits and tooling behavior — not language strictness.

Note

Null safety, required type annotations, and narrowing mixed before use are unconditional language rules. There are no checker.* toggles that relax them.

Tyhpdef Options

CLI-Only Options

These options are only available as command-line arguments and override corresponding config file values.

Lint-Specific Options

Action-Specific Options

Complete Example

Below is a comprehensive tyhp.json showing all available options with their default values. In practice, you only need to specify the options you want to change from their defaults.

{
    "type": "application",
    "quiet": false,
    "locale": "en-US",

    "include": ["./src/**/*.tyhp", "./src/**/*.php"],
    "exclude": ["./src/legacy/**"],
    "source": {
        "tagless": false
    },

    "output": {
        "path": "./build",
        "phpVersion": "8.4",
        "strictTypes": true,
        "namespacePrefix": null,
        "comments": true
    },

    "build": {
        "generateSourcemap": false,
        "sourcemapIncludeContent": false,
        "generateTyhpdef": false,
        "updateComposer": false,
        "structBacking": "array",
        "decimalBacking": "bcmath",
        "decimalScale": 28,
        "decimalRounding": "halfUp",
        "allowEval": false,
        "experimentalReadonlyCloneWith": false,
        "runtimeGenericChecks": false
    },

    "psr4": {
        "App\\": "src/"
    },

    "checker": {
        "templateStringMaxStates": 256,
        "maxFixIterations": 10
    },

    "tyhpdefInclude": ["./tyhpdef/**/*.tyhpdef"],
    "tyhpdefExclude": []
}