Skip to content

Commit 7d04687

Browse files
committed
Fixed paquettg#235 - Removed guzzle 6 and added guzzle 7 support
1 parent 93ec620 commit 7d04687

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
"ext-curl": "*",
2020
"paquettg/string-encode": "~1.0.0",
2121
"php-http/httplug": "^2.1",
22-
"php-http/guzzle6-adapter": "^2.0",
22+
"guzzlehttp/guzzle": "^7.0",
2323
"guzzlehttp/psr7": "^1.6",
2424
"myclabs/php-enum": "^1.7"
2525
},
2626
"require-dev": {
2727
"phpunit/phpunit": "^7.5.1",
2828
"mockery/mockery": "^1.2",
29-
"php-coveralls/php-coveralls": "^2.1",
3029
"infection/infection": "^0.13.4",
3130
"phan/phan": "^2.4",
3231
"friendsofphp/php-cs-fixer": "^2.16"

src/PHPHtmlParser/Dom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace PHPHtmlParser;
66

77
use GuzzleHttp\Psr7\Request;
8-
use Http\Adapter\Guzzle6\Client;
8+
use GuzzleHttp\Client;
99
use PHPHtmlParser\Contracts\Dom\CleanerInterface;
1010
use PHPHtmlParser\Contracts\Dom\ParserInterface;
1111
use PHPHtmlParser\Contracts\DomInterface;

src/PHPHtmlParser/StaticDom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace PHPHtmlParser;
66

77
use GuzzleHttp\Psr7\Request;
8-
use Http\Adapter\Guzzle6\Client;
8+
use GuzzleHttp\Client;
99
use PHPHtmlParser\Exceptions\ChildNotFoundException;
1010
use PHPHtmlParser\Exceptions\CircularException;
1111
use PHPHtmlParser\Exceptions\NotLoadedException;

tests/DomTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,4 +525,11 @@ public function testRandomTagInMiddleOfText()
525525

526526
$this->assertEquals('<p>Hello, this is just a test in which <55 names with some other text> should be interpreted as text</55></p>', $dom->outerHtml);
527527
}
528+
529+
public function testHttpCall()
530+
{
531+
$dom = new Dom();
532+
$dom->loadFromUrl('http://google.com');
533+
$this->assertNotEmpty($dom->outerHtml);
534+
}
528535
}

0 commit comments

Comments
 (0)