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
Added config for file_put_contents flags #507
Conversation
👎 as this config isn't available in all adapters. It's WRONG to call the write method with config specific to the adapter in question. |
Maybe we need to make this locking configurable for the entire adapter instance? |
I pushed a new approach for the flags in the local adapter. |
I'd say making it a constructor arguments would make this better. Agree @GrahamCampbell ? |
Yeh, that's what I was meaning @frankdejonge. :) |
* @param int $flags | ||
* @return $this | ||
*/ | ||
public function setFlags($flags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👎 I think this should be immutable. Should be configured on adapter instantiation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I unfortunately made this mistake for some other settings (like in the ftp stuff) and I don't like it.
Like this ? :) |
Indeed, like that. Now I think we need to get a better name for this. Possibly |
Either is fine IMO @frankdejonge. :) |
@dogiedog can you update the param name to writeFlags and squash the commits? |
Done |
@dogiedog can you squash the commits too? |
Done |
Added config for file_put_contents flags
For a project we encountered a problem with the local adapter, our mounted storage (nfs share) didn't support exclusive locking.
In the pull request you can set the flags for the file_put_contents in the config.