auditor-bundle icon indicating copy to clipboard operation
auditor-bundle copied to clipboard

SQLLogger is deprecated. Use DHMiddleware instead

Open janklan opened this issue 1 year ago • 5 comments

I've been getting a ton of deprecations for some time now and wanted to check whether anything needs to be done in the configuration space to bring my app up to speed with Auditor 2.2+?

Versions:

  • damienharper/auditor: 2.4.6
  • damienharper/auditor-bundle: 5.2.4

From the stack trace, it seems the deprecation is triggered in third-party code, not mine. Do I just wait? Please advise.

00:07:46 INFO      [php] User Deprecated: Since damienharper/auditor 2.2: SQLLogger is deprecated. Use DHMiddleware instead
[
  "exception" => ErrorException {
    #message: "User Deprecated: Since damienharper/auditor 2.2: SQLLogger is deprecated. Use DHMiddleware instead"
    #code: 0
    #file: "./vendor/damienharper/auditor/src/Provider/Doctrine/Auditing/Event/DoctrineSubscriber.php"
    #line: 51
    #severity: E_USER_DEPRECATED
    trace: {
      ./vendor/damienharper/auditor/src/Provider/Doctrine/Auditing/Event/DoctrineSubscriber.php:51 { …}
      ./vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php:63 { …}
      ./vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:3507 { …}
      ./vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:410 { …}
      ./vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:403 { …}
      ./src/Service/ValueStoreService.php:53 {
        App\Service\ValueStoreService->set(ValueStoreKeyEnum $keyEnum, mixed $value)^
        › $current->updatedAt = new \DateTimeImmutable();
        › $this->entityManager->flush();
        › 
      }
      ./src/Service/AssetPandaApiService.php:117 { …}
      ./src/Command/AssetPandaCommand.php:39 { …}
      ./vendor/symfony/console/Command/Command.php:312 { …}
      ./vendor/symfony/console/Application.php:1040 { …}
      ./vendor/symfony/framework-bundle/Console/Application.php:88 { …}
      ./vendor/symfony/console/Application.php:314 { …}
      ./vendor/symfony/framework-bundle/Console/Application.php:77 { …}
      ./vendor/symfony/console/Application.php:168 { …}
      ./vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:54 { …}
      ./vendor/autoload_runtime.php:29 { …}
      ./bin/console:11 { …}
    }
  }
]```

janklan avatar Apr 10 '23 00:04 janklan

Do you use sentry?

kamil-karkus avatar Apr 26 '23 10:04 kamil-karkus

yeah

janklan avatar Apr 26 '23 11:04 janklan

In my case these deprecations was triggered by sentry.tracing.enabled = true I believe you should ask your question here https://github.com/getsentry/sentry-symfony

kamil-karkus avatar Apr 26 '23 11:04 kamil-karkus

In my case these deprecations was triggered by sentry.tracing.enabled = true I believe you should ask your question here https://github.com/getsentry/sentry-symfony

Thanks.

I'm not sure Sentry team will want to even hear about switching from Doctrine-native thing to Auditor-specific thing. Why whould they. I'll just leave this ticket hang here for a bit longer.

janklan avatar May 05 '23 04:05 janklan

I'm having the same issue. We don't use sentry-symfony

The versions we have installed are:

  • damienharper/auditor 2.3.0
  • damienharper/auditor-bundle 5.2.5

I was trying to fix another deprecation issue, which required us to upgrade auditor-bundle, only now we get new deprecation issues everywhere!

timwsuqld avatar Jan 23 '24 03:01 timwsuqld