Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeToArrayConverter PHPStan error #72

Open
FVesely opened this issue Feb 15, 2024 · 0 comments
Open

TypeToArrayConverter PHPStan error #72

FVesely opened this issue Feb 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@FVesely
Copy link

FVesely commented Feb 15, 2024

Library version

v1.x-dev

Description

If I use TypeToArrayConverter instead of TypeToStringConverter I get a PHPStan error.

Steps to reproduce

$printer = new ErrorVisualPrinter(new TypeToArrayConverter());

Actual Behavior

 Parameter #1 $converter of class Orisai\ObjectMapper\Printers\ErrorVisualPrinter constructor expects Orisai\ObjectMapper\Printers\TypeToPrimitiveConverter<array>,  
         Orisai\ObjectMapper\Printers\TypeToArrayConverter given.                                                                                                            
         💡 Template type T on class Orisai\ObjectMapper\Printers\TypeToPrimitiveConverter is not covariant.

Expected Behavior

No error

Addition information

No response

@FVesely FVesely added the bug Something isn't working label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant