Repository navigation
Conversation
|
Bei uns haben ja eigentlich alle Queries einen dynamischen Tabellennamen, wie |
|
Im detail noch nicht getestet. Variablen im query sind kein problem, siehe https://github.com/staabm/phpstan-dba/blob/8c42e3874f80489ce09cd62853ccd1ec1acdac8f/tests/data/pdo.php#L52 bzgl der tabellen, denke ich müsste ich eine dynamische return-type extension schreiben, da wir ja den konkreten tabellen-namen zur analyse zeit kennen.. müssen ihn phpstan nur mitteilen |
| @@ -82,7 +82,7 @@ public function hasMessage() | |||
| public function getName($id) | |||
| { | |||
| $this->sql->setQuery(' | |||
There was a problem hiding this comment.
ahh ich denke hier muss ich im phpstan-dba noch support für placeholder im sql einbauen
| php redaxo/bin/console package:install phpmailer --ansi | ||
| php redaxo/bin/console package:install cronjob --ansi | ||
| php redaxo/bin/console package:install cronjob/article_status --ansi | ||
| php redaxo/bin/console package:install cronjob/optimize_tables --ansi | ||
| php redaxo/bin/console package:install debug --ansi | ||
| php redaxo/bin/console package:install structure/history --ansi | ||
| php redaxo/bin/console package:install structure/version --ansi |
There was a problem hiding this comment.
alle packages installieren, damit das db schema vollständig ist
There was a problem hiding this comment.
Bedeutet das, dass man zukünftig auch lokal beim Ausführen von phpstan eine bestimmte DB-Konstellation braucht?
There was a problem hiding this comment.
This reverts commit 290f0b2.
| return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType(); | ||
| } | ||
|
|
||
| private function resolveTypeFromString(string $vartype): ?Type |
There was a problem hiding this comment.
@gharlan könntest du hier mal drüber schauen was hier noch fehlt, damit diese extension hier "genauso schlau" ist wie die im psalm-plugin?
There was a problem hiding this comment.
Wenn ich das richtig sehe, sind vor allem die Typen in Array-Struktur nicht implementiert. Also sowas.
|
das sieht schonmal sehr gut aus. offen: -> in -> hier könnte via phpstan-dba der daten-type der datenbank spalte zurückgegeben werden
|
|
das aktuelle analyse result zeigt schön, wo phpstan aktuell keine typen kennt (d.h. ggf. fehlen paar phpdocs oder extensions damit er unseren code besser versteht) |
| class: staabm\PHPStanDba\Rules\SyntaxErrorInPreparedStatementMethodRule | ||
| tags: [phpstan.rules.rule] | ||
| arguments: | ||
| classMethods: | ||
| - 'rex_sql::setQuery' | ||
| - 'rex_sql::setDBQuery' | ||
| - 'rex_sql::getArray' | ||
| - 'rex_sql::getDBArray' | ||
|
|
||
| - | ||
| class: staabm\PHPStanDba\Rules\SyntaxErrorInQueryMethodRule | ||
| tags: [phpstan.rules.rule] | ||
| arguments: | ||
| classMethods: | ||
| - 'rex_sql::setQuery#0' | ||
| - 'rex_sql::setDBQuery#0' | ||
| - 'rex_sql::getArray#0' | ||
| - 'rex_sql::getDBArray#0' | ||
| - 'rex_sql::prepareQuery#0' | ||
| - 'rex_sql::getQueryType#0' |
There was a problem hiding this comment.
aufgrund von staabm/phpstan-dba#245 kann hier ggf. die doppelte konfiguration in SyntaxErrorInPreparedStatementMethodRule und SyntaxErrorInQueryMethodRule jetzt wegfallen
|
habe phpstan-dba jetzt im rahmen von rexstan integriert |

Todo/Offen