Skip to content

Doctrine3#155

Merged
PowerKiKi merged 6 commits intomasterfrom
doctrine3
May 2, 2025
Merged

Doctrine3#155
PowerKiKi merged 6 commits intomasterfrom
doctrine3

Conversation

@PowerKiKi
Copy link
Copy Markdown
Member

No description provided.

Because laminas-log and laminas-mail are both discontinued. And we do it
now, because the migration to doctrine 3 exposed a cyclic dependency
issue in Epicerio. The end result was we were trying to log
something to DB before a connection to DB was established, and so we
established a second connection to DB, wrecking havoc in our apps.

So instead of deep diving in laminas-log to sort out all the details,
I'd rather deep dive in monolog directly and clear the technical debt at
the same time. And since monolog has an integration with symfony/mailer,
it seemed natural to do that too, and clear even more technical debt.

And to avoid the double-connection issue, the DB logger is only active,
and only retrieves its dependencies, after we are certain that a
connection to DB was established.

The overall concept of our logs remains unchanged though. We have 3 log
destinations: File, Mail and DB. Mail and DB have extra information
through `RecordCompleter`. File does not.
The middleware is unconditionally enabled, so it can notify the
DbHandler whenever we get an active connection. However, the middleware
may or may not log SQL queries to files. This is controlled via the new
config key `logSql`.
@PowerKiKi PowerKiKi merged commit 3c53386 into master May 2, 2025
6 checks passed
@PowerKiKi PowerKiKi deleted the doctrine3 branch February 11, 2026 07:39
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