[4.x] Bug: Nested JSON fields break with same-name helper/accessor method on model (#18199)

* snapshot updates

* tests and test model/resource updates

* `hasAttribute()` check

As a workaround for Laravel's false-positives in `hasRelationship()`.

* Update Post.php

Signed-off-by: Dan Harrin <git@danharrin.com>

* Update config method to use array syntax

Signed-off-by: Dan Harrin <git@danharrin.com>

* Update HasCellState.php

Signed-off-by: Dan Harrin <git@danharrin.com>

* clean up elsewhere

---------

Signed-off-by: Dan Harrin <git@danharrin.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
This commit is contained in:
Casey Dwyer
2025-10-14 10:08:15 +01:00
committed by GitHub
co-authored by Dan Harrin
parent 7986448fac
commit 72ead269c9
24 changed files with 118 additions and 7 deletions
@@ -16,6 +16,7 @@ return new class extends Migration
$table->unsignedTinyInteger('rating')->default(0);
$table->json('tags')->nullable();
$table->string('title');
$table->json('config')->nullable();
$table->json('json')->nullable();
$table->json('json_array_of_objects')->nullable();
$table->string('string_backed_enum')->nullable();