Skip to content

Commit 02b2d0c

Browse files
committed
Added support for php 7.4
1 parent d100093 commit 02b2d0c

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ php:
44
- 7.1
55
- 7.2
66
- 7.3
7+
- 7.4
78

89
install:
910
- composer self-update

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
- Added support for php 7.4
12+
13+
## 2.1.0
14+
1015
### Added
1116
- New `removeSmartyScripts` configuration setting. Defaults to true.
1217
- Added `declare(strict_types=1)` to all source files.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PHP Html Parser
22
==========================
33

4-
Version 2.1.0
4+
Version 2.2.0
55

66
[![Build Status](https://travis-ci.org/paquettg/php-html-parser.png)](https://travis-ci.org/paquettg/php-html-parser)
77
[![Coverage Status](https://coveralls.io/repos/paquettg/php-html-parser/badge.png)](https://coveralls.io/r/paquettg/php-html-parser)
@@ -18,7 +18,7 @@ Install the latest version using composer.
1818
$ composer require paquettg/php-html-parser
1919
```
2020

21-
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.1, 7.2, and 7.3.
21+
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.1, 7.2, 7.3, and 7.4.
2222

2323
Usage
2424
-----

src/PHPHtmlParser/Dom/Tag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,11 @@ public function getAttributes()
296296
* @param string $key
297297
* @return mixed
298298
*/
299-
public function getAttribute(string $key)
299+
public function getAttribute(string $key):array
300300
{
301301
$key = strtolower($key);
302302
if ( ! isset($this->attr[$key])) {
303-
return null;
303+
return ['value' => null, 'doubleQuote' => true];
304304
}
305305
$value = $this->attr[$key]['value'];
306306
if (is_string($value) && ! is_null($this->encode)) {

0 commit comments

Comments
 (0)