Skip to content

Disable missing attributes check on model via isOwnedBy check#665

Open
Sagmedjo wants to merge 2 commits intoJosephSilber:masterfrom
Sagmedjo:master
Open

Disable missing attributes check on model via isOwnedBy check#665
Sagmedjo wants to merge 2 commits intoJosephSilber:masterfrom
Sagmedjo:master

Conversation

@Sagmedjo
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant