mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-19 07:41:39 +02:00
* Fix parameter output if parameter is Datetime or array * use array_map for parsing parameters * Add test-case for Doctrine datetime * Fix doctrine query --------- Co-authored-by: Alius <aliusa@users.noreply.github.com>
21 lines
809 B
PHP
21 lines
809 B
PHP
<?php
|
|
|
|
include __DIR__ . '/bootstrap.php';
|
|
include __DIR__ . '/../../bootstrap.php';
|
|
|
|
$debugbarRenderer->setBaseUrl('../../../src/DebugBar/Resources');
|
|
|
|
$debugStack = new Doctrine\DBAL\Logging\DebugStack();
|
|
$entityManager->getConnection()->getConfiguration()->setSQLLogger($debugStack);
|
|
$debugbar->addCollector(new DebugBar\Bridge\DoctrineCollector($debugStack));
|
|
|
|
$product = new Demo\Product();
|
|
$product->setName("foobar");
|
|
$product->setUpdated();
|
|
|
|
$entityManager->persist($product);
|
|
$entityManager->flush();
|
|
$entityManager->createQuery("select p from Demo\\Product p where p.updated>:u")->setParameter("u", new \DateTime('1 hour ago'))->execute();
|
|
$entityManager->createQuery("select p from Demo\\Product p where p.name=:c")->setParameter("c", "<script>alert();</script>")->execute();
|
|
render_demo_page();
|