diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 8b99450..c47af1e 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -19,7 +19,8 @@ jobs: php-versions: - '8.1' - '8.2' - - '8.3' # nightly + - '8.3' + - '8.4' steps: - uses: actions/checkout@v3 diff --git a/composer.json b/composer.json index d598e55..657ebd5 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "php": "^8.1" }, "require-dev": { - "phpunit/phpunit": "^10.3", + "phpunit/phpunit": "^10.3 || ^11.5", "friendsofphp/php-cs-fixer": "^3.22" }, "scripts": { diff --git a/composer.lock b/composer.lock index f7c1029..14a53da 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "331567764171bde442b7efcdc3f90583", + "content-hash": "04e8d6e2022f043fa7e2a13e4bb0fcac", "packages": [], "packages-dev": [ { @@ -3578,13 +3578,13 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "ext-xml": "*", "php": "^8.1" }, - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/src/XMLParser.php b/src/XMLParser.php index d9e92f3..3005b66 100644 --- a/src/XMLParser.php +++ b/src/XMLParser.php @@ -62,9 +62,8 @@ public function setUp(): void * Once the iterator goes through them all, the self::next() method * will read and parse the next portion of the input XML stream. */ - xml_set_object($this->parser, $this); - xml_set_element_handler($this->parser, 'startXML', 'endXML'); - xml_set_character_data_handler($this->parser, 'charXML'); + xml_set_element_handler($this->parser, [$this,'startXML'], [$this, 'endXML']); + xml_set_character_data_handler($this->parser, [$this,'charXML']); // @see https://www.php.net/manual/en/function.xml-parser-set-option.php xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);