File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ authenticator methods (e.g. ``createToken()``)::
355
355
{
356
356
// ...
357
357
358
- public function authenticate(Request $request): PassportInterface
358
+ public function authenticate(Request $request): Passport
359
359
{
360
360
// ... process the request
361
361
@@ -367,7 +367,7 @@ authenticator methods (e.g. ``createToken()``)::
367
367
return $passport;
368
368
}
369
369
370
- public function createToken(PassportInterface $passport, string $firewallName): TokenInterface
370
+ public function createToken(Passport $passport, string $firewallName): TokenInterface
371
371
{
372
372
// read the attribute value
373
373
return new CustomOauthToken($passport->getUser(), $passport->getAttribute('scope'));
Original file line number Diff line number Diff line change @@ -101,7 +101,10 @@ resources. This context is passed to all normalizers. For example:
101
101
* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DateTimeNormalizer ` uses
102
102
``datetime_format `` key as date time format;
103
103
* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ AbstractObjectNormalizer `
104
- uses ``empty_iterable_as_object `` to represent empty objects as ``{} `` instead
104
+ uses ``preserve_empty_objects `` to represent empty objects as ``{} `` instead
105
+ of ``[] `` in JSON.
106
+ * :class: `Symfony\\ Component\\ Serializer\\ Serializer `
107
+ uses ``empty_array_as_object `` to represent empty arrays as ``{} `` instead
105
108
of ``[] `` in JSON.
106
109
107
110
You can pass the context as follows::
You can’t perform that action at this time.
0 commit comments