bouncer icon indicating copy to clipboard operation
bouncer copied to clipboard

Disable missing attributes check on model via isOwnedBy check

Open Sagmedjo opened this issue 1 year ago • 1 comments

This pull request references your idea on this pull request: #620

Hope it is going to be pulled as soon as possible. Because I do not want to turn off my shouldBeStrict checks globally

Sagmedjo avatar Dec 19 '24 15:12 Sagmedjo

It's important to note that using this approach with Laravel Octane might lead to unexpected behavior if the application also has preventAccessingMissingAttributes enabled in production.

In Laravel Octane, static properties are shared between requests. This means that during multiple concurrent requests, the mechanism for preventing access to missing attributes might not function as intended.

That said, I believe keeping preventAccessingMissingAttributes enabled in production is not a best practice. It’s generally better to allow a slower page load than to risk errors. Therefore, I don’t see any major issue with this approach.

Sagmedjo avatar Dec 19 '24 15:12 Sagmedjo