Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable missing attributes check on model via isOwnedBy check #665

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Sagmedjo
Copy link

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
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