for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Types\Exception;
use Doctrine\DBAL\Types\ConversionException;
final class SerializationFailed extends ConversionException implements TypesException
{
/**
* @param mixed $value
*/
public static function new($value, string $format, string $error) : self
$actualType = is_object($value) ? get_class($value) : gettype($value);
return new self(
sprintf(
"Could not convert PHP type '%s' to '%s', as an '%s' error was triggered by the serialization",
$actualType,
$format,
$error
)
);
}