Closed mdumoulin closed 6 days ago
Could you provide a reproduction example?
If you try to analyse the following class, you should reproduce. Note, there is an inconsistency between iterable $ids
and the type documented in Connection::executeQuery() for $queryParams. If you replace iterable
by array, the Internal error
is no longer triggered.
<?php
namespace Test;
use Doctrine\DBAL\Connection;
class Test
{
public function __construct(private Connection $connection)
{
}
public function getIds(iterable $ids): array
{
return $this
->connection
->executeQuery(
'SELECT id FROM table WHERE id IN (:list)',
['list' => $ids],
['list' => DBAL\Connection::PARAM_INT_ARRAY],
)
->fetchFirstColumn();
}
}
fixed in https://github.com/staabm/phpstan-dba/pull/693 - released in https://github.com/staabm/phpstan-dba/releases/tag/0.2.84
thanks for the repro
I am trying to add phpstan-dba extension on my project and when I am running the analyse command, I get a report of errors like expected, but also the following exception at the end :
Installed versions of libraries are :
Here is the trace when running analyse in verbose mode :