Skip to content

Development#17

Merged
daycry merged 19 commits into
masterfrom
development
Jun 6, 2026
Merged

Development#17
daycry merged 19 commits into
masterfrom
development

Conversation

@daycry

@daycry daycry commented Jun 6, 2026

Copy link
Copy Markdown
Owner

No description provided.

daycry and others added 19 commits June 6, 2026 16:25
…d order index

- withMaxPageLength() clamps unbounded length=-1 ("All") / oversized page
  requests that would otherwise hydrate the whole filtered table (DoS vector).
- [OR] operator now wraps field and placeholders in lower() when
  withCaseInsensitive(true) is set, matching the documented behaviour and the
  other operator branches.
- applyOrdering() bounds-checks the client-supplied order.column index instead
  of emitting an "Undefined array key" warning on out-of-range values.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…entation

- reOpen() now closes the existing DBAL connection so DBAL re-establishes the
  socket lazily on the next query, recovering from "server has gone away" in
  long-running CLI/queue workers (the documented use case it previously did not
  actually handle).
- The toolbar query middleware/collector is only wired when query
  instrumentation is enabled (CI_DEBUG), via the new shouldInstrumentQueries()
  seam, so production no longer pays per-statement wrapping for a panel that
  never renders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… add suggests

- The code uses DBAL-4-only APIs (ServerVersionProvider, DBAL 4 Driver/Statement
  signatures) but only pulled DBAL transitively; orm ^3 permits DBAL 3.8, so pin
  doctrine/dbal ^4 explicitly to match the real requirement.
- jms/serializer-bundle is a Symfony framework bundle with zero references in the
  package (confirmed by grep); it dragged in the Symfony framework subtree and a
  second, independently-constrained Symfony tree. Removed from require.
- suggest ext-redis / ext-memcached (needed for those cache backends) and
  doctrine/migrations (optional versioned-schema CLI integration).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
orm:convert-mapping and orm:generate-entities were removed in ORM 3 and the
documented examples fail. Replace with the schema-tool / validate-schema / info /
mapping:describe / run-dql commands that ORM 3 actually ships, and drop the stale
jms/serializer-bundle troubleshooting note (the bundle is no longer a dependency).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…isteners

Add first-class, backward-compatible configuration hooks that previously
required reaching through getEm()->getConfiguration():

- $customTypes: register Doctrine\DBAL\Types\Type subclasses (idempotent via
  Type::hasType), applied on construction and reOpen().
- $sqlFilters / $enabledFilters: register and auto-enable SQL filters
  (soft-delete, multi-tenant). Re-enabled after reOpen() since FilterCollection
  is per-EntityManager.
- $eventListeners / $eventSubscribers: build an EventManager from config and
  thread it into the EntityManager on construction and reOpen().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uery logging

- $dbalMiddlewares: compose user-defined DBAL middlewares (retry/logging/metrics)
  with the toolbar middleware, which is applied last (innermost).
- $defaultRepositoryClass: set a default EntityRepository for all entities.
- $queryLogging / $slowQueryThreshold / $queryLogLevel: log queries (optionally
  only slow ones) to a PSR-3 logger via the new QueryLoggerMiddleware. Unlike the
  toolbar collector this runs in any environment, giving production a slow-query
  log. Logger is resolved through an overridable logger() seam.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- New Spark commands under the Doctrine group: doctrine:cache:clear (clears the
  query/result/metadata pools), doctrine:validate, doctrine:info and
  doctrine:schema:update — each accepts --group to target a database group and
  bridges to the ORM 3 console command via a throwaway Symfony Application.
- cli-config.php now resolves vendor/autoload.php via __DIR__ (invokable from any
  CWD) and exposes a lazy per-group EntityManagerProvider, so `php cli-config.php
  orm:* --em=<group>` can target any database group instead of only the default
  — avoiding accidental DDL against the wrong database.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…hangelog

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lifts line coverage to 91.6% (>= the prior 90.5%): exercises the query-logging
middleware's query/exec/prepare/transaction/quote/server-version/exception paths
over real SQLite, the below-threshold skip path, and the doctrine:validate /
doctrine:schema:update --force command branches.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Multi-agent audit of capabilities, performance, optimization, correctness,
security, quality, dependencies, tests and docs that drove this branch's work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Kept out of require (unused by the library) but surfaced as a suggestion for
consumers whose entities use JMS Serializer annotations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- convertDbConfig() now lower-cases only the DSN scheme, preserving a
  case-sensitive SQLite file path (whole-DSN lowercasing opened the wrong file
  on case-sensitive filesystems).
- Query/result/metadata/SLC cache namespaces are suffixed with the (non-default)
  database group, so multiple groups sharing one cache backend no longer collide
  on the same keys. The default group keeps its existing namespaces (no churn).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ry keys

Cache keys containing the PSR-6 reserved characters {}()/\@: previously threw a
runtime InvalidArgumentException. They are now sanitised (reserved chars replaced,
disambiguated with a short hash of the original key), so any caller key works.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tal() cache

- withFetchJoinCollection(false) collapses the page fetch into a single query
  for the common scalar/single-entity SELECT (no to-many fetch join).
- withRecordsTotal(int|Closure) injects/caches the unfiltered total so
  getRecordsTotal()/getResponse() skip the COUNT query across draws.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s perf

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- mkdocs.yml (Material theme, tabbed nav, strict link/anchor validation) plus a
  hero + feature-card landing page (docs/index.md) and stylesheets/extra.css.
- docs/requirements.txt and .github/workflows/docs.yml build the site with
  `mkdocs build --strict` and deploy to GitHub Pages from the `development`
  branch (mirrors daycry/auth).
- Document the new DataTables performance knobs (withMaxPageLength,
  withFetchJoinCollection, withRecordsTotal), per-group cache namespacing, and
  the automatic PSR-6 cache-key normalisation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@daycry daycry merged commit ef14b09 into master Jun 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant