Skip to content

psalm broken #109

Description

@garak

Trying to run psalm in the container, you get:

root@18b47970c865:/application# bin/psalm
Target PHP version: 8.1 (inferred from composer.json)
Scanning files...
Analyzing files...

░░░░░░E░░░E░░░░

ERROR: TypeDoesNotContainNull - src/Render/LocalSvgRenderer.php:53:13 - string does not contain null (see https://psalm.dev/090)
        if (null === $this->templatesDirectory) {


ERROR: TypeDoesNotContainNull - src/Render/LocalSvgRenderer.php:68:13 - PUGX\Poser\Calculator\TextSizeCalculatorInterface does not contain null (see https://psalm.dev/090)
        if (null === $this->textSizeCalculator) {


ERROR: InvalidArrayOffset - src/Render/SvgForTheBadgeRenderer.php:63:50 - Cannot access value on variable $vendorDimensions using offset value of '0', expecting 'width' or 'height' (see https://psalm.dev/115)
        $parameters['vendorWidth']             = $vendorDimensions[0] + 2 * self::PADDING_X;


ERROR: InvalidArrayOffset - src/Render/SvgForTheBadgeRenderer.php:70:49 - Cannot access value on variable $valueDimensions using offset value of '0', expecting 'width' or 'height' (see https://psalm.dev/115)
        $parameters['valueWidth']             = $valueDimensions[0] + 2 * self::PADDING_X;


------------------------------
4 errors found
------------------------------

We need to fix the errors above and add a check in the CI, to avoid other possible future breaks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions