Skip to content

Commit dab151b

Browse files
committed
minor #14644 [Lock] - replace getExpiringDate by getRemainingLifetime (ybenhssaien)
This PR was submitted for the 5.2 branch but it was merged into the 4.4 branch instead. Discussion ---------- [Lock] - replace getExpiringDate by getRemainingLifetime As the method `getExpiringDate` doesn't exist, replace it by `getRemainingLifetime` which returns the remaining time to live in seconds <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `5.x` for features of unreleased versions). --> Commits ------- f812114 Lock - replace getExpiringDate by getRemainingLifetime
2 parents 7d03251 + f812114 commit dab151b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/lock.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ to reset the TTL to its original value::
196196
$lock->refresh(600);
197197

198198
This component also provides two useful methods related to expiring locks:
199-
``getExpiringDate()`` (which returns ``null`` or a ``\DateTimeImmutable``
200-
object) and ``isExpired()`` (which returns a boolean).
199+
``getRemainingLifetime()`` (which returns ``null`` or a ``float``
200+
as seconds) and ``isExpired()`` (which returns a boolean).
201201

202202
The Owner of The Lock
203203
---------------------

0 commit comments

Comments
 (0)