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

The plugin breaks type check of valid extended dbal connection class #91

Open
zerkms opened this issue Jun 17, 2021 · 1 comment
Open

Comments

@zerkms
Copy link
Contributor

zerkms commented Jun 17, 2021

<?php
declare(strict_types=1);

namespace Repro;

class Conn extends \Doctrine\DBAL\Connection
{
}
Scanning files...
Analyzing files...



ERROR: MethodSignatureMismatch - src/Conn.php:6:7 - Argument 1 of Doctrine\DBAL\Connection::prepare has wrong type 'string', expecting '' as defined by Doctrine\DBAL\Driver\Connection::prepare (see https://psalm.dev/042)
class Conn extends \Doctrine\DBAL\Connection


------------------------------
1 errors found
------------------------------

Checks took 0.00 seconds and used 4.382MB of memory
No files analyzed
Psalm was unable to infer types in the codebase

Repro: https://github.com/zerkms/psalm-plugin-doctrine-issue-91

I cannot see anything particularly suspicious in the stub, so it also could be a psalm bug.

@snapshotpl
Copy link

snapshotpl commented Aug 23, 2021

Same error in my project. Same case - extends \Doctrine\DBAL\Connection

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

No branches or pull requests

2 participants