You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a7c6e1e
Browse filesBrowse the repository at this point in the historyBrowse files
fix: print PHP 8.5 clone with (clone($obj, [...])) (#2531)
php-parser 3.7 parses the PHP 8.5 clone-with form into
`clone.properties`, but the printer only printed `what`, so
$copy = clone($obj, ['name' => $name]);
was silently rewritten as `$copy = clone $obj;`, dropping the
property overrides (exit code 0).
Print it laid out like a two-argument call, mirroring
printArgumentsList: on one line while it fits, otherwise hugging a
trailing array (`clone($obj, [` ... `])`), otherwise one argument per
line. The broken-out form has no trailing comma because php-parser
does not accept one after the properties expression yet.
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
0 commit comments