markus staab · @markusstaab
93 followers · 251 posts · Server phpc.social

crossed the 200 stars 🌟

it may also be helpful for you, in case you don‘t use fully fledged orm. It covers your database access layer with type inference based on the database schema

github.com/staabm/phpstan-dba

---

the idea behind phpstandba in a few slides

staabm.github.io/talks/phpstan

#phpstandba #Phpstan

Last updated 1 year ago

markus staab · @markusstaab
83 followers · 238 posts · Server phpc.social

Just published the slides of my @phpugffm talk

" - check your sql queries like a boss"

staabm.github.io/talks/phpstan

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
70 followers · 229 posts · Server phpc.social

RT @markusstaab
check your sql queries like a boss. resultset type inference included.

next level static analysis - using the extension for @phpstan

Supports @doctrineproject DBAL, PDO, mysqli with MySQL/MariaDB and @PostgreSQL.

github.com/staabm/phpstan-dba

plz RT

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
70 followers · 229 posts · Server phpc.social

RT @markusstaab
I started preparing slides for my presentation about , which will be the topic of my

“Check sql queries like a boss – next level static analysis”

talk at @phpugffm on 22th of april in

#phpstandba #ffm

Last updated 1 year ago

markus staab · @markusstaab
70 followers · 219 posts · Server phpc.social

I started preparing slides for my presentation about , which will be the topic of my

“Check sql queries like a boss – next level static analysis”

talk at @phpugffm on 22th of april in

#phpstandba #ffm

Last updated 1 year ago

markus staab · @markusstaab
61 followers · 183 posts · Server phpc.social

RT @markusstaab
check your sql queries like a boss. resultset type inference included.

next level static analysis - using the extension for @phpstan

Supports @doctrineproject DBAL, PDO, mysqli with MySQL/MariaDB and @PostgreSQL.

github.com/staabm/phpstan-dba

plz RT

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
59 followers · 175 posts · Server phpc.social

Seems I will have my very first podcast with @sddevclub on may the 2nd.

We will talk about in .. most likely about @phpstan and/or one of my custom extensions like (in german).

I think it will be a lot of fun 🤩

#static #analysis #php #phpstandba

Last updated 1 year ago

markus staab · @markusstaab
59 followers · 147 posts · Server phpc.social

RT @markusstaab
Detect slow queries before they hit your production database using extension for @phpstan

staabm.github.io/2022/08/16/ph

#phpstandba #php #staticanalysis

Last updated 1 year ago

markus staab · @markusstaab
54 followers · 143 posts · Server phpc.social

learnt to narrow result types when joins are used.

it narrows e.g. integer ranges and also takes nullability into account.

feedback welcome

github.com/staabm/phpstan-dba/

#phpstandba #sql #php #staticanalysis

Last updated 1 year ago

markus staab · @markusstaab
54 followers · 142 posts · Server phpc.social

RT @markusstaab
check your sql queries like a boss. resultset type inference included.

next level static analysis - using the extension for @phpstan

Supports @doctrineproject DBAL, PDO, mysqli with MySQL/MariaDB and @PostgreSQL.

github.com/staabm/phpstan-dba

plz RT

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
54 followers · 134 posts · Server phpc.social

Just implemented a stateful object aware extension for the sql query builder from @REDAXO CMS.

Combined it with and the latest SQL AST type inference work and you get the really cool phpstan type inference results.

not super clean, but powerfull :)

#Phpstan #phpstandba

Last updated 1 year ago

markus staab · @markusstaab
50 followers · 119 posts · Server phpc.social

just released the next release.

opt-in sql ast based type inference is getting serious.
we support all control flow functions. also a lot of often used ones. based on

overview: github.com/staabm/phpstan-dba/

//cc @paranoiq

#phpstandba #sqlftw

Last updated 1 year ago

markus staab · @markusstaab
50 followers · 118 posts · Server phpc.social

released:
---
RT @markusstaab
with opt-in sql ast support to narrow types of mysql functions used in SELECT-part of the query was just released.

Give it a try, but read the releasenotes regarding requirements first.

Feedback welcome 🤗

github.com/staabm/phpstan-dba/
twitter.com/markusstaab/status

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
50 followers · 117 posts · Server phpc.social

with opt-in sql ast support to narrow types of mysql functions used in SELECT-part of the query was just released.

Give it a try, but read the releasenotes regarding requirements first.

Feedback welcome 🤗

github.com/staabm/phpstan-dba/

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
50 followers · 116 posts · Server phpc.social

pushed a new release.

@votrubaT contributed php 7.2 compat (now we have the same php-src version range then the upstream @phpstan)

hemberger (github handle) added support for placeholder validation in write queries.

more is already in the pipeline :-)

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
49 followers · 114 posts · Server phpc.social

Today learnt type inference on mysql CONCAT() and CONCAT_WS().

Watch out for all the nuances of string and null types.
I love it already :-)

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
49 followers · 108 posts · Server phpc.social

doing slow progress on the sql query ast based type narrowing in

implemented count(), coalesce(), ifnull() and sql-ast <-> phpstan type-mappings for now.

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
49 followers · 107 posts · Server phpc.social

Spent some time for a very rough first prototype which adds sql ast inference capabilities.

at the moment it only support result type narrowing for expressions based on the count() mysql function.

#phpstandba

Last updated 1 year ago

markus staab · @markusstaab
34 followers · 83 posts · Server phpc.social

the latest release supports analyzing write queries even on non transactional databases and tables, since these queries are no longer executed in a writable manner.

github.com/staabm/phpstan-dba/

#phpstandba

Last updated 2 years ago

markus staab · @markusstaab
34 followers · 79 posts · Server phpc.social

learnt to analyze write-queries. its a new opt-in feature which need to be activated via the RuntimeConfiguration within your bootstrap file

it requires transaction support in your database (e.g. InnoDB) and your used driver

feedback welcome

github.com/staabm/phpstan-dba/

#phpstandba

Last updated 2 years ago