Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a DBAL middleware for the profiler collector #1431

Closed
stof opened this issue Nov 23, 2021 · 4 comments · Fixed by #1517
Closed

Implement a DBAL middleware for the profiler collector #1431

stof opened this issue Nov 23, 2021 · 4 comments · Fixed by #1517

Comments

@stof
Copy link
Member

stof commented Nov 23, 2021

Follows doctrine/dbal#4967

Maybe the Stopwatch integration should be a separate middleware than the collection of queries for the doctrine dbal panel.
Currently, we rely on a special SQLLogger to do that.

Refs #1429

@ostrolucky
Copy link
Member

Duplicate of #1429?

@stof
Copy link
Member Author

stof commented Nov 23, 2021

No. currently, our logger configuration covers 2 things:

  • wiring the Psr3Logger to send queries to the logger service of Symfony
  • wiring the special loggers related to the profiler (only when the profiler integration is enabled)

#1429 is about replacing the first part by wiring the logging middleware shipped in DBAL 3.2+.
this ticket is about implementing the necessary ProfilingMiddleware (or whatever its name) and using it instead of the special loggers, to replace the second part.

So they are related, but not duplicate (see how I even referenced it in the description)

fabpot added a commit to symfony/symfony that referenced this issue Mar 25, 2022
…Logger (l-vo)

This PR was merged into the 5.4 branch.

Discussion
----------

[DoctrineBridge] Allow to use a middleware instead of DbalLogger

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |  Step toward the fix of doctrine/DoctrineBundle#1431  (mentioned too in #44313 and #44495)
| License       | MIT
| Doc PR        |

The SqlLogger that is used in doctrine bridge and doctrine bundle has been deprecated and replaced by a system of Middleware.

A work has started on Doctrine bundle with doctrine/DoctrineBundle#1456 and doctrine/DoctrineBundle#1472

This PR suggest to add a middleware thats covers what was previously done by `DbalLogger` and `DebugStack`.

Another PR will follow in DoctrineBundle for the integration.

Commits
-------

20d0806 Allow to use a middleware instead of DbalLogger
@stof
Copy link
Member Author

stof commented Mar 30, 2022

The middleware is implemented in symfony/symfony#45491

So it should be wired instead of the DbalLogger on supported Symfony and DBAL versions.

@dmaicher
Copy link
Contributor

dmaicher commented Jun 6, 2022

done in #1517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants