Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tabuna
Copy link
Member

@tabuna tabuna commented Apr 24, 2025

This patch introduces a compatibility fix for a behavior change in Laravel introduced in laravel/framework#55471, where getAttribute('relation.key') would previously return null if the relation was a plain array, but now throws an exception.

Example:

$model->setRelations([
    'many' => [
        'one',
        'two',
        'three' => 84,
    ]
]);

$value = $model->getAttribute('many.three');
// Previously returned null, now throws

@tabuna tabuna merged commit 6dae96b into master Apr 24, 2025
45 of 46 checks passed
@tabuna tabuna deleted the relation_test branch April 24, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants