diff --git a/composer.lock b/composer.lock index ed2175c..2ee37f2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,223 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0301f6145278bf69bbcca49992befa89", - "packages": [], + "content-hash": "1077b4324237a83eab2f418e6eb3f2d4", + "packages": [ + { + "name": "mensbeam/html-parser", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://code.mensbeam.com/MensBeam/HTML-Parser", + "reference": "49764a456743ac69074b4f64619cf87af254c071" + }, + "require": { + "ext-dom": "*", + "mensbeam/intl": ">=0.9.0", + "mensbeam/mimesniff": "^0.2.0", + "php": ">=7.1" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.3", + "masterminds/html5": "^2.7" + }, + "suggest": { + "ext-ctype": "Improved performance" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "MensBeam\\HTML\\": [ + "lib/" + ] + }, + "classmap": [ + "lib/Parser/Token.php" + ], + "files": [ + "lib/Parser/ctype.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dustin Wilson", + "email": "dustin@dustinwilson.com", + "homepage": "https://dustinwilson.com/" + }, + { + "name": "J. King", + "email": "jking@jkingweb.ca", + "homepage": "https://jkingweb.ca/" + } + ], + "description": "Parses modern HTML text into a PHP DOMDocument", + "time": "2021-09-28T20:15:07+00:00" + }, + { + "name": "mensbeam/intl", + "version": "0.9.0", + "source": { + "type": "git", + "url": "https://github.com/mensbeam/intl.git", + "reference": "de037b182ce99aaa90ebc09b0ee0457ddf1d07bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mensbeam/intl/zipball/de037b182ce99aaa90ebc09b0ee0457ddf1d07bc", + "reference": "de037b182ce99aaa90ebc09b0ee0457ddf1d07bc", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "*", + "ext-intl": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "MensBeam\\Intl\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "J. King", + "email": "jking@jkingweb.ca", + "homepage": "https://jkingweb.ca/" + } + ], + "description": "A set of dependency-free basic internationalization tools", + "keywords": [ + "WHATWG", + "charset", + "encoding", + "internationalization", + "intl", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "issues": "https://github.com/mensbeam/intl/issues", + "source": "https://github.com/mensbeam/intl/tree/0.9.0" + }, + "time": "2021-03-25T19:08:04+00:00" + }, + { + "name": "mensbeam/mimesniff", + "version": "0.2.1", + "source": { + "type": "git", + "url": "https://github.com/mensbeam/mime.git", + "reference": "c19be2496ab1e27fbf9c3483c2a9faa2781796cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mensbeam/mime/zipball/c19be2496ab1e27fbf9c3483c2a9faa2781796cd", + "reference": "c19be2496ab1e27fbf9c3483c2a9faa2781796cd", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.3", + "ext-intl": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "MensBeam\\Mime\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "J. King", + "email": "jking@jkingweb.ca", + "homepage": "https://jkingweb.ca/" + } + ], + "description": "An implementation of the WHATWG MIME Sniffing specification", + "keywords": [ + "WHATWG", + "mime", + "mimesniff" + ], + "support": { + "issues": "https://github.com/mensbeam/mime/issues", + "source": "https://github.com/mensbeam/mime/tree/0.2.1" + }, + "time": "2021-03-07T03:58:00+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + } + ], "packages-dev": [ { "name": "bamarni/composer-bin-plugin", @@ -534,167 +749,6 @@ }, "time": "2020-12-25T05:00:37+00:00" }, - { - "name": "mensbeam/html-parser", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://code.mensbeam.com/MensBeam/HTML-Parser", - "reference": "8115ac07d55b96d866da996f6329f6287f09bc49" - }, - "require": { - "ext-dom": "*", - "mensbeam/intl": ">=0.9.0", - "mensbeam/mimesniff": "^0.2.0", - "php": ">=7.1" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.3", - "masterminds/html5": "^2.7" - }, - "suggest": { - "ext-ctype": "Improved performance" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "MensBeam\\HTML\\": [ - "lib/" - ] - }, - "classmap": [ - "lib/Parser/Token.php" - ], - "files": [ - "lib/Parser/ctype.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dustin Wilson", - "email": "dustin@dustinwilson.com", - "homepage": "https://dustinwilson.com/" - }, - { - "name": "J. King", - "email": "jking@jkingweb.ca", - "homepage": "https://jkingweb.ca/" - } - ], - "description": "Parses modern HTML text into a PHP DOMDocument", - "time": "2021-09-26T20:09:27+00:00" - }, - { - "name": "mensbeam/intl", - "version": "0.9.0", - "source": { - "type": "git", - "url": "https://github.com/mensbeam/intl.git", - "reference": "de037b182ce99aaa90ebc09b0ee0457ddf1d07bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mensbeam/intl/zipball/de037b182ce99aaa90ebc09b0ee0457ddf1d07bc", - "reference": "de037b182ce99aaa90ebc09b0ee0457ddf1d07bc", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "*", - "ext-intl": "*" - }, - "type": "library", - "autoload": { - "psr-4": { - "MensBeam\\Intl\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "J. King", - "email": "jking@jkingweb.ca", - "homepage": "https://jkingweb.ca/" - } - ], - "description": "A set of dependency-free basic internationalization tools", - "keywords": [ - "WHATWG", - "charset", - "encoding", - "internationalization", - "intl", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "issues": "https://github.com/mensbeam/intl/issues", - "source": "https://github.com/mensbeam/intl/tree/0.9.0" - }, - "time": "2021-03-25T19:08:04+00:00" - }, - { - "name": "mensbeam/mimesniff", - "version": "0.2.1", - "source": { - "type": "git", - "url": "https://github.com/mensbeam/mime.git", - "reference": "c19be2496ab1e27fbf9c3483c2a9faa2781796cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mensbeam/mime/zipball/c19be2496ab1e27fbf9c3483c2a9faa2781796cd", - "reference": "c19be2496ab1e27fbf9c3483c2a9faa2781796cd", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "psr/http-message": "^1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.3", - "ext-intl": "*" - }, - "type": "library", - "autoload": { - "psr-4": { - "MensBeam\\Mime\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "J. King", - "email": "jking@jkingweb.ca", - "homepage": "https://jkingweb.ca/" - } - ], - "description": "An implementation of the WHATWG MIME Sniffing specification", - "keywords": [ - "WHATWG", - "mime", - "mimesniff" - ], - "support": { - "issues": "https://github.com/mensbeam/mime/issues", - "source": "https://github.com/mensbeam/mime/tree/0.2.1" - }, - "time": "2021-03-07T03:58:00+00:00" - }, { "name": "psr/container", "version": "1.1.1", @@ -850,59 +904,6 @@ }, "time": "2019-04-30T12:38:16+00:00" }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, - "time": "2016-08-06T14:39:51+00:00" - }, { "name": "ralouphie/getallheaders", "version": "3.0.3", @@ -1264,16 +1265,16 @@ }, { "name": "symfony/mime", - "version": "v5.3.7", + "version": "v5.3.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "ae887cb3b044658676129f5e97aeb7e9eb69c2d8" + "reference": "a756033d0a7e53db389618653ae991eba5a19a11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/ae887cb3b044658676129f5e97aeb7e9eb69c2d8", - "reference": "ae887cb3b044658676129f5e97aeb7e9eb69c2d8", + "url": "https://api.github.com/repos/symfony/mime/zipball/a756033d0a7e53db389618653ae991eba5a19a11", + "reference": "a756033d0a7e53db389618653ae991eba5a19a11", "shasum": "" }, "require": { @@ -1327,7 +1328,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.3.7" + "source": "https://github.com/symfony/mime/tree/v5.3.8" }, "funding": [ { @@ -1343,7 +1344,7 @@ "type": "tidelift" } ], - "time": "2021-08-20T11:40:01+00:00" + "time": "2021-09-10T12:30:38+00:00" }, { "name": "symfony/polyfill-ctype", diff --git a/lib/Document.php b/lib/Document.php index e9c8551..5cc22e7 100644 --- a/lib/Document.php +++ b/lib/Document.php @@ -121,7 +121,7 @@ class Document extends AbstractDocument { } - public function __construct($source = null, ?string $encoding = null, int $quirksMode = 0) { + public function __construct($source = null, ?string $encoding = null) { // Because we cannot have union types until php 8... :) if ($source !== null && !$source instanceof \DOMDocument && !is_string($source)) { $type = gettype($source); @@ -144,7 +144,7 @@ class Document extends AbstractDocument { if (is_string($source)) { $this->loadHTML($source, null, $encoding); } else { - $this->loadDOM($source, $encoding, $quirksMode); + $this->loadDOM($source, $encoding); } } } diff --git a/tests/phpunit.dist.xml b/tests/phpunit.dist.xml index c1324e7..c1c5702 100644 --- a/tests/phpunit.dist.xml +++ b/tests/phpunit.dist.xml @@ -1,6 +1,6 @@ - cases/TestDOM.php + cases/TestDocument.php cases/TestSerializer.php diff --git a/tests/phpunit.dist.xml.bak b/tests/phpunit.dist.xml.bak deleted file mode 100644 index 9672f19..0000000 --- a/tests/phpunit.dist.xml.bak +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - ../lib - - - - - - cases/TestDOM.php - - - cases/TestSerializer.php - - - diff --git a/vendor-bin/robo/composer.lock b/vendor-bin/robo/composer.lock index db5fc86..d3af439 100644 --- a/vendor-bin/robo/composer.lock +++ b/vendor-bin/robo/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "consolidation/annotated-command", - "version": "4.3.2", + "version": "4.4.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "101c7dd0388259cfbba41b705b9255d2b1976bbf" + "reference": "308f6ac178566a1ce9aa90ed908dac90a2c1e707" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/101c7dd0388259cfbba41b705b9255d2b1976bbf", - "reference": "101c7dd0388259cfbba41b705b9255d2b1976bbf", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/308f6ac178566a1ce9aa90ed908dac90a2c1e707", + "reference": "308f6ac178566a1ce9aa90ed908dac90a2c1e707", "shasum": "" }, "require": { @@ -57,9 +57,9 @@ "description": "Initialize Symfony Console commands from annotated command class methods.", "support": { "issues": "https://github.com/consolidation/annotated-command/issues", - "source": "https://github.com/consolidation/annotated-command/tree/4.3.2" + "source": "https://github.com/consolidation/annotated-command/tree/4.4.0" }, - "time": "2021-09-19T14:35:36+00:00" + "time": "2021-09-30T01:08:15+00:00" }, { "name": "consolidation/config",