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

DoctrineDataCollector::executionTimePercentage calculation triggers deprecation warning in PHP 8.1 #1446

Closed
friek opened this issue Dec 10, 2021 · 0 comments

Comments

@friek
Copy link

friek commented Dec 10, 2021

In Doctrine\Bundle\DoctrineBundle\DataCollector::getGroupedQueries the percentage of execution time of a query is being calculated. For the calculation executionMS is used in the query information and this value appears to be set in Doctrine\DBAL\Logging\DebugStack::stopQuery of doctrine dbal.
The stopQuery function sets a float in executionMS (microtime(true) - $this->start), while DataCollector::executionTimePercentage has its parameters typed with int and this is apparently the cause of the deprecation warning.

Although not a major problem, this is mildly annoying as it gets triggered for every executed query.

Tested with:

  • PHP 8.1.0
  • Symfony 5.4.1
  • doctrine/doctrine-bundle 2.5.2
  • doctrine/dbal 3.2.0
@friek friek changed the title DoctrineDataCollector::executionPercent calculation triggers deprecation warning in PHP 8.1 DoctrineDataCollector::executionTimePercentage calculation triggers deprecation warning in PHP 8.1 Dec 10, 2021
@ostrolucky ostrolucky added this to the 2.5.3 milestone Dec 10, 2021
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

2 participants