Skip to content

Commit c224c73

Browse files
authored
Limit php maximum version to php 8.1 (#335)
* Limit php maximum version * Updated tools
1 parent ac729bb commit c224c73

File tree

7 files changed

+456
-457
lines changed

7 files changed

+456
-457
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PHPMatcher::error() : ?string;
1414

1515
It was built to simplify API's functional testing.
1616

17-
* [![Build Status](https://github.com/coduo/php-matcher/workflows/Tests/badge.svg?branch=6.x)](https://github.com/coduo/php-matcher/actions?query=workflow%3ATests) - [6.x README](https://github.com/coduo/php-matcher/tree/6.x/README.md) PHP >= 7.4
17+
* [![Build Status](https://github.com/coduo/php-matcher/workflows/Tests/badge.svg?branch=6.x)](https://github.com/coduo/php-matcher/actions?query=workflow%3ATests) - [6.x README](https://github.com/coduo/php-matcher/tree/6.x/README.md) PHP >= 7.4 <= 8.1
1818
* [![Build Status](https://github.com/coduo/php-matcher/workflows/Tests/badge.svg?branch=5.x)](https://github.com/coduo/php-matcher/actions?query=workflow%3ATests) - [5.x README](https://github.com/coduo/php-matcher/tree/5.x/README.md) PHP >= 7.2 < 8.0
1919
* [![Build Status](https://github.com/coduo/php-matcher/workflows/Tests/badge.svg?branch=5.0)](https://github.com/coduo/php-matcher/actions?query=workflow%3ATests) - [5.0 README](https://github.com/coduo/php-matcher/tree/5.0/README.md) PHP >= 7.2 < 8.0
2020
* [![Build Status](https://travis-ci.org/coduo/php-matcher.svg?branch=4.0)](https://travis-ci.org/coduo/php-matcher) - [4.0.* README](https://github.com/coduo/php-matcher/tree/4.0/README.md) PHP >= 7.2 < 8.0

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=7.4",
18+
"php": "^7.4.2 || ~8.0 || ~8.1",
1919
"ext-filter": "*",
2020
"ext-json": "*",
2121
"ext-simplexml": "*",

composer.lock

Lines changed: 50 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Parser.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,17 @@ private function getExpanderName() : string
125125

126126
$expander = $this->lexer->lookahead['value'];
127127

128+
/** @phpstan-ignore-next-line */
128129
if ($expander === null) {
129130
throw PatternException::syntaxError($this->unexpectedSyntaxError($this->lexer->lookahead, '.expanderName(args) definition'));
130131
}
131132

132133
$this->lexer->moveNext();
133134

135+
if (\is_int($expander)) {
136+
return (string) $expander;
137+
}
138+
134139
return $expander;
135140
}
136141

0 commit comments

Comments
 (0)