Skip to content

Profiler show Deprecations in all pages #44495

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

Closed
karaka200 opened this issue Dec 7, 2021 · 1 comment
Closed

Profiler show Deprecations in all pages #44495

karaka200 opened this issue Dec 7, 2021 · 1 comment

Comments

@karaka200
Copy link

Symfony version(s) affected

6.0.0

Description

I Use Symfony 6.0 and profiler show Deprecations in all pages:

The "Symfony\Bridge\Doctrine\Logger\DbalLogger" class implements "Doctrine\DBAL\Logging\SQLLogger" that is deprecated Use {@link \Doctrine\DBAL\Logging\Middleware} or implement {@link \Doctrine\DBAL\Driver\Middleware} instead.

[
  "exception" => Symfony\Component\ErrorHandler\Exception\SilencedErrorContext {#680
    +count: 1
    -severity: E_USER_DEPRECATED
    trace: {
      C:\prj\sym6\vendor\symfony\error-handler\DebugClassLoader.php:328 {
        class_exists(string $class, bool $autoload = true): bool …
        › foreach ($deprecations as $message) {
        ›     @trigger_error($message, \E_USER_DEPRECATED);
        › }
      }
      C:\prj\sym6\vendor\symfony\config\Resource\ClassExistenceResource.php:78 {
        › try {
        ›     $exists[0] = class_exists($this->resource) || interface_exists($this->resource, false) || trait_exists($this->resource, false);
        › } catch (\Exception $e) {
      }
    }
  }
]

How to reproduce

Read description ...

Possible Solution

No response

Additional Context

No response

@stof
Copy link
Member

stof commented Dec 7, 2021

This is a new deprecation in Doctrine DBAL 3.2+ (released a few days ago).
Work is in progress in DoctrineBundle to migrate to the new way. See doctrine/DoctrineBundle#1431 and doctrine/DoctrineBundle#1429 for the work to migrate away from the SQLLogger interface (the DbalLogger class itself won't be changed to stop using the interface, but it will be deprecated in the future once dropping support for older DBAL versions)

@fabpot fabpot closed this as completed Dec 8, 2021
fabpot added a commit 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants