plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Bug]: Guarded attribute assignement inspection should not be triggered only by array key value syntax

Open bilboque opened this issue 1 month ago • 1 comments

Bug description

It seems that Inspection ID: LaravelEloquentGuardedAttributeAssignmentInspection can be triggered by an unrelated key.

$modelInstance->update([
    'some_key' => somefunctioncall([
        'unrelated_key' => $value
    ])
])

in this exemple the 'unrelated_key' will flagged as a Guarded attribute asignement.

I can provide more detail if necessary.

Plugin version

11.5.0.253

Operating system

MacOS

Steps to reproduce

No response

Relevant log output


bilboque avatar Dec 10 '25 18:12 bilboque