Skip to content

Commit

Permalink
BUGFIX: No longer warn for node.parents()
Browse files Browse the repository at this point in the history
Fixes #29 (the first item)
  • Loading branch information
kdambekalns committed Nov 1, 2023
1 parent 0df4932 commit 2975a9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ContentRepository90/Rules/FusionNodeParentRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function refactorFileContent(string $fileContent): string
$eelExpression
))
->addCommentsIfRegexMatches(
'/\.parent($|[^(])/',
'/\.parent($|[^a-z(])/',
'// TODO 9.0 migration: Line %LINE: You may need to rewrite "VARIABLE.parent" to "q(VARIABLE).parent().get(0)". We did not auto-apply this migration because we cannot be sure whether the variable is a Node.'
)->getProcessedContent();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ prototype(Neos.Fusion.Form:Checkbox) < prototype(Neos.Fusion.Form:Component.Fie
type="checkbox"
name={node.parent}
value={someOtherVariable.parent}
data-parents={q(node).parents()}
checked={props.checked}
{...node.parent}
/>
Expand All @@ -34,6 +35,7 @@ prototype(Neos.Fusion.Form:Checkbox) < prototype(Neos.Fusion.Form:Component.Fie
type="checkbox"
name={q(node).parent().get(0)}
value={someOtherVariable.parent}
data-parents={q(node).parents()}
checked={props.checked}
{...q(node).parent().get(0)}
/>
Expand Down

0 comments on commit 2975a9f

Please sign in to comment.