Skip to content

Commit fe696e0

Browse files
committed
Merge branch '4.2'
* 4.2: Mentioned the Lock expiringDate and isExpired methods Fixed a minor issue in Serializer component Added the $context argument to supports* methods
2 parents 3f5a2bb + 7437b10 commit fe696e0

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

components/lock.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ to reset the TTL to its original value::
155155
// refresh the lock for 600 seconds (next refresh() call will be 30 seconds again)
156156
$lock->refresh(600);
157157

158+
This component also provides two useful methods related to expiring locks:
159+
``getExpiringDate()`` (which returns ``null`` or a ``\DateTimeImmutable``
160+
object) and ``isExpired()`` (which returns a boolean).
161+
158162
Available Stores
159163
----------------
160164

components/serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ and return ``true`` when
14361436
:method:`Symfony\\Component\\Serializer\\Normalizer\\CacheableSupportsMethodInterface::hasCacheableSupportsMethod`
14371437
is called.
14381438

1439-
.. note::
1439+
.. note::
14401440

14411441
All built-in :ref:`normalizers and denormalizers <component-serializer-normalizers>`
14421442
as well the ones included in `API Platform`_ natively implement this interface.

serializer/custom_encoders.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ create your own encoder that uses the
3232
return Yaml::dump($data);
3333
}
3434

35-
public function supportsEncoding($format)
35+
public function supportsEncoding($format, array $context = [])
3636
{
3737
return 'yaml' === $format;
3838
}
@@ -42,7 +42,7 @@ create your own encoder that uses the
4242
return Yaml::parse($data);
4343
}
4444

45-
public function supportsDecoding($format)
45+
public function supportsDecoding($format, array $context = [])
4646
{
4747
return 'yaml' === $format;
4848
}

serializer/custom_normalizer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``:
4747
return $data;
4848
}
4949

50-
public function supportsNormalization($data, $format = null)
50+
public function supportsNormalization($data, $format = null, array $context = [])
5151
{
5252
return $data instanceof Topic;
5353
}

0 commit comments

Comments
 (0)