Askerakbar/lens - simple SQL query logger for Laminas MVC

Just shipped a small side project:
Lens it is a simple SQL query logger for Laminas MVC.

What it does:

  • Logs every DB query in your app (with timing, bindings, stack trace, etc.)
  • Clean UI at /lens to browse and search
  • No fancy setup — just install & go

Things to keep in mind, it is still in development stage.

  • Only tested on Laminas MVC ^3.7 + PDO_MySQL
  • Haven’t tested with PostgreSQL or other DBs yet
  • Use in dev only :folded_hands:

Yeah, I know Laminas MVC is being sunset but this was mainly for short term use in existing projects.

Repo : GitHub - askerakbar/lens: A sleek, simple and developer friendly SQL query logger for Laminas MVC applications.

Thank you!

1 Like

Hello and welcome to our forum! :smiley:

I have two notes:

  • the onBootstrap method in the module class is not needed, check the documentation of laminas-eventmanager
  • laminas-db should be added to the required section of the Composer configuration file

Thank you for your module and for publishing it here!