Skip to content

Fix Psalm MixedArgument in initial state product name wiring - #34

Open
printminion-co with Copilot wants to merge 1 commit into
copilot/cherry-pick-pr-32from
copilot/fix-static-psalm-analysis
Open

Fix Psalm MixedArgument in initial state product name wiring#34
printminion-co with Copilot wants to merge 1 commit into
copilot/cherry-pick-pr-32from
copilot/fix-static-psalm-analysis

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown

static-psalm-analysis dev-stable30 failed on BeforeTemplateRenderedListener because provideInitialState() received a mixed value from IConfig::getSystemValue(). This change removes the mixed-type path by using the string-typed config accessor for productName.

  • Root cause

    • IInitialState::provideInitialState('productName', ...) was fed by getSystemValue('ionos_product_name', ''), which Psalm infers as mixed.
  • Change

    • Switched productName config read to getSystemValueString('ionos_product_name') in lib/Listener/BeforeTemplateRenderedListener.php.
    • No behavior change intended; only type certainty at the call site.
  • Code snippet

    $this->initialState->provideInitialState(
        'productName',
        $this->config->getSystemValueString('ionos_product_name')
    );

Co-authored-by: printminion-co <145785698+printminion-co@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants