fix merge

This commit is contained in:
Nicolas Grekas 2019-06-13 16:28:46 +02:00
parent 1acb50e0a4
commit 23d8fc761b

View File

@ -143,25 +143,6 @@ abstract class AbstractToken implements TokenInterface
return [$this->user, $this->authenticated, null, $this->attributes, $this->roleNames];
}
/**
* {@inheritdoc}
*
* @final since Symfony 4.3, use __serialize() instead
*
* @internal since Symfony 4.3, use __serialize() instead
*/
public function serialize()
{
$serialized = $this->__serialize();
if (null === $isCalledFromOverridingMethod = \func_num_args() ? func_get_arg(0) : null) {
$trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2);
$isCalledFromOverridingMethod = isset($trace[1]['function'], $trace[1]['object']) && 'serialize' === $trace[1]['function'] && $this === $trace[1]['object'];
}
return $isCalledFromOverridingMethod ? $serialized : serialize($serialized);
}
/**
* Restores the object state from an array given by __serialize().
*