diff --git a/CHANGELOG.md b/CHANGELOG.md
index 935553a3..21d7cd7d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
+## unreleased
+
+### Fixed
+
+- Display of the profiler panel when used in a symfony/flex project.
+
## 1.7.0 - 2017-07-25
### Added
diff --git a/Resources/config/data-collector.xml b/Resources/config/data-collector.xml
index 1f28db3e..88d2e3a3 100644
--- a/Resources/config/data-collector.xml
+++ b/Resources/config/data-collector.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/Tests/Functional/ProfilerTest.php b/Tests/Functional/ProfilerTest.php
new file mode 100644
index 00000000..ae6528f5
--- /dev/null
+++ b/Tests/Functional/ProfilerTest.php
@@ -0,0 +1,22 @@
+request('GET', '/');
+
+ $crawler = $client->request('GET', '/_profiler/latest?panel=httplug');
+ $title = $crawler->filterXPath('//*[@id="collector-content"]/h2');
+
+ $this->assertCount(1, $title);
+ $this->assertEquals('HTTPlug', $title->html());
+ }
+}
diff --git a/Tests/Resources/app/AppKernel.php b/Tests/Resources/app/AppKernel.php
index ffd7a008..c8e4aeb2 100644
--- a/Tests/Resources/app/AppKernel.php
+++ b/Tests/Resources/app/AppKernel.php
@@ -1,10 +1,16 @@
load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
if ($this->isDebug()) {
@@ -34,6 +40,16 @@ public function registerContainerConfiguration(LoaderInterface $loader)
}
}
+ /**
+ * {@inheritdoc}
+ */
+ protected function configureRoutes(RouteCollectionBuilder $routes)
+ {
+ $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt');
+ $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler');
+ $routes->add('/', 'kernel:indexAction');
+ }
+
/**
* {@inheritdoc}
*/
@@ -57,4 +73,9 @@ protected function getContainerBaseClass()
{
return '\PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer';
}
+
+ public function indexAction()
+ {
+ return new Response();
+ }
}
diff --git a/composer.json b/composer.json
index b0a02bbf..76a8746a 100644
--- a/composer.json
+++ b/composer.json
@@ -28,7 +28,8 @@
"symfony/framework-bundle": "^2.8 || ^3.0",
"php-http/message": "^1.4",
"php-http/discovery": "^1.0",
- "twig/twig": "^1.18 || ^2.0"
+ "twig/twig": "^1.18 || ^2.0",
+ "symfony/asset": "^2.8 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5 || ^5.4",
@@ -45,6 +46,8 @@
"symfony/web-profiler-bundle": "^2.8 || ^3.0",
"symfony/finder": "^2.7 || ^3.0",
"symfony/cache": "^3.1",
+ "symfony/browser-kit": "^2.8 || ^3.0",
+ "symfony/dom-crawler": "^2.8 || ^3.0",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"matthiasnoback/symfony-dependency-injection-test": "^1.0",
"nyholm/nsa": "^1.1"