Commit 280a903
committed
minor #13042 [Lock] Default path for FlockStore (Guikingone)
This PR was merged into the 3.4 branch.
Discussion
----------
[Lock] Default path for FlockStore
Hi everyone 👋
As noticed in the source code:
```php
/**
* @param string|null $lockPath the directory to store the lock, defaults to the system's temporary directory
*
* @throws LockStorageException If the lock directory doesn’t exist or is not writable
*/
public function __construct(string $lockPath = null)
{
if (null === $lockPath) {
$lockPath = sys_get_temp_dir();
}
if (!is_dir($lockPath) || !is_writable($lockPath)) {
throw new InvalidArgumentException(sprintf('The directory "%s" is not writable.', $lockPath));
}
$this->lockPath = $lockPath;
}
```
`sys_get_temp_dir` is the default path is null is given in the constructor, could it be a good idea to notice this? 🤔
Commits
-------
efbb0b3 refacto(Lock): FlockStore default path1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| |||
0 commit comments