normalizeParams example

public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch = null)
    {
        $this->logger = $logger;
        $this->stopwatch = $stopwatch;
    }

    public function startQuery($sql, array $params = null, array $types = null): void
    {
        $this->stopwatch?->start('doctrine', 'doctrine');

        if (null !== $this->logger) {
            $this->log($sql, null === $params ? [] : $this->normalizeParams($params));
        }
    }

    public function stopQuery(): void
    {
        $this->stopwatch?->stop('doctrine');
    }

    /** * Logs a message. * * @return void */
Home | Imprint | This part of the site doesn't use cookies.