Skip to content

Commit

Permalink
BUGFIX Regex for fetching node properties
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubitz committed Jun 17, 2024
1 parent 03dba3f commit 9f5a97e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function refactorFileContent(string $fileContent): string
'// TODO 9.0 migration: Line %LINE: You may need to rewrite "VARIABLE.hiddenInIndex" to VARIABLE.property(\'hiddenInIndex\'). We did not auto-apply this migration because we cannot be sure whether the variable is a Node.'
)
->process(fn(string $eelExpression) => preg_replace(
'/\.property\([^)]+_hiddenInIndex[^)]+\)/',
'/\.property\([\'"]_hiddenInIndex[\'"]\)/',
'.property(\'hiddenInIndex\')',
$eelExpression
)
Expand Down
2 changes: 1 addition & 1 deletion src/ContentRepository90/Rules/FusionNodePathRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function refactorFileContent(string $fileContent): string
'// TODO 9.0 migration: Line %LINE: You may need to rewrite "VARIABLE.path" to Neos.Node.path(VARIABLE). We did not auto-apply this migration because we cannot be sure whether the variable is a Node.'
)
->process(fn(string $eelExpression) => preg_replace(
'/q\(([^)]+)\)\.property\([^)]+_path[^)]+\)/',
'/q\(([^)]+)\)\.property\([\'"]_path[\'"]\)/',
'Neos.Node.path($1)',
$eelExpression
)
Expand Down

0 comments on commit 9f5a97e

Please sign in to comment.