Skip to content

Incorrect errors after upgrading to 0.12.9 for php-decimal extension and stub #3482

@maks-rafalko

Description

@maks-rafalko

Bug report

Code snippet that reproduces the problem

new Decimal(0);

Expected output (0.12.8)

no issue

Actual output (0.12.9)

Parameter #1 $value of class Decimal\Decimal constructor expects string, int given.

We are using stubs for Decimal\Decimal class, and it allows int:

https://github.com/php-decimal/stubs/blob/683b5c68b13c14373df9e835f98926c62c73c29d/Decimal.php#L30

I'm not sure PHPStan used this stub file before, or started using it after 0.12.9, but something has changed ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions