Skip to content

v2.2.0 — maintenance & quality pass

Latest

Choose a tag to compare

@halilcosdu halilcosdu released this 03 Jul 20:40

Maintenance and quality pass. No public API breaks. Reviewed jointly with Codex/GPT-5.5.

Fixed

  • Safe EXPLAINRecommendationService now resolves the captured query's own connection and runs a non-executing EXPLAIN (never EXPLAIN ANALYZE), with a per-driver statement form (pgsql/mysqlEXPLAIN, sqliteEXPLAIN QUERY PLAN, others skipped). Multi-statement input is rejected and EXPLAIN failures are reported without breaking analysis. The previous explain analyse was Postgres-only and could actually execute captured production SQL (e.g. UPDATE/DELETE).
  • Retryable recommendations — a record is only marked is_analyzed when the AI returns a non-empty recommendation. Empty results stay is_analyzed=false and are retried on the next scheduled slower:analyze. The command now prints an Analyzed | Skipped summary.
  • No more swallowed errorscreateRecord reports failures via report() (without the raw SQL) and catches Throwable, so logging slow queries can never break the request.
  • Correct iterationslower:clean and slower:analyze switched to chunkById.

Changed

  • Default recommendation_model: deprecated gpt-4 (shut down 2026-10-23) → gpt-5.4-mini. Pin SLOWER_AI_RECOMMENDATION_MODEL=gpt-4 to keep old behaviour.
  • CI now tests PHP 8.4 (matrix: 8.2/8.3/8.4 × L10–13).
  • openai-php/laravel^0.18.0, dependabot/fetch-metadata2.5.0.

Documentation / internals

  • README config example synced with slower.php, ai_service driver switch documented, broken third-party screenshot removed, upgrade note added.
  • OpenAiDriver now type-hints OpenAI\Contracts\ClientContract (substitutable/fakeable).
  • +13 behavior tests (RecommendationServiceTest, extended CommandsTest, SlowLogFactory). Suite: 39 passed. PHPStan level 5: clean. Pint: clean.

Full Changelog: v2.1.0...v2.2.0