Skip to content

Commit b453b9f

Browse files
authored
Merge pull request #453 from greg0ire/lexer-3
Upgrade to doctrine/lexer 3
2 parents 2ea83f4 + 19f3170 commit b453b9f

File tree

5 files changed

+75
-65
lines changed

5 files changed

+75
-65
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"php": "^8.1",
2727
"ext-json": "*",
2828
"ext-mbstring": "*",
29-
"doctrine/lexer": "^2.1",
29+
"doctrine/lexer": "^3.0",
3030
"league/commonmark": "^2.4",
3131
"league/flysystem": "^1.0",
3232
"league/tactician": "^1.1",

composer.lock

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

packages/guides-restructured-text/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"minimum-stability": "stable",
2323
"require": {
2424
"php": "^8.1",
25-
"doctrine/lexer": "^2.1",
25+
"doctrine/lexer": "^3.0",
2626
"phpdocumentor/guides": "dev-main@dev",
2727
"webmozart/assert": "^1.11"
2828
}

packages/guides-restructured-text/src/RestructuredText/Parser/InlineLexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ protected function getNonCatchablePatterns(): array
104104
}
105105

106106
/** @inheritDoc */
107-
protected function getType(&$value)
107+
protected function getType(string &$value)
108108
{
109109
if (preg_match('/^\\\\[\s\S]/i', $value)) {
110110
return self::ESCAPED_SIGN;

phpstan.neon

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ parameters:
1313
message: '#Unreachable statement - code above always terminates\.#'
1414
path: packages/guides-restructured-text/tests/unit/Parser/Productions/GridTableRuleTest.php
1515

16+
# https://github.com/doctrine/lexer/pull/109
17+
-
18+
message: '#^Result of && is always false.|Strict comparison using \=\=\= between Doctrine\\Common\\Lexer\\Token and null will always evaluate to false\.$#'
19+
paths:
20+
- packages/guides-restructured-text/src/RestructuredText/Parser/Productions/InlineRules/AnnotationRoleRule.php
21+
- packages/guides-restructured-text/src/RestructuredText/Parser/Productions/InlineRules/DefaultTextRoleRule.php
22+
- packages/guides-restructured-text/src/RestructuredText/Parser/Productions/InlineRules/EmphasisRule.php
23+
- packages/guides-restructured-text/src/RestructuredText/Parser/Productions/InlineRules/StrongRule.php
24+
- packages/guides-restructured-text/src/RestructuredText/Parser/Productions/InlineRules/TextRoleRule.php
25+
- packages/guides-restructured-text/src/RestructuredText/Parser/Productions/InlineRules/VariableInlineRule.php
26+
1627
paths:
1728
- packages/guides/src
1829
- packages/guides-markdown/src

0 commit comments

Comments
 (0)