Skip to content

Releases: onlime/laravel-sql-reporter

v1.3.0

15 Oct 21:23
ef244fc
Compare
Choose a tag to compare
  • Upgrade Pest to v3
  • Drop Laravel 10 support and fixed CI

v1.2.3

12 Sep 14:39
169af80
Compare
Choose a tag to compare
  • Made datetime format of formatted header configurable and added TZ offset to default format Y-m-d H:i:s P.
  • Fix | Prevent duplicate logging when a console command is called from a regular web request (e.g. programmatically executing an Artisan command with Artisan::call()). In web context, we're now only logging on RequestHandled event, while in console only on CommandFinished event.

v1.2.2

21 Mar 22:21
c4d914a
Compare
Choose a tag to compare
  • The Writer object now has a static shouldReportSqlQuery() method to define a custom callback for filtering queries included in the QueryLogWritten event. by @pascalbaljet in #4
  • The SqlQuery object is now a readonly class, and all the getter methods have been removed. This is a breaking change.
  • The SqlQuery object now includes the unprepared query and bindings.
  • Added tests for the reporting mechanism and the QueryLogWritten event
  • Drops support for 8.1

v1.2.1

14 Mar 12:49
4d88fff
Compare
Choose a tag to compare
  • Fix | It now runs the whole test suite with a single vendor/bin/pest command. by @pascalbaljet in #3
  • Moved FormatterTest and SqlLoggerTest to the Feature directory as they're interacting with the app container.
  • Single Request mock in FormatterTest.

v1.2.0

11 Mar 15:55
bb432ab
Compare
Choose a tag to compare
  • Feature | Dispatch QueryLogWritten event after writing queries to the log, so that the whole query log can be accessed for further processing, e.g. generating reports/notifications.
  • Feature | Added auth guard information to log headers.
  • Laravel 11 support.
  • Migrated to Pest for testing (by @pascalbaljet in #2)
  • Added GitHub actions for all supported Laravel and PHP versions.
  • Introduced orchestra/testbench dev dependency instead of the whole Laravel framework.
  • Improved Service Provider: fixed the publish tag and use the regular base ServiceProvider.
  • Improved WriterTest by not mocking the Config class but using the real config values.

v1.1.0

16 Jul 20:01
7850b86
Compare
Choose a tag to compare
  • Drop Laravel 9 support, require Laravel v10.15 or higher for the new DB::getRawQueryLog() support.
  • PHP code style fixes by laravel/pint v1.10, now using more strict style rules (laravel preset).
  • Refactored whole codebase from DB::getQueryLog() to use the new DB::getRawQueryLog() method, so ReplacesBindings is no longer needed.
  • Replaced torann/geoip by stevebauman/location for optional GeoIP support.
  • Improved username detection in Formatter headers, so that it works both with default email field or custom username() method on User model.

v1.0.1

26 Feb 12:03
a4ddd2f
Compare
Choose a tag to compare
  • Allow bindings to be null.
  • Drop Laravel 8 / PHP 8.0 support
  • Integrated laravel/pint as dev requirement for PHP style fixing
  • Support Laravel 10

v1.0.0

10 Feb 08:50
Compare
Choose a tag to compare
  • Support Laravel 9
  • Added some function return types and cleaned up phpdoc comments.

v0.9.1

03 Jun 08:46
Compare
Choose a tag to compare

Added

  • Added new config param queries.exclude_pattern (env var SQL_REPORTER_QUERIES_EXCLUDE_PATTERN) to narrow down queries to be logged without bloating include pattern regex.
  • Added unit tests for Writer, testing query include/exclude patterns and min exec time.

Changed

  • Renamed SQL_REPORTER_QUERIES_PATTERN env var to SQL_REPORTER_QUERIES_INCLUDE_PATTERN
  • Renamed methods in Writer for clarity.
  • Improved testability of Writer::writeQuery() by returning true if query was written to log.

v0.9

02 Jun 09:59
Compare
Choose a tag to compare

Initial release