Skip to content

Commit

Permalink
Bleeding edge - unescapeStrings in phpdoc-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Oct 20, 2022
1 parent 85f3477 commit 97786ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions conf/bleedingEdge.neon
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ parameters:
listType: true
missingMagicSerializationRule: true
nullContextForVoidReturningFunctions: true
unescapeStrings: true
4 changes: 4 additions & 0 deletions conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ parameters:
listType: false
missingMagicSerializationRule: false
nullContextForVoidReturningFunctions: false
unescapeStrings: false
fileExtensions:
- php
checkAdvancedIsset: false
Expand Down Expand Up @@ -263,6 +264,7 @@ parametersSchema:
listType: bool()
missingMagicSerializationRule: bool()
nullContextForVoidReturningFunctions: bool()
unescapeStrings: bool()
])
fileExtensions: listOf(string())
checkAdvancedIsset: bool()
Expand Down Expand Up @@ -507,6 +509,8 @@ services:

-
class: PHPStan\PhpDocParser\Parser\ConstExprParser
arguments:
unescapeStrings: %featureToggles.unescapeStrings%

-
class: PHPStan\PhpDocParser\Parser\PhpDocParser
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/ValidateIgnoredErrorsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function loadConfiguration(): void
$parser,
new TypeStringResolver(
new Lexer(),
new TypeParser(new ConstExprParser()),
new TypeParser(new ConstExprParser($builder->parameters['featureToggles']['unescapeStrings'])),
new TypeNodeResolver(
new DirectTypeNodeResolverExtensionRegistryProvider(
new class implements TypeNodeResolverExtensionRegistry {
Expand Down

0 comments on commit 97786ed

Please sign in to comment.