File tree Expand file tree Collapse file tree 5 files changed +55
-3
lines changed Expand file tree Collapse file tree 5 files changed +55
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
4
4
5
+ ## unreleased
6
+
7
+ ### Fixed
8
+
9
+ - Display of the profiler panel when used in a symfony/flex project.
10
+
5
11
## 1.7.0 - 2017-07-25
6
12
7
13
### Added
Original file line number Diff line number Diff line change 14
14
</service >
15
15
16
16
<service id =" httplug.collector.collector" class =" Http\HttplugBundle\Collector\Collector" public =" false" >
17
- <tag name =" data_collector" template =" HttplugBundle:: webprofiler.html.twig" priority =" 200" id =" httplug" />
17
+ <tag name =" data_collector" template =" @Httplug/ webprofiler.html.twig" priority =" 200" id =" httplug" />
18
18
</service >
19
19
20
20
<service id =" httplug.plugin.stack" class =" Http\HttplugBundle\Collector\StackPlugin" public =" false" abstract =" true" >
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Http \HttplugBundle \Tests \Functional ;
4
+
5
+ use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
6
+
7
+ class ProfilerTest extends WebTestCase
8
+ {
9
+ public function testShowProfiler ()
10
+ {
11
+ $ client = static ::createClient ();
12
+
13
+ //Browse any page to get a profile
14
+ $ client ->request ('GET ' , '/ ' );
15
+
16
+ $ crawler = $ client ->request ('GET ' , '/_profiler/latest?panel=httplug ' );
17
+ $ title = $ crawler ->filterXPath ('//*[@id="collector-content"]/h2 ' );
18
+
19
+ $ this ->assertCount (1 , $ title );
20
+ $ this ->assertEquals ('HTTPlug ' , $ title ->html ());
21
+ }
22
+ }
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ use Symfony \Bundle \FrameworkBundle \Kernel \MicroKernelTrait ;
3
4
use Symfony \Component \Config \Loader \LoaderInterface ;
5
+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
6
+ use Symfony \Component \HttpFoundation \Response ;
4
7
use Symfony \Component \HttpKernel \Kernel ;
8
+ use Symfony \Component \Routing \RouteCollectionBuilder ;
5
9
6
10
class AppKernel extends Kernel
7
11
{
12
+ use MicroKernelTrait;
13
+
8
14
/**
9
15
* {@inheritdoc}
10
16
*/
@@ -26,14 +32,24 @@ public function registerBundles()
26
32
/**
27
33
* {@inheritdoc}
28
34
*/
29
- public function registerContainerConfiguration ( LoaderInterface $ loader )
35
+ protected function configureContainer ( ContainerBuilder $ container , LoaderInterface $ loader )
30
36
{
31
37
$ loader ->load (__DIR__ .'/config/config_ ' .$ this ->getEnvironment ().'.yml ' );
32
38
if ($ this ->isDebug ()) {
33
39
$ loader ->load (__DIR__ .'/config/config_debug.yml ' );
34
40
}
35
41
}
36
42
43
+ /**
44
+ * {@inheritdoc}
45
+ */
46
+ protected function configureRoutes (RouteCollectionBuilder $ routes )
47
+ {
48
+ $ routes ->import ('@WebProfilerBundle/Resources/config/routing/wdt.xml ' , '/_wdt ' );
49
+ $ routes ->import ('@WebProfilerBundle/Resources/config/routing/profiler.xml ' , '/_profiler ' );
50
+ $ routes ->add ('/ ' , 'kernel:indexAction ' );
51
+ }
52
+
37
53
/**
38
54
* {@inheritdoc}
39
55
*/
@@ -57,4 +73,9 @@ protected function getContainerBaseClass()
57
73
{
58
74
return '\PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer ' ;
59
75
}
76
+
77
+ public function indexAction ()
78
+ {
79
+ return new Response ();
80
+ }
60
81
}
Original file line number Diff line number Diff line change 28
28
"symfony/framework-bundle" : " ^2.8 || ^3.0" ,
29
29
"php-http/message" : " ^1.4" ,
30
30
"php-http/discovery" : " ^1.0" ,
31
- "twig/twig" : " ^1.18 || ^2.0"
31
+ "twig/twig" : " ^1.18 || ^2.0" ,
32
+ "symfony/asset" : " ^2.8 || ^3.0"
32
33
},
33
34
"require-dev" : {
34
35
"phpunit/phpunit" : " ^4.5 || ^5.4" ,
45
46
"symfony/web-profiler-bundle" : " ^2.8 || ^3.0" ,
46
47
"symfony/finder" : " ^2.7 || ^3.0" ,
47
48
"symfony/cache" : " ^3.1" ,
49
+ "symfony/browser-kit" : " ^2.8 || ^3.0" ,
50
+ "symfony/dom-crawler" : " ^2.8 || ^3.0" ,
48
51
"polishsymfonycommunity/symfony-mocker-container" : " ^1.0" ,
49
52
"matthiasnoback/symfony-dependency-injection-test" : " ^1.0" ,
50
53
"nyholm/nsa" : " ^1.1"
You can’t perform that action at this time.
0 commit comments