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

Propel entries missing from profiler if APP_DEV is on #36

Open
papatti opened this issue Jan 20, 2023 · 0 comments
Open

Propel entries missing from profiler if APP_DEV is on #36

papatti opened this issue Jan 20, 2023 · 0 comments

Comments

@papatti
Copy link

papatti commented Jan 20, 2023

The "Propel" section of the Symfony profiler is inactive, because connection is not in debug mode.

I attempted to fix it by adding

if ($this->container->getParameter('kernel.debug')) {
    $connection->useDebug(true);
}

in PropelBundle::configureLogging() to both read and write connections. This worked fine whith browser request, Propel queries appeared correctly in profiler, but caused a huge memory leak when executing queries in phpunit tests. In Propel's ConnectionWrapper::callUserFunctionWithLogging() both $callback(...$args); and $this->log($sqlForLog); increased memory usage by 17K for each query.

(Symfony 5.4.18, PHP 8.0.24, MySQL 5.7, PHPUnit 9.3.11)

Great job by fixing up PropelBundle btw! Really appreciate it!

@papatti papatti changed the title Propel entires missing from profiler if APP_DEV is on Propel entries missing from profiler if APP_DEV is on Jan 23, 2023
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

No branches or pull requests

1 participant