Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# patreon: # Replace with a single Patreon username
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
tidelift: "packagist/paquettg/php-html-parser"
tidelift: "packagist/igor-krein/php-html-parser"
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
# liberapay: # Replace with a single Liberapay username
# issuehunt: # Replace with a single IssueHunt username
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PHP Html Parser
==========================
This is a fork of the original [PHP Html Parser] with only updated dependencies. The original package is no longer maintained.

[![Build Status](https://travis-ci.org/paquettg/php-html-parser.png)](https://travis-ci.org/paquettg/php-html-parser)
[![Coverage Status](https://coveralls.io/repos/paquettg/php-html-parser/badge.png)](https://coveralls.io/r/paquettg/php-html-parser)
Expand All @@ -13,10 +14,10 @@ Install
Install the latest version using composer.

```bash
$ composer require paquettg/php-html-parser
$ composer require igor-krein/php-html-parser
```

This package can be found on [packagist](https://packagist.org/packages/paquettg/php-html-parser) and is best loaded using [composer](http://getcomposer.org/). We support php 7.2, 7.3, and 7.4.
This package can be found on [packagist](https://packagist.org/packages/igor-krein/php-html-parser) and is best loaded using [composer](http://getcomposer.org/). We support PHP 7.2, 7.3, and 7.4. Also, it is supposed to be PHP 8.4 compatible.

Basic Usage
-----
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "paquettg/php-html-parser",
"name": "igor-krein/php-html-parser",
"type": "library",
"description": "An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.",
"keywords": ["html", "dom", "parser"],
"homepage": "https://github.com/paquettg/php-html-parser",
"homepage": "https://github.com/igor-krein/php-html-parser",
"license": "MIT",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/PHPHtmlParser/Contracts/DomInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ public function loadStr(string $str, ?Options $options = null): Dom;

public function setOptions(Options $options): Dom;

public function find(string $selector, int $nth = null);
public function find(string $selector, ?int $nth = null);
}
2 changes: 1 addition & 1 deletion src/PHPHtmlParser/Dom.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function setOptions(Options $options): Dom
*
* @return mixed|Collection|null
*/
public function find(string $selector, int $nth = null)
public function find(string $selector, ?int $nth = null)
{
$this->isLoaded();

Expand Down
2 changes: 1 addition & 1 deletion src/PHPHtmlParser/StaticDom.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static function loadFromFile(string $file, ?Options $options = null): Dom
* @throws StrictException
* @throws \Psr\Http\Client\ClientExceptionInterface
*/
public static function loadFromUrl(string $url, ?Options $options = null, ClientInterface $client = null, RequestInterface $request = null): Dom
public static function loadFromUrl(string $url, ?Options $options = null, ?ClientInterface $client = null, ?RequestInterface $request = null): Dom
{
$dom = new Dom();
self::$dom = $dom;
Expand Down