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/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

strategy:
matrix:
php: ['5.6', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php: ['7.1', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']

runs-on: ubuntu-latest

Expand Down
6 changes: 3 additions & 3 deletions Mf2/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ public function upgradeRelTagToCategory(DOMElement $el) {
* @param DOMElement $context optionally specify an element from which to parse microformats
* @return array An array containing all the microformats found in the current document
*/
public function parse($convertClassic = true, DOMElement $context = null) {
public function parse($convertClassic = true, ?DOMElement $context = null) {
$this->convertClassic = $convertClassic;
$mfs = $this->parse_recursive($context);

Expand Down Expand Up @@ -1411,7 +1411,7 @@ public function parse($convertClassic = true, DOMElement $context = null) {
* @param int $depth: recursion depth
* @return array
*/
public function parse_recursive(DOMElement $context = null, $depth = 0) {
public function parse_recursive(?DOMElement $context = null, $depth = 0) {
$mfs = array();
$mfElements = $this->getRootMF($context);

Expand Down Expand Up @@ -1516,7 +1516,7 @@ public function parseFromId($id, $convertClassic=true) {
* @param DOMElement $context
* @return DOMNodeList
*/
public function getRootMF(DOMElement $context = null) {
public function getRootMF(?DOMElement $context = null) {
// start with mf2 root class name xpath
$xpaths = array(
'(php:function("\\Mf2\\classHasMf2RootClassname", normalize-space(@class)))'
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"bin": ["bin/fetch-mf2", "bin/parse-mf2"],
"require": {
"php": ">=5.6.0"
"php": ">=7.1.0"
},
"config": {
"platform": {
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<description>PHP-MF2 Standards</description>
<file>./Mf2/Parser.php</file>
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="5.6-"/>
<config name="testVersion" value="7.1-"/>
</ruleset>