File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,19 @@ the file, so you can pass any value for this argument.
48
48
to avoid name collisions, ``LockHandler `` also appends a hash to the name of
49
49
the lock file.
50
50
51
- By default, the lock will be created in the temporary directory, but you can
52
- optionally select the directory where locks are created by passing it as the
53
- second argument of the constructor.
51
+ By default, the lock will be created in the system's temporary directory, but
52
+ you can optionally select the directory where locks are created by passing it as
53
+ the second argument of the constructor.
54
+
55
+ .. tip ::
56
+
57
+ Another way to configure the directory where the locks are created is to
58
+ define a special environment variable, because PHP will use that value to
59
+ override the default temporary directory. On Unix-based systems, define the
60
+ ``TMPDIR `` variable. On Windows systems, define any of these variables:
61
+ ``TMP ``, ``TEMP `` or ``USERPROFILE `` (they are checked in this order). This
62
+ technique is useful for example when deploying a third-party Symfony
63
+ application whose code can't be modified.
54
64
55
65
The :method: `Symfony\\ Component\\ Filesystem\\ LockHandler::lock ` method tries to
56
66
acquire the lock. If the lock is acquired, the method returns ``true ``,
You can’t perform that action at this time.
0 commit comments