File tree 6 files changed +18
-9
lines changed
6 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 19
19
matrix :
20
20
include :
21
21
# Minimum supported Symfony version and lowest PHP version
22
- - dependencies : " php-http/guzzle7-adapter"
22
+ - dependencies : " php-http/guzzle7-adapter php-http/discovery:^1.12 "
23
23
php-version : " 7.3"
24
24
dependency-versions : " lowest"
25
25
symfony-deprecations-helper : " weak"
91
91
- name : " Install dependencies with Composer"
92
92
uses : " ramsey/composer-install@v1"
93
93
with :
94
- dependency-versions : " ${{ matrix.dependencies }}"
94
+ dependency-versions : " ${{ matrix.dependency-versions }}"
95
95
composer-options : " ${{ matrix.composer-options }}"
96
96
97
97
- name : " Run PHPUnit"
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
- # 1.24.0 - unreleased
5
+ # 1.24.0 - 2021-10-23
6
6
- Changed stopwatch category from default to "httplug", so it's more prominent on Execution timeline view
7
7
- Changed tab texts inside profiler so that it shows ports in URL in case it's non-standard
8
8
- Changed default logging plugin monolog channel from "app" to "httplug"
9
+ - Fixed compatibility with Twig 3.x
9
10
10
11
# 1.23.1 - 2021-10-13
11
12
- Fixed issue with whitespaces in URL when URL in tab was copied
Original file line number Diff line number Diff line change 59
59
"symfony/dom-crawler" : " ^3.4.34 || ^4.2.12 || ^5.0" ,
60
60
"symfony/framework-bundle" : " ^3.4.34 || ^4.2.12 || ^5.0" ,
61
61
"symfony/http-foundation" : " ^3.4.35 || ~4.2.12 || ^4.3.8 || ^5.0" ,
62
- "symfony/phpunit-bridge" : " ^3.4.34 || ^4.2.12 || ^5.0 " ,
62
+ "symfony/phpunit-bridge" : " ^5.3 " ,
63
63
"symfony/stopwatch" : " ^3.4.34 || ^4.2.12 || ^5.0" ,
64
64
"symfony/twig-bundle" : " ^3.4.34 || ^4.2.12 || ^5.0" ,
65
65
"symfony/web-profiler-bundle" : " ^3.4.34 || ^4.2.12 || ^5.0" ,
Original file line number Diff line number Diff line change 7
7
{% endif %}
8
8
<span class =" label httplug-method httplug-method-{{ stack .requestMethod | lower }}" >{{ stack .requestMethod }}</span >
9
9
</div >
10
- {% spaceless %}
10
+ {% apply spaceless %}
11
11
<div class =" label httplug-stack-header-target" >
12
12
<span class =" httplug-scheme" >{{ stack .requestScheme }}://</span >
13
13
<span class =" httplug-host" >{{ stack .requestHost }}</span >
16
16
{% endif %}
17
17
<span class =" httplug-target" >{{ stack .requestTarget }}</span >
18
18
</div >
19
- {% endspaceless %}
19
+ {% endapply %}
20
20
<div >
21
21
<span class =" label httplug-duration" >{{ stack .duration | number_format }} ms</span >
22
22
{% if stack .responseCode >= 400 and stack .responseCode <= 599 %}
Original file line number Diff line number Diff line change 4
4
5
5
namespace Http \HttplugBundle \Tests \Functional ;
6
6
7
+ use GuzzleHttp \Psr7 \Request ;
8
+ use Http \Client \HttpClient ;
7
9
use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
8
10
9
11
class ProfilerTest extends WebTestCase
@@ -14,12 +16,19 @@ class ProfilerTest extends WebTestCase
14
16
public function testShowProfiler (): void
15
17
{
16
18
$ client = static ::createClient ();
19
+ $ httpClient = $ client ->getContainer ()->get ('httplug.client.acme ' );
20
+
21
+ assert ($ httpClient instanceof HttpClient);
22
+
23
+ $ httpClient ->sendRequest (new Request ('GET ' , '/posts/1 ' ));
17
24
18
25
//Browse any page to get a profile
19
26
$ client ->request ('GET ' , '/ ' );
20
27
21
28
$ client ->request ('GET ' , '/_profiler/latest?panel=httplug ' );
22
29
$ content = $ client ->getResponse ()->getContent ();
23
- $ this ->assertTrue (false !== strpos ($ content , '<h2>HTTPlug</h2> ' ));
30
+ $ this ->assertStringContainsString (<<<HTML
31
+ <div class="label httplug-stack-header-target"><span class="httplug-scheme">https://</span><span class="httplug-host">jsonplaceholder.typicode.com</span><span class="httplug-target">/posts/1</span></div>
32
+ HTML , $ content );
24
33
}
25
34
}
Original file line number Diff line number Diff line change @@ -7,15 +7,14 @@ httplug:
7
7
async_client : auto
8
8
clients :
9
9
acme :
10
- factory : httplug.factory.guzzle7
11
10
plugins :
12
11
-
13
12
decoder :
14
13
use_content_encoding : false
15
14
- app.http.plugin.custom
16
15
-
17
16
add_host :
18
- host : " http ://localhost:8000 "
17
+ host : " https ://jsonplaceholder.typicode.com "
19
18
-
20
19
authentication :
21
20
my_basic :
You can’t perform that action at this time.
0 commit comments