Problem Statement
The init() array-shape docblock in src/functions.php documents the accepted keys of the $options array (used for IDE/static-analysis autocompletion and as the de facto reference for SDK options). It is missing the enable_metrics key, even though the option is fully implemented and functional:
Options::setEnableMetrics() / Options::getEnableMetrics() exist
- The resolver declares
enable_metrics with an allowed type of bool and a default of true
Because the docblock is the primary reference IDEs (and developers) rely on for init(), users have no discoverable, type-checked way to learn that enable_metrics is a valid option — they only find it by reading Options.php directly. This is purely a documentation gap; behavior is unaffected.
It is also reported by phpstan as an error.
Solution Brainstorm
- Minimal fix: add
enable_metrics?: bool, to the @param array{...} docblock in src/functions.php, alphabetically between enable_logs and environment, matching the existing style for every other option.
Problem Statement
The
init()array-shape docblock insrc/functions.phpdocuments the accepted keys of the$optionsarray (used for IDE/static-analysis autocompletion and as the de facto reference for SDK options). It is missing theenable_metricskey, even though the option is fully implemented and functional:Options::setEnableMetrics()/Options::getEnableMetrics()existenable_metricswith an allowed type ofbooland a default oftrueBecause the docblock is the primary reference IDEs (and developers) rely on for
init(), users have no discoverable, type-checked way to learn thatenable_metricsis a valid option — they only find it by readingOptions.phpdirectly. This is purely a documentation gap; behavior is unaffected.It is also reported by phpstan as an error.
Solution Brainstorm
enable_metrics?: bool,to the@param array{...}docblock insrc/functions.php, alphabetically betweenenable_logsandenvironment, matching the existing style for every other option.