Skip to content

Commit

Permalink
Fixed #235 - Removed guzzle 6 and added guzzle 7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
paquettg committed Sep 19, 2020
1 parent 93ec620 commit 7d04687
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@
"ext-curl": "*",
"paquettg/string-encode": "~1.0.0",
"php-http/httplug": "^2.1",
"php-http/guzzle6-adapter": "^2.0",
"guzzlehttp/guzzle": "^7.0",
"guzzlehttp/psr7": "^1.6",
"myclabs/php-enum": "^1.7"
},
"require-dev": {
"phpunit/phpunit": "^7.5.1",
"mockery/mockery": "^1.2",
"php-coveralls/php-coveralls": "^2.1",
"infection/infection": "^0.13.4",
"phan/phan": "^2.4",
"friendsofphp/php-cs-fixer": "^2.16"
Expand Down
2 changes: 1 addition & 1 deletion src/PHPHtmlParser/Dom.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace PHPHtmlParser;

use GuzzleHttp\Psr7\Request;
use Http\Adapter\Guzzle6\Client;
use GuzzleHttp\Client;
use PHPHtmlParser\Contracts\Dom\CleanerInterface;
use PHPHtmlParser\Contracts\Dom\ParserInterface;
use PHPHtmlParser\Contracts\DomInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/PHPHtmlParser/StaticDom.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace PHPHtmlParser;

use GuzzleHttp\Psr7\Request;
use Http\Adapter\Guzzle6\Client;
use GuzzleHttp\Client;
use PHPHtmlParser\Exceptions\ChildNotFoundException;
use PHPHtmlParser\Exceptions\CircularException;
use PHPHtmlParser\Exceptions\NotLoadedException;
Expand Down
7 changes: 7 additions & 0 deletions tests/DomTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,4 +525,11 @@ public function testRandomTagInMiddleOfText()

$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);
}

public function testHttpCall()
{
$dom = new Dom();
$dom->loadFromUrl('http://google.com');
$this->assertNotEmpty($dom->outerHtml);
}
}

0 comments on commit 7d04687

Please sign in to comment.