Skip to content

Commit

Permalink
Merge pull request #14 from elecena/php/8.4
Browse files Browse the repository at this point in the history
Add the support for PHP 8.4
  • Loading branch information
macbre authored Jan 13, 2025
2 parents 8da89c3 + 6eb5068 commit 240da01
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
php-versions:
- '8.1'
- '8.2'
- '8.3' # nightly
- '8.3'
- '8.4'

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/XMLParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 240da01

Please sign in to comment.