prefix
stringlengths
512
512
suffix
stringlengths
256
256
middle
stringlengths
14
229
meta
dict
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\RingCentral; use Symfony\Component\Notifier\Exception\InvalidArgumentException; use Symfony\Component\Notifier\Exception\TransportException...
Interface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author gnito-org <https://github.com/gnito-org> */ final class RingCentralTransport extends AbstractTransport { protected const HOST = 'platform.ringcentral.com'; public fu
fony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportException
{ "filepath": "src/Symfony/Component/Notifier/Bridge/RingCentral/RingCentralTransport.php", "language": "php", "file_size": 3555, "cut_index": 614, "middle_length": 229 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Test\Constraint; use PHPUnit\Framework\Constrai...
geInterface $message */ protected function matches($message): bool { return $message->getTransport() === $this->expectedText; } /** * @param MessageInterface $message */ protected function failureDescription($mes
int { public function __construct( private ?string $expectedText, ) { } public function toString(): string { return \sprintf('is "%s"', $this->expectedText); } /** * @param Messa
{ "filepath": "src/Symfony/Component/Notifier/Test/Constraint/NotificationTransportIsEqual.php", "language": "php", "file_size": 1093, "cut_index": 515, "middle_length": 229 }
php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\FlashMessage; use Symfony\Component\Notifier\E...
ring $importance): string { if (!\array_key_exists($importance, static::IMPORTANCE_MAP)) { throw new FlashMessageImportanceMapperException($importance, static::class); } return static::IMPORTANCE_MAP[$importance];
mImportance(st
{ "filepath": "src/Symfony/Component/Notifier/FlashMessage/AbstractFlashMessageImportanceMapper.php", "language": "php", "file_size": 791, "cut_index": 514, "middle_length": 14 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\FlashMessage; use Symfony\Component\Notifier\Notificatio...
protected const IMPORTANCE_MAP = [ Notification::IMPORTANCE_URGENT => 'danger', Notification::IMPORTANCE_HIGH => 'warning', Notification::IMPORTANCE_MEDIUM => 'info', Notification::IMPORTANCE_LOW => 'success', ]; }
perInterface {
{ "filepath": "src/Symfony/Component/Notifier/FlashMessage/BootstrapFlashMessageImportanceMapper.php", "language": "php", "file_size": 794, "cut_index": 524, "middle_length": 14 }
* This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\FlashMessage; use Symfony\Component\Notifier\Notificat...
protected const IMPORTANCE_MAP = [ Notification::IMPORTANCE_URGENT => 'notification', Notification::IMPORTANCE_HIGH => 'notification', Notification::IMPORTANCE_MEDIUM => 'notification', Notification::IMPORTANCE_LOW => '
perInterface {
{ "filepath": "src/Symfony/Component/Notifier/FlashMessage/DefaultFlashMessageImportanceMapper.php", "language": "php", "file_size": 816, "cut_index": 522, "middle_length": 14 }
?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Channel; use Symfony\Component\Messenger\Mess...
BusInterface $bus = null) { if (null === $transport && null === $bus) { throw new LogicException(\sprintf('"%s" needs a Transport or a Bus but both cannot be "null".', static::class)); } $this->transport = $transpor
abstract class AbstractChannel implements ChannelInterface { protected ?TransportInterface $transport; protected ?MessageBusInterface $bus; public function __construct(?TransportInterface $transport = null, ?Message
{ "filepath": "src/Symfony/Component/Notifier/Channel/AbstractChannel.php", "language": "php", "file_size": 1036, "cut_index": 513, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Channel; use Symfony\Component\HttpFoundation\RequestStack; use Symfo...
private RequestStack $stack, private FlashMessageImportanceMapperInterface $mapper = new DefaultFlashMessageImportanceMapper(), ) { } public function notify(Notification $notification, RecipientInterface $recipient, ?string $t
cation\Notification; use Symfony\Component\Notifier\Recipient\RecipientInterface; /** * @author Fabien Potencier <fabien@symfony.com> */ final class BrowserChannel implements ChannelInterface { public function __construct(
{ "filepath": "src/Symfony/Component/Notifier/Channel/BrowserChannel.php", "language": "php", "file_size": 1594, "cut_index": 537, "middle_length": 229 }
is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Channel; use Symfony\Component\Notifier\Exception\InvalidArgumentEx...
ng $importance): array { if (!isset($this->policy[$importance])) { throw new InvalidArgumentException(\sprintf('Importance "%s" is not defined in the Policy.', $importance)); } return $this->policy[$importance];
) { } public function getChannels(stri
{ "filepath": "src/Symfony/Component/Notifier/Channel/ChannelPolicy.php", "language": "php", "file_size": 848, "cut_index": 535, "middle_length": 52 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Channel; use Symfony\Component\Notifier\Message\ChatMess...
{ $message = null; if ($notification instanceof ChatNotificationInterface) { $message = $notification->asChatMessage($recipient, $transportName); } $message ??= ChatMessage::fromNotification($notification);
e; /** * @author Fabien Potencier <fabien@symfony.com> */ class ChatChannel extends AbstractChannel { public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
{ "filepath": "src/Symfony/Component/Notifier/Channel/ChatChannel.php", "language": "php", "file_size": 1396, "cut_index": 524, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Channel; use Symfony\Component\Notifier\Message\DesktopM...
ull): void { if ($notification instanceof DesktopNotificationInterface) { $message = $notification->asDesktopMessage($recipient, $transportName); } $message ??= DesktopMessage::fromNotification($notification);
terface; /** * @author Ahmed Ghanem <ahmedghanem7361@gmail.com> */ class DesktopChannel extends AbstractChannel { public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = n
{ "filepath": "src/Symfony/Component/Notifier/Channel/DesktopChannel.php", "language": "php", "file_size": 1395, "cut_index": 524, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Channel; use Symfony\Component\Mailer\Envelope; use Symfony\Component\Mailer\Messenger\SendEmailMessage; use Symfony\Component\Mailer\Transport\Tr...
\EmailRecipientInterface; use Symfony\Component\Notifier\Recipient\RecipientInterface; /** * @author Fabien Potencier <fabien@symfony.com> */ class EmailChannel implements ChannelInterface { private string|Address|null $from; public function __
tion; use Symfony\Component\Notifier\Message\EmailMessage; use Symfony\Component\Notifier\Notification\EmailNotificationInterface; use Symfony\Component\Notifier\Notification\Notification; use Symfony\Component\Notifier\Recipient
{ "filepath": "src/Symfony/Component/Notifier/Channel/EmailChannel.php", "language": "php", "file_size": 3296, "cut_index": 614, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Channel; use Symfony\Component\Notifier\Message\PushMess...
{ $message = null; if ($notification instanceof PushNotificationInterface) { $message = $notification->asPushMessage($recipient, $transportName); } $message ??= PushMessage::fromNotification($notification);
e; /** * @author Tomas Norkūnas <norkunas.tom@gmail.com> */ class PushChannel extends AbstractChannel { public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
{ "filepath": "src/Symfony/Component/Notifier/Channel/PushChannel.php", "language": "php", "file_size": 1399, "cut_index": 524, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Channel; use Symfony\Component\Notifier\Message\SmsMessage; use Symfo...
nction notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void { $message = null; if ($notification instanceof SmsNotificationInterface) { $message = $notification->asSmsMessage
Component\Notifier\Recipient\SmsRecipientInterface; /** * @author Fabien Potencier <fabien@symfony.com> */ class SmsChannel extends AbstractChannel { /** * @param SmsRecipientInterface $recipient */ public fu
{ "filepath": "src/Symfony/Component/Notifier/Channel/SmsChannel.php", "language": "php", "file_size": 1568, "cut_index": 537, "middle_length": 229 }
t\Serializer\Encoder\ContextAwareDecoderInterface; use Symfony\Component\Serializer\Encoder\ContextAwareEncoderInterface; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Encoder\EncoderInterface; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony...
y\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** * Serializer serializes and deserializes data. * * objec
tion; use Symfony\Component\Serializer\Exception\UnsupportedFormatException; use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfon
{ "filepath": "src/Symfony/Component/Serializer/Serializer.php", "language": "php", "file_size": 17347, "cut_index": 921, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer; use Symfony\Component\Serializer\Exception\ExceptionInterface; use...
ueException Occurs when a value cannot be normalized * @throws UnexpectedValueException Occurs when a value cannot be encoded * @throws ExceptionInterface Occurs for all the other cases of serialization-related errors */
*/ interface SerializerInterface { /** * Serializes data in the appropriate format. * * @param array<string, mixed> $context Options normalizers/encoders have access to * * @throws NotNormalizableVal
{ "filepath": "src/Symfony/Component/Serializer/SerializerInterface.php", "language": "php", "file_size": 1911, "cut_index": 537, "middle_length": 229 }
?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Exception; /** * ExtraAttributesException....
xtraAttributes) > 1 ? 'are' : 'is'); parent::__construct($msg, 0, $previous); } /** * Get the extra attributes that are not allowed. * * @return list<string> */ public function getExtraAttributes(): array {
construct( private readonly array $extraAttributes, ?\Throwable $previous = null, ) { $msg = \sprintf('Extra attributes are not allowed ("%s" %s unknown).', implode('", "', $extraAttributes), \count($e
{ "filepath": "src/Symfony/Component/Serializer/Exception/ExtraAttributesException.php", "language": "php", "file_size": 1042, "cut_index": 513, "middle_length": 229 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Exception; /** * @author Maxime VEBER <maxim...
rent::__construct($message, $code, $previous); } /** * @return string[] */ public function getMissingConstructorArguments(): array { return $this->missingArguments; } /** * @return class-string|null */
*/ public function __construct( string $message, int $code = 0, ?\Throwable $previous = null, private array $missingArguments = [], private ?string $class = null, ) { pa
{ "filepath": "src/Symfony/Component/Serializer/Exception/MissingConstructorArgumentsException.php", "language": "php", "file_size": 1083, "cut_index": 515, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Exception; /** * @author Christian Flothmann <christian.flothmann@sensiolabs.de> */ class N...
= null, ?array $expectedTypes = null, ?string $path = null, bool $useMessageForUser = false) { parent::__construct($message, $code, $previous); $this->currentType = $currentType; $this->expectedTypes = $expectedTypes ? array_m
bool $useMessageForUser = false; /** * @param list<string|\Stringable>|null $expectedTypes */ public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, ?string $currentType
{ "filepath": "src/Symfony/Component/Serializer/Exception/NotNormalizableValueException.php", "language": "php", "file_size": 2389, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Exception; /** * @author Grégoire Pineau <lyrixx@lyrixx.info> */ ...
traAttributesErrors = [], ) { $extraAttributes = []; foreach ($extraAttributesErrors as $error) { $extraAttributes = array_merge($extraAttributes, $error->getExtraAttributes()); } if ($extraAttributes) {
n[] $notNormalizableErrors * @param ExtraAttributesException[] $extraAttributesErrors */ public function __construct( private mixed $data, private array $notNormalizableErrors, array $ex
{ "filepath": "src/Symfony/Component/Serializer/Exception/PartialDenormalizationException.php", "language": "php", "file_size": 1891, "cut_index": 537, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context; /** * @author Mathias Arlaud <mathias....
*/ public function withContext(ContextBuilderInterface|array $context): static { if ($context instanceof ContextBuilderInterface) { $context = $context->toArray(); } $instance = new static(); $inst
tic { $instance = new static(); $instance->context = array_merge($this->context, [$key => $value]); return $instance; } /** * @param ContextBuilderInterface|array<string, mixed> $context
{ "filepath": "src/Symfony/Component/Serializer/Context/ContextBuilderTrait.php", "language": "php", "file_size": 1226, "cut_index": 518, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context; use Symfony\Component\Serializer\Normalizer\D...
ist (in JSON: []). */ public function withEmptyArrayAsObject(?bool $emptyArrayAsObject): static { return $this->with(Serializer::EMPTY_ARRAY_AS_OBJECT, $emptyArrayAsObject); } public function withCollectDenormalizationErrors(?
l.com> */ final class SerializerContextBuilder implements ContextBuilderInterface { use ContextBuilderTrait; /** * Configures whether an empty array should be transformed to an * object (in JSON: {}) or to a l
{ "filepath": "src/Symfony/Component/Serializer/Context/SerializerContextBuilder.php", "language": "php", "file_size": 1407, "cut_index": 524, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\Serializer\Context\ContextBuilderInterface; use Symfony\Component\Serializer\Context\ContextBuilderTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Seriali...
when we encounter the same object a * second time, we consider that a circular reference. * * You can raise this value for special cases, e.g. in combination with the * max depth setting of the object normalizer. * * Must be
s AbstractNormalizerContextBuilder implements ContextBuilderInterface { use ContextBuilderTrait; /** * Configures how many loops of circular reference to allow while normalizing. * * The value 1 means that
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php", "language": "php", "file_size": 6443, "cut_index": 716, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer; /** * A helper providing autocompletion for available AbstractObjectNormalizer option...
/** * Configures a pattern to keep track of the current depth. * * Must contain exactly two string placeholders. * * @throws InvalidArgumentException */ public function withDepthKeyPattern(?string $depthKeyPattern): stat
r to respect the max depth metadata on fields. */ public function withEnableMaxDepth(?bool $enableMaxDepth): static { return $this->with(AbstractObjectNormalizer::ENABLE_MAX_DEPTH, $enableMaxDepth); }
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/AbstractObjectNormalizerContextBuilder.php", "language": "php", "file_size": 5217, "cut_index": 716, "middle_length": 229 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\Ser...
t; /** * Configures if invalid values are allowed in denormalization. * They will be denormalized into `null` values. */ public function withAllowInvalidValues(bool $allowInvalidValues): static { return $this->with(Backe
ing autocompletion for available BackedEnumNormalizer options. * * @author Nicolas PHILIPPE <nikophil@gmail.com> */ final class BackedEnumNormalizerContextBuilder implements ContextBuilderInterface { use ContextBuilderTrai
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/BackedEnumNormalizerContextBuilder.php", "language": "php", "file_size": 1069, "cut_index": 515, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\Serializer\Context\ContextBuilderInterface; use Sym...
* Configure the instance field of normalized data. */ public function withInstance(mixed $instance): static { return $this->with(ConstraintViolationListNormalizer::INSTANCE, $instance); } /** * Configure the status fiel
nstraintViolationList options. * * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class ConstraintViolationListNormalizerContextBuilder implements ContextBuilderInterface { use ContextBuilderTrait; /**
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/ConstraintViolationListNormalizerContextBuilder.php", "language": "php", "file_size": 2045, "cut_index": 563, "middle_length": 229 }
?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\S...
tBuilderTrait; /** * Configures the format of the interval. * * @see https://php.net/manual/en/dateinterval.format.php */ public function withFormat(?string $format): static { return $this->with(DateIntervalNormaliz
oviding autocompletion for available DateIntervalNormalizer options. * * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class DateIntervalNormalizerContextBuilder implements ContextBuilderInterface { use Contex
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/DateIntervalNormalizerContextBuilder.php", "language": "php", "file_size": 1032, "cut_index": 513, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\Serializer\Context\ContextBuilderInterface; use Sym...
ContextBuilderTrait; /** * Configures the format of the date. * * @see https://secure.php.net/manual/en/datetime.format.php */ public function withFormat(?string $format): static { return $this->with(DateTimeNormal
* A helper providing autocompletion for available DateTimeNormalizer options. * * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class DateTimeNormalizerContextBuilder implements ContextBuilderInterface { use
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/DateTimeNormalizerContextBuilder.php", "language": "php", "file_size": 2363, "cut_index": 563, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\Serializer\C...
/** * Configures the title of the normalized data. */ public function withTitle(?string $title): static { return $this->with(FormErrorNormalizer::TITLE, $title); } /** * Configures the type of the normalized data.
mpletion for available FormErrorNormalizer options. * * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class FormErrorNormalizerContextBuilder implements ContextBuilderInterface { use ContextBuilderTrait;
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/FormErrorNormalizerContextBuilder.php", "language": "php", "file_size": 1352, "cut_index": 524, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\Serializer\C...
* Configure the title field of normalized data. */ public function withTitle(?string $title): static { return $this->with(ProblemNormalizer::TITLE, $title); } /** * Configure the type field of normalized data. */
letion for available ProblemNormalizer options. * * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class ProblemNormalizerContextBuilder implements ContextBuilderInterface { use ContextBuilderTrait; /**
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/ProblemNormalizerContextBuilder.php", "language": "php", "file_size": 1358, "cut_index": 524, "middle_length": 229 }
ackage. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\Serializer\Normalizer\PropertyNormalizer; /** ...
* Configures whether fields should be output based on visibility. */ public function withNormalizeVisibility(int $normalizeVisibility): static { return $this->with(PropertyNormalizer::NORMALIZE_VISIBILITY, $normalizeVisibility);
AbstractObjectNormalizerContextBuilder { /**
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/PropertyNormalizerContextBuilder.php", "language": "php", "file_size": 871, "cut_index": 559, "middle_length": 52 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\Serializer\C...
ilderInterface { use ContextBuilderTrait; /** * Configures the uuid format for normalization. * * @throws InvalidArgumentException */ public function withNormalizationFormat(?string $normalizationFormat): static {
zer\Normalizer\UidNormalizer; /** * A helper providing autocompletion for available UidNormalizer options. * * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class UidNormalizerContextBuilder implements ContextBu
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/UidNormalizerContextBuilder.php", "language": "php", "file_size": 1366, "cut_index": 524, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Normalizer; use Symfony\Component\PropertyAccess\Exception\...
zer options. * * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class UnwrappingDenormalizerContextBuilder implements ContextBuilderInterface { use ContextBuilderTrait; /** * Configures the path of wrapped data during denormali
extBuilderTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\UnwrappingDenormalizer; /** * A helper providing autocompletion for available UnwrappingDenormali
{ "filepath": "src/Symfony/Component/Serializer/Context/Normalizer/UnwrappingDenormalizerContextBuilder.php", "language": "php", "file_size": 1724, "cut_index": 537, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Context\Encoder; use Symfony\Component\Serializer\Context\ContextBuilderInterface; use Symfony\Component\Serializer\Context\ContextBuilderTrait;...
* * Must be a single character. * * @throws InvalidArgumentException */ public function withDelimiter(?string $delimiter): static { if (null !== $delimiter && 1 !== \strlen($delimiter)) { throw new Inval
tions. * * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class CsvEncoderContextBuilder implements ContextBuilderInterface { use ContextBuilderTrait; /** * Configures the column delimiter character.
{ "filepath": "src/Symfony/Component/Serializer/Context/Encoder/CsvEncoderContextBuilder.php", "language": "php", "file_size": 3488, "cut_index": 614, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Zulip\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Bridge\Zulip...
unction testZulipOptionsWithNullValues() { $options = new ZulipOptions(); $this->assertSame([ 'topic' => null, 'recipient' => null, ], $options->toArray()); $this->assertNull($options->getRecipi
is->assertSame([ 'topic' => 'Test Topic', 'recipient' => 'user@example.com', ], $options->toArray()); $this->assertSame('user@example.com', $options->getRecipientId()); } public f
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipOptionsTest.php", "language": "php", "file_size": 2496, "cut_index": 563, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsc; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException...
nt\Exception\ExceptionInterface as HttpExceptionInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface as HttpTransportExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author Valentin Nazarov <i.
\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface as HttpDecodingExceptionInterface; use Symfony\Contracts\HttpClie
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsc/SmscTransport.php", "language": "php", "file_size": 3502, "cut_index": 614, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsc; use Symfony\Component\Notifier\Except...
row new UnsupportedSchemeException($dsn, 'smsc', $this->getSupportedSchemes()); } $login = $dsn->getUser(); $password = $dsn->getPassword(); $from = $dsn->getRequiredOption('from'); $host = 'default' === $dsn->getHo
tonmail.com> */ final class SmscTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): SmscTransport { $scheme = $dsn->getScheme(); if ('smsc' !== $scheme) { th
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsc/SmscTransportFactory.php", "language": "php", "file_size": 1245, "cut_index": 518, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsense; use Symfony\Component\Notifier\Exc...
Exception($dsn, 'smsense', $this->getSupportedSchemes()); } $host = 'default' === $dsn->getHost() ? null : $dsn->getHost(); $from = $dsn->getRequiredOption('from'); $authToken = $this->getUser($dsn); $port = $dsn->g
l.com> */ final class SmsenseTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): SmsenseTransport { if ('smsense' !== $dsn->getScheme()) { throw new UnsupportedScheme
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsense/SmsenseTransportFactory.php", "language": "php", "file_size": 1239, "cut_index": 518, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsense\Tests; use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\HttpCl...
; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; class SmsenseTransportTest extends TransportTestCase { public static function createTransport(?HttpClientInterface $client = null): Sm
\TransportException; use Symfony\Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportTest.php", "language": "php", "file_size": 3496, "cut_index": 614, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\SpotHit; use Symfony\Component\Notifier\Exception\UnsupportedS...
rtedSchemeException($dsn, 'spothit', $this->getSupportedSchemes()); } $token = $this->getUser($dsn); $from = $dsn->getOption('from'); $smsLong = filter_var($dsn->getOption('smslong', '-'), \FILTER_VALIDATE_BOOL, \FILTER_NUL
lass SpotHitTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): SpotHitTransport { $scheme = $dsn->getScheme(); if ('spothit' !== $scheme) { throw new Unsuppo
{ "filepath": "src/Symfony/Component/Notifier/Bridge/SpotHit/SpotHitTransportFactory.php", "language": "php", "file_size": 1529, "cut_index": 537, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\SpotHit\Tests; use Symfony\Component\Notifier\Bridge\SpotHit\S...
ateProvider(): iterable { yield [ 'spothit://spot-hit.fr', 'spothit://api_token@default', ]; yield [ 'spothit://spot-hit.fr?from=MyCompany', 'spothit://api_token@default?from=MyCom
st extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; public function createFactory(): SpotHitTransportFactory { return new SpotHitTransportFactory(); } public static function cre
{ "filepath": "src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportFactoryTest.php", "language": "php", "file_size": 1887, "cut_index": 537, "middle_length": 229 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsmode; use Symfony\Component\Notifier\...
{ $this->options['refClient'] = $refClient; return $this; } /** * @return $this */ public function sentDate(string $sentDate): static { $this->options['sentDate'] = $sentDate; return $this; }
private array $options = [], ) { } public function getRecipientId(): ?string { return null; } /** * @return $this */ public function refClient(string $refClient): static
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsmode/SmsmodeOptions.php", "language": "php", "file_size": 1084, "cut_index": 515, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsmode\Tests; use Symfony\Component\Notifier\Bridge\Smsmode\S...
deTransportFactory { return new SmsmodeTransportFactory(); } public static function createProvider(): iterable { yield ['smsmode://host.test?from=test', 'smsmode://ApiKey@host.test?from=test']; } public static func
ssingRequiredOptionTestTrait; final class SmsmodeTransportFactoryTest extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; use MissingRequiredOptionTestTrait; public function createFactory(): Smsmo
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsmode/Tests/SmsmodeTransportFactoryTest.php", "language": "php", "file_size": 1630, "cut_index": 537, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Test; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfon...
, 1: string}> */ abstract public static function supportsProvider(): iterable; /** * @return iterable<array{0: string, 1: string, 2: TransportInterface}> */ abstract public static function createProvider(): iterable; /**
nt\Notifier\Transport\TransportInterface; abstract class AbstractTransportFactoryTestCase extends TestCase { abstract public function createFactory(): TransportFactoryInterface; /** * @return iterable<array{0: bool
{ "filepath": "src/Symfony/Component/Notifier/Test/AbstractTransportFactoryTestCase.php", "language": "php", "file_size": 2283, "cut_index": 563, "middle_length": 229 }
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsmode\Tests; use PHPUnit\Framework\...
ons()) ->refClient('test_ref_client') ->sentDate('test_sent_date'); self::assertSame([ 'refClient' => 'test_ref_client', 'sentDate' => 'test_sent_date', ], $smsmodeOptions->toArray()); }
ew SmsmodeOpti
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsmode/Tests/SmsmodeOptionsTest.php", "language": "php", "file_size": 784, "cut_index": 512, "middle_length": 14 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Test; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Exception\UnsupportedMessageTy...
USTOM_PORT = 42; abstract public static function createTransport(?HttpClientInterface $client = null): TransportInterface; /** * @return iterable<array{0: string, 1: TransportInterface}> */ abstract public static function toStringPr
A test case to ease testing a Notifier transport. * * @author Oskar Stark <oskarstark@googlemail.com> */ abstract class TransportTestCase extends TestCase { protected const CUSTOM_HOST = 'host.test'; protected const C
{ "filepath": "src/Symfony/Component/Notifier/Test/TransportTestCase.php", "language": "php", "file_size": 3891, "cut_index": 614, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Sym...
, $this->transport ? $this->transport.' ' : '', $this->queued ? 'queued' : 'sent', $this->expectedValue); } /** * @param NotificationEvents $events */ protected function matches($events): bool { return $this->expectedValu
ruct( private int $expectedValue, private ?string $transport = null, private bool $queued = false, ) { } public function toString(): string { return \sprintf('%shas %s "%d" emails'
{ "filepath": "src/Symfony/Component/Notifier/Test/Constraint/NotificationCount.php", "language": "php", "file_size": 1738, "cut_index": 537, "middle_length": 229 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Test\Constraint; use PHPUnit\Framework\Constrai...
essageInterface $message */ protected function matches($message): bool { return false !== mb_strpos($message->getSubject(), $this->expectedText); } /** * @param MessageInterface $message */ protected function fai
nt { public function __construct( private string $expectedText, ) { } public function toString(): string { return \sprintf('contains "%s"', $this->expectedText); } /** * @param M
{ "filepath": "src/Symfony/Component/Notifier/Test/Constraint/NotificationSubjectContains.php", "language": "php", "file_size": 1111, "cut_index": 515, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Redlink; use Symfony\Component\Notifier\Message\MessageOptions...
ull; } /** * @return $this */ public function validity(int $validity): static { $this->options['validity'] = $validity; return $this; } /** * @return $this */ public function scheduleTime(i
ray $options = [], ) { } public function toArray(): array { return array_filter($this->options); } public function getRecipientId(): ?string { return $this->options['externalId'] ?? n
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Redlink/RedlinkOptions.php", "language": "php", "file_size": 1846, "cut_index": 537, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Zulip; use Symfony\Component\Notifier\Exception\U...
ew UnsupportedSchemeException($dsn, 'zulip', $this->getSupportedSchemes()); } $email = $this->getUser($dsn); $token = $this->getPassword($dsn); $channel = $dsn->getRequiredOption('channel'); $host = $dsn->getHost();
com> */ final class ZulipTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): ZulipTransport { $scheme = $dsn->getScheme(); if ('zulip' !== $scheme) { throw n
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransportFactory.php", "language": "php", "file_size": 1272, "cut_index": 524, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsapi; use Symfony\Component\Notifier\Exception\...
hrow new UnsupportedSchemeException($dsn, 'smsapi', $this->getSupportedSchemes()); } $authToken = $this->getUser($dsn); $from = $dsn->getOption('from', ''); $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
il.com> */ final class SmsapiTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): SmsapiTransport { $scheme = $dsn->getScheme(); if ('smsapi' !== $scheme) { t
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransportFactory.php", "language": "php", "file_size": 1392, "cut_index": 524, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Zulip\Tests; use Symfony\Component\HttpClient\Moc...
ic function createTransport(?HttpClientInterface $client = null): ZulipTransport { return (new ZulipTransport('testEmail', 'testToken', 'testChannel', $client ?? new MockHttpClient()))->setHost('test.host'); } public static function to
onent\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; final class ZulipTransportTest extends TransportTestCase { public stat
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipTransportTest.php", "language": "php", "file_size": 1425, "cut_index": 524, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsense\Tests; use Symfony\Component\Notifier\Bri...
ion createProvider(): iterable { yield [ 'smsense://host.test?from=Symfony', 'smsense://api_token@host.test?from=Symfony', ]; } public static function supportsProvider(): iterable { yield [tr
ctoryTest extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; public function createFactory(): SmsenseTransportFactory { return new SmsenseTransportFactory(); } public static funct
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportFactoryTest.php", "language": "php", "file_size": 1349, "cut_index": 524, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\SpotHit; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeExcept...
erface; use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; use Symfony\Contracts\HttpClient\Excep
ier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInt
{ "filepath": "src/Symfony/Component/Notifier/Bridge/SpotHit/SpotHitTransport.php", "language": "php", "file_size": 4287, "cut_index": 614, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsmode; use Symfony\Component\Notifier\Exception...
if (self::TRANSPORT_SCHEME !== $scheme) { throw new UnsupportedSchemeException($dsn, self::TRANSPORT_SCHEME, $this->getSupportedSchemes()); } $apiKey = $this->getUser($dsn); $from = $dsn->getRequiredOption('fro
o-org> */ final class SmsmodeTransportFactory extends AbstractTransportFactory { private const TRANSPORT_SCHEME = 'smsmode'; public function create(Dsn $dsn): SmsmodeTransport { $scheme = $dsn->getScheme();
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsmode/SmsmodeTransportFactory.php", "language": "php", "file_size": 1355, "cut_index": 524, "middle_length": 229 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Test; use PHPUnit\Framework\Attributes\DataProv...
estIncompleteDsnException(string $dsn, ?string $message = null) { $factory = $this->createFactory(); $dsn = new Dsn($dsn); $this->expectException(IncompleteDsnException::class); if (null !== $message) { $th
ring, 1?: string|null}> */ abstract public static function incompleteDsnProvider(): iterable; /** * @dataProvider incompleteDsnProvider */ #[DataProvider('incompleteDsnProvider')] public function t
{ "filepath": "src/Symfony/Component/Notifier/Test/IncompleteDsnTestTrait.php", "language": "php", "file_size": 1089, "cut_index": 515, "middle_length": 229 }
he Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Test\Constraint; use PHPUnit\Framework\Constraint\Constraint; use Symfony\Compo...
* @param MessageEvent $event */ protected function matches($event): bool { return $event->isQueued(); } /** * @param MessageEvent $event */ protected function failureDescription($event): string { ret
{ return 'is queued'; } /**
{ "filepath": "src/Symfony/Component/Notifier/Test/Constraint/NotificationIsQueued.php", "language": "php", "file_size": 907, "cut_index": 547, "middle_length": 52 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\TurboSms\Tests; use Symfony\Component\Notifier\Bridge\TurboSms...
urboSmsTransportFactory { return new TurboSmsTransportFactory(); } public static function createProvider(): iterable { yield [ 'turbosms://host.test?from=acme', 'turbosms://accountSid:authToken@host.
\MissingRequiredOptionTestTrait; final class TurboSmsTransportFactoryTest extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; use MissingRequiredOptionTestTrait; public function createFactory(): T
{ "filepath": "src/Symfony/Component/Notifier/Bridge/TurboSms/Tests/TurboSmsTransportFactoryTest.php", "language": "php", "file_size": 1900, "cut_index": 537, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsense; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Compon...
ny\Contracts\HttpClient\HttpClientInterface; /** * @author Valentin Barbu <jimiero@gmail.com> */ final class SmsenseTransport extends AbstractTransport { protected const HOST = 'rest.smsense.com'; public function __construct( #[\Sensiti
ier\Message\SmsMessage; use Symfony\Component\Notifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfo
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsense/SmsenseTransport.php", "language": "php", "file_size": 2922, "cut_index": 563, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsmode; use Symfony\Component\Notifier\Exception\InvalidArgumentException; use Symfony\Component\Notifier\Exception\TransportException; us...
rface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author gnito-org <https://github.com/gnito-org> */ final class SmsmodeTransport extends AbstractTransport { protected const HOST = 'rest.smsmode.com'; public function __constru
\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInte
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsmode/SmsmodeTransport.php", "language": "php", "file_size": 3522, "cut_index": 614, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Test; use PHPUnit\Framework\Attributes\DataProvide...
tionProvider')] public function testMissingRequiredOptionException(string $dsn, ?string $message = null) { $factory = $this->createFactory(); $dsn = new Dsn($dsn); $this->expectException(MissingRequiredOptionException::cla
e<array{0: string, 1?: string|null}> */ abstract public static function missingRequiredOptionProvider(): iterable; /** * @dataProvider missingRequiredOptionProvider */ #[DataProvider('missingRequiredOp
{ "filepath": "src/Symfony/Component/Notifier/Test/MissingRequiredOptionTestTrait.php", "language": "php", "file_size": 1145, "cut_index": 518, "middle_length": 229 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\RingCentral\Tests; use PHPUnit\Framework...
ry' => [ 'id' => 'test_country_id', 'isoCode' => 'test_country_iso_code', 'name' => 'test_country_name', 'uri' => 'test_country_uri', 'callingCode' => 'test_country_calling_cod
ngCentralOptions = (new RingCentralOptions()) ->country('test_country_id', 'test_country_iso_code', 'test_country_name', 'test_country_uri', 'test_country_calling_code'); self::assertSame([ 'count
{ "filepath": "src/Symfony/Component/Notifier/Bridge/RingCentral/Tests/RingCentralOptionsTest.php", "language": "php", "file_size": 1071, "cut_index": 515, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\SpotHit\Tests; use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\HttpCl...
estCase { public static function createTransport(?HttpClientInterface $client = null): SpotHitTransport { return (new SpotHitTransport('api_token', 'MyCompany', $client ?? new MockHttpClient()))->setHost('host.test'); } public stat
ssage; use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; final class SpotHitTransportTest extends TransportT
{ "filepath": "src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php", "language": "php", "file_size": 4432, "cut_index": 614, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Smsmode\Tests; use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\HttpCl...
port\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class SmsmodeTransportTest extends TransportTestCase { public static function createTransport(?HttpClientInterface $clie
on\InvalidArgumentException; use Symfony\Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Trans
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Smsmode/Tests/SmsmodeTransportTest.php", "language": "php", "file_size": 4307, "cut_index": 614, "middle_length": 229 }
* This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Attribute; use Symfony\Component\Serializer\Exception...
public function __construct( public readonly int $maxDepth, ) { if ($maxDepth <= 0) { throw new InvalidArgumentException(\sprintf('Parameter given to "%s" must be a positive integer.', static::class)); } } }
nt $maxDepth The maximum serialization depth */
{ "filepath": "src/Symfony/Component/Serializer/Attribute/MaxDepth.php", "language": "php", "file_size": 833, "cut_index": 523, "middle_length": 52 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\SerializerAwareInterface; use Symfony\Component\...
leInterface::class => true, ]; } public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { return $data->normalize($this->serializer, $format, $context)
rface { use ObjectToPopulateTrait; use SerializerAwareTrait; public function getSupportedTypes(?string $format): array { return [ NormalizableInterface::class => true, Denormalizab
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php", "language": "php", "file_size": 2278, "cut_index": 563, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\HttpFoundation\File\File; use Symfony\Component\Mime\MimeTypeGuesserInterface; use Symfony\Component\Mime\MimeTypes; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Seri...
rue, File::class => true, ]; private readonly ?MimeTypeGuesserInterface $mimeTypeGuesser; public function __construct(?MimeTypeGuesserInterface $mimeTypeGuesser = null) { if (!$mimeTypeGuesser && class_exists(MimeTypes::cl
n Dunglas <dunglas@gmail.com> */ final class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface { private const SUPPORTED_TYPES = [ \SplFileInfo::class => true, \SplFileObject::class => t
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php", "language": "php", "file_size": 5107, "cut_index": 716, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Exception\NotNormalizableValue...
T_KEY => '%rP%yY%mM%dDT%hH%iM%sS', ]; public function __construct(array $defaultContext = []) { $this->defaultContext = array_merge($this->defaultContext, $defaultContext); } public function getSupportedTypes(?string $format):
ier <jerome@prmntr.me> */ final class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterface { public const FORMAT_KEY = 'dateinterval_format'; private array $defaultContext = [ self::FORMA
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php", "language": "php", "file_size": 4434, "cut_index": 614, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Exception\NotNormalizableValueException; /** * Normalizes an object implementing the {@see \DateTimeInterface} to a date string. ...
tetime_force_timezone'; private array $defaultContext = [ self::FORMAT_KEY => \DateTimeInterface::RFC3339, self::TIMEZONE_KEY => null, self::CAST_KEY => null, self::FORCE_TIMEZONE_KEY => false, ]; private const
alizerInterface, DenormalizerInterface { public const FORMAT_KEY = 'datetime_format'; public const TIMEZONE_KEY = 'datetime_timezone'; public const CAST_KEY = 'datetime_cast'; public const FORCE_TIMEZONE_KEY = 'da
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php", "language": "php", "file_size": 7406, "cut_index": 716, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\...
} /** * @throws InvalidArgumentException */ public function normalize(mixed $data, ?string $format = null, array $context = []): string { if (!$data instanceof \DateTimeZone) { throw new InvalidArgumentException
nal class DateTimeZoneNormalizer implements NormalizerInterface, DenormalizerInterface { public function getSupportedTypes(?string $format): array { return [ \DateTimeZone::class => true, ];
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/DateTimeZoneNormalizer.php", "language": "php", "file_size": 2296, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; /** * Defines the most basic interface a class must im...
d denormalize * recursively all child objects of the implementer. * * @param DenormalizerInterface $denormalizer The denormalizer is given so that you * can use it to denormaliz
ordi Boggiano <j.boggiano@seld.be> */ interface DenormalizableInterface { /** * Denormalizes the object back from an array of scalars|arrays. * * It is important to understand that the denormalize() call shoul
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php", "language": "php", "file_size": 1631, "cut_index": 537, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\BadMethodCallException; use Symfony\Component\Serializer\Exception\ExceptionInterface; us...
* * Whether to collect all denormalization errors or to stop at first error. */ public const COLLECT_DENORMALIZATION_ERRORS = 'collect_denormalization_errors'; /** * Whether to collect all extra attributes errors or to stop at first
n; use Symfony\Component\Serializer\Exception\RuntimeException; use Symfony\Component\Serializer\Exception\UnexpectedValueException; /** * @author Jordi Boggiano <j.boggiano@seld.be> */ interface DenormalizerInterface { /*
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php", "language": "php", "file_size": 3852, "cut_index": 614, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Form\FormInterface; /** * Normalizes invalid Form instanc...
//symfony.com/errors/form', 'code' => $context[self::CODE] ?? null, 'errors' => $this->convertFormErrorsToArray($data), ]; if (0 !== \count($data->all())) { $error['children'] = $this->convertFormChildre
nction normalize(mixed $data, ?string $format = null, array $context = []): array { $error = [ 'title' => $context[self::TITLE] ?? 'Validation Failed', 'type' => $context[self::TYPE] ?? 'https:
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php", "language": "php", "file_size": 2290, "cut_index": 563, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\PropertyAccess\Exception\UninitializedPropertyException; use Symfony\Component\Serializer\Annotation\Ignore as LegacyIgnore; use Symfony\Component\Serializer\Attribute\Ignore; /** * Converts between objects wit...
onstructor of the given class to see * if any of the parameters have the same name as one of the properties. The * constructor is then called with all parameters or an exception is thrown if * any required parameters were not present as properties. Then
is a * map from property names (method name stripped of the get prefix and converted * to lower case) to property values. Property values are normalized through the * serializer. * * The denormalization first looks at the c
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php", "language": "php", "file_size": 8691, "cut_index": 716, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\...
data, $context)) { return $this->handleCircularReference($data, $format, $context); } if (!$data instanceof \JsonSerializable) { throw new InvalidArgumentException(\sprintf('The object must implement "%s".', \JsonSe
alizableNormalizer extends AbstractNormalizer { public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { if ($this->isCircularReference($
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php", "language": "php", "file_size": 2069, "cut_index": 563, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Mime\Address; use Symfony\Component\Mime\Header\HeaderInterface; use Symfony\Component\Mime\Header\Headers; us...
yNormalizer instance for normalization * of all data objects composing a Message. * * Emails using resources for any parts are not serializable. */ final class MimeMessageNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAware
nt\Serializer\Exception\LogicException; use Symfony\Component\Serializer\SerializerAwareInterface; use Symfony\Component\Serializer\SerializerInterface; /** * Normalize Mime message classes. * * It forces the use of a Propert
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php", "language": "php", "file_size": 4568, "cut_index": 614, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; /** * Defines the most basic interface a ...
ormalize * recursively all child objects of the implementer. * * @param NormalizerInterface $normalizer The normalizer is given so that you * can use it to normalize objects contained within this
author Jordi Boggiano <j.boggiano@seld.be> */ interface NormalizableInterface { /** * Normalizes the object into an array of scalars|arrays. * * It is important to understand that the normalize() call should n
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php", "language": "php", "file_size": 1461, "cut_index": 524, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\CircularReferenceException; use Symfon...
ull $format Format the normalization result will be encoded as * @param array<string, mixed> $context Context options for the normalizer * * @return mixed[]|string|int|float|bool|\ArrayObject<array-key, mixed>|null \ArrayObject is
thor Jordi Boggiano <j.boggiano@seld.be> */ interface NormalizerInterface { /** * Normalizes data into a set of arrays/scalars. * * @param mixed $data Data to normalize * @param string|n
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php", "language": "php", "file_size": 2953, "cut_index": 563, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use BcMath\Number; use Symfony\Component\Serializer\Exception\InvalidArgumentExce...
n normalize(mixed $data, ?string $format = null, array $context = []): string { if (!$data instanceof Number && !$data instanceof \GMP) { throw new InvalidArgumentException(\sprintf('The data must be an instance of "%s" or "%s".', N
lizerInterface, DenormalizerInterface { public function getSupportedTypes(?string $format): array { return [ Number::class => true, \GMP::class => true, ]; } public functio
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/NumberNormalizer.php", "language": "php", "file_size": 2911, "cut_index": 563, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException as PropertyAccessInvalidArgumentException; use Symfony\Component\PropertyAccess\Exception\InvalidTypeException; use Symfony\Component\PropertyAccess\Exception\NoS...
izer\Attribute\Ignore; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Exception\NotNormalizableValueException; use Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface; use Symfony\Component\
onExtractor; use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\PropertyInfo\PropertyWriteInfo; use Symfony\Component\Serial
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php", "language": "php", "file_size": 8593, "cut_index": 716, "middle_length": 229 }
?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; trait ObjectToPopulateTrait { ...
ToPopulate(string $class, array $context, ?string $key = null): ?object { $key ??= AbstractNormalizer::OBJECT_TO_POPULATE; if (isset($context[$key]) && \is_object($context[$key]) && $context[$key] instanceof $class) { retur
t should be * @param string|null $key They in which to look for the object to populate. * Keeps backwards compatibility with `AbstractNormalizer`. */ protected function extractObject
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/ObjectToPopulateTrait.php", "language": "php", "file_size": 1056, "cut_index": 513, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\ErrorHandler\Exception\FlattenException; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\Messenger\Exception\ValidationFailedException as MessageValidationFailedException;...
o the API Problem spec (RFC 7807). * * @see https://tools.ietf.org/html/rfc7807 * * @author Kévin Dunglas <dunglas@gmail.com> * @author Yonel Ceruto <yonelceruto@gmail.com> */ class ProblemNormalizer implements NormalizerInterface, SerializerAwareInt
reInterface; use Symfony\Component\Serializer\SerializerAwareTrait; use Symfony\Component\Validator\Exception\ValidationFailedException; use Symfony\Contracts\Translation\TranslatorInterface; /** * Normalizes errors according t
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/ProblemNormalizer.php", "language": "php", "file_size": 5464, "cut_index": 716, "middle_length": 229 }
rtyTypeExtractorInterface; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Exception\NotNormalizableValueException; use Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; us...
ass to see * if any of the parameters have the same name as one of the properties. The * constructor is then called with all parameters or an exception is thrown if * any required parameters were not present as properties. Then the denormalizer * walks
's properties (public and private). * The result is a map from property names to property values. Property values * are normalized through the serializer. * * The denormalization first looks at the constructor of the given cl
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php", "language": "php", "file_size": 9257, "cut_index": 921, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\InvalidArgum...
LE_KEY => null, ]; public function __construct( private readonly TranslatorInterface $translator, array $defaultContext = [], ) { $this->defaultContext = array_merge($this->defaultContext, $defaultContext); } /
erface; final class TranslatableNormalizer implements NormalizerInterface { public const NORMALIZATION_LOCALE_KEY = 'translatable_normalization_locale'; private array $defaultContext = [ self::NORMALIZATION_LOCA
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/TranslatableNormalizer.php", "language": "php", "file_size": 1896, "cut_index": 537, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Exception\NotNormalizableValueException;...
'rfc4122'; public const NORMALIZATION_FORMAT_RFC9562 = self::NORMALIZATION_FORMAT_RFC4122; // RFC 9562 obsoleted RFC 4122 but the format is the same public const NORMALIZATION_FORMATS = [ self::NORMALIZATION_FORMAT_CANONICAL, self:
'; public const NORMALIZATION_FORMAT_CANONICAL = 'canonical'; public const NORMALIZATION_FORMAT_BASE58 = 'base58'; public const NORMALIZATION_FORMAT_BASE32 = 'base32'; public const NORMALIZATION_FORMAT_RFC4122 =
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/UidNormalizer.php", "language": "php", "file_size": 3229, "cut_index": 614, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\PropertyAccess\PropertyAccess; use Symfony\Component\Proper...
TH = 'unwrap_path'; private readonly PropertyAccessorInterface $propertyAccessor; public function __construct(?PropertyAccessorInterface $propertyAccessor = null) { $this->propertyAccessor = $propertyAccessor ?? PropertyAccess::create
lizerAwareTrait; /** * @author Eduard Bulava <bulavaeduard@gmail.com> */ final class UnwrappingDenormalizer implements DenormalizerInterface, SerializerAwareInterface { use SerializerAwareTrait; public const UNWRAP_PA
{ "filepath": "src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php", "language": "php", "file_size": 2141, "cut_index": 563, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Command; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\...
command to debug Serializer information. * * @author Loïc Frémont <lc.fremont@gmail.com> */ #[AsCommand(name: 'debug:serializer', description: 'Display serialization information for classes')] class DebugCommand extends Command { public function __
OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Serializer\Mapping\ClassMetadataInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; /** * A console
{ "filepath": "src/Symfony/Component/Serializer/Command/DebugCommand.php", "language": "php", "file_size": 4113, "cut_index": 614, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Serializer\Tests; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor; use Symfony\Component\Serializer\Encoder\JsonEncoder; use Symfony\Component\Serializer\Normalizer\...
aProvider('provider')] public function testPropertyPhpDoc($class) { $json = <<<EOF { "animals": [ {"name": "Bug"} ] } EOF; $serializer = new Ser
public static function provider() { return [ // from property PhpDoc [Zoo::class], // from argument constructor PhpDoc [ZooImmutable::class], ]; } #[Dat
{ "filepath": "src/Symfony/Component/Serializer/Tests/DeserializeNestedArrayOfObjectsTest.php", "language": "php", "file_size": 6155, "cut_index": 716, "middle_length": 229 }
dChild; use Symfony\Component\Serializer\Tests\Fixtures\Attributes\GroupClassDummy; use Symfony\Component\Serializer\Tests\Fixtures\Attributes\SerializedNameAttributeDummy; use Symfony\Component\Serializer\Tests\Fixtures\DenormalizableDummy; use Symfony\Component\Serializer\Tests\Fixtures\DummyFirstChildQuux; use Symfo...
; use Symfony\Component\Serializer\Tests\Fixtures\DummyObjectWithEnumProperty; use Symfony\Component\Serializer\Tests\Fixtures\DummyWithObjectOrNull; use Symfony\Component\Serializer\Tests\Fixtures\DummyWithUnion; use Symfony\Component\Serializer\Tests\Fix
eNumberThree; use Symfony\Component\Serializer\Tests\Fixtures\DummyMessageNumberTwo; use Symfony\Component\Serializer\Tests\Fixtures\DummyNullableInt; use Symfony\Component\Serializer\Tests\Fixtures\DummyObjectWithEnumConstructor
{ "filepath": "src/Symfony/Component/Serializer/Tests/SerializerTest.php", "language": "php", "file_size": 87790, "cut_index": 3790, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Tests\Context; use PHPUnit\Framework\TestCase; use Sym...
textBuilder->withContext(['foo' => 'bar'])->toArray(); $this->assertSame(['foo' => 'bar'], $context); $withContextBuilderObject = $contextBuilder->withContext($contextBuilder->withContext(['foo' => 'bar']))->toArray(); $this->ass
textBuilderTraitTest extends TestCase { public function testWithContext() { $contextBuilder = new class implements ContextBuilderInterface { use ContextBuilderTrait; }; $context = $con
{ "filepath": "src/Symfony/Component/Serializer/Tests/Context/ContextBuilderTraitTest.php", "language": "php", "file_size": 1460, "cut_index": 524, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Tests\Context; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase;...
er = new SerializerContextBuilder(); } /** * @param array<string, mixed> $values */ #[DataProvider('withersDataProvider')] public function testWithers(array $values) { $context = $this->contextBuilder ->wi
hor Mathias Arlaud <mathias.arlaud@gmail.com> */ class SerializerContextBuilderTest extends TestCase { private SerializerContextBuilder $contextBuilder; protected function setUp(): void { $this->contextBuild
{ "filepath": "src/Symfony/Component/Serializer/Tests/Context/SerializerContextBuilderTest.php", "language": "php", "file_size": 2072, "cut_index": 563, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Tests\Context\Normalizer; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Serializer\Contex...
is->contextBuilder = new class extends AbstractNormalizerContextBuilder {}; } /** * @param array<string, mixed> $values */ #[DataProvider('withersDataProvider')] public function testWithers(array $values) { $context =
hor Mathias Arlaud <mathias.arlaud@gmail.com> */ class AbstractNormalizerContextBuilderTest extends TestCase { private AbstractNormalizerContextBuilder $contextBuilder; protected function setUp(): void { $th
{ "filepath": "src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractNormalizerContextBuilderTest.php", "language": "php", "file_size": 4042, "cut_index": 614, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Tests\Context\Normalizer; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Serializer\Contex...
: void { $this->contextBuilder = new class extends AbstractObjectNormalizerContextBuilder {}; } /** * @param array<string, mixed> $values */ #[DataProvider('withersDataProvider')] public function testWithers(array $va
/** * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ class AbstractObjectNormalizerContextBuilderTest extends TestCase { private AbstractObjectNormalizerContextBuilder $contextBuilder; protected function setUp()
{ "filepath": "src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractObjectNormalizerContextBuilderTest.php", "language": "php", "file_size": 4613, "cut_index": 614, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Tests\Context\Normalizer; use PHPUnit\Framework\...
public function testWithers() { $context = $this->contextBuilder->withAllowInvalidValues(true)->toArray(); self::assertSame([BackedEnumNormalizer::ALLOW_INVALID_VALUES => true], $context); $context = $this->contextBuilder->wit
ontextBuilderTest extends TestCase { private BackedEnumNormalizerContextBuilder $contextBuilder; protected function setUp(): void { $this->contextBuilder = new BackedEnumNormalizerContextBuilder(); }
{ "filepath": "src/Symfony/Component/Serializer/Tests/Context/Normalizer/BackedEnumNormalizerContextBuilderTest.php", "language": "php", "file_size": 1141, "cut_index": 518, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Tests\Context\Normalizer; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framewor...
d function setUp(): void { $this->contextBuilder = new ConstraintViolationListNormalizerContextBuilder(); } /** * @param array<string, mixed> $values */ #[DataProvider('withersDataProvider')] public function testWithe
/** * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ class ConstraintViolationListNormalizerContextBuilderTest extends TestCase { private ConstraintViolationListNormalizerContextBuilder $contextBuilder; protecte
{ "filepath": "src/Symfony/Component/Serializer/Tests/Context/Normalizer/ConstraintViolationListNormalizerContextBuilderTest.php", "language": "php", "file_size": 2497, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Tests\Context\Normalizer; use PHPUnit\Framework\Attributes\DataProv...
: void { $this->contextBuilder = new DateIntervalNormalizerContextBuilder(); } /** * @param array<string, mixed> $values */ #[DataProvider('withersDataProvider')] public function testWithers(array $values) {
er; /** * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ class DateIntervalNormalizerContextBuilderTest extends TestCase { private DateIntervalNormalizerContextBuilder $contextBuilder; protected function setUp()
{ "filepath": "src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateIntervalNormalizerContextBuilderTest.php", "language": "php", "file_size": 1566, "cut_index": 537, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Tests\Context\Normalizer; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framewor...
protected function setUp(): void { $this->contextBuilder = new DateTimeNormalizerContextBuilder(); } /** * @param array<string, mixed> $values */ #[DataProvider('withersDataProvider')] public function testWithers(arr
ializer\Normalizer\DateTimeNormalizer; /** * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ class DateTimeNormalizerContextBuilderTest extends TestCase { private DateTimeNormalizerContextBuilder $contextBuilder;
{ "filepath": "src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateTimeNormalizerContextBuilderTest.php", "language": "php", "file_size": 2625, "cut_index": 563, "middle_length": 229 }
ttpKernel\DataCollector\DataCollector; use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; use Symfony\Component\Serializer\Debug\TraceableSerializer; use Symfony\Component\VarDumper\Cloner\Data; /** * @author Mathias Arlaud <mathias.arlaud@gmail.com> * * @final */ class SerializerDataCollec...
et($this->dataGroupedByName); $this->collected = []; } public function collect(Request $request, Response $response, ?\Throwable $exception = null): void { // Everything is collected during the request, and formatted on kernel
'denormalize' => [], 'encode' => [], 'decode' => [], ]; private array $dataGroupedByName; private array $collected = []; public function reset(): void { $this->data = []; uns
{ "filepath": "src/Symfony/Component/Serializer/DataCollector/SerializerDataCollector.php", "language": "php", "file_size": 9324, "cut_index": 921, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Mapping; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; /**...
($this->classMetadataFactory->hasMetadataFor($class)) { return $this->classMetadataFactory->getMetadataFor($class)->getClassDiscriminatorMapping(); } return null; } public function getMappingForMappedObject(object|str
[]; public function __construct( private readonly ClassMetadataFactoryInterface $classMetadataFactory, ) { } public function getMappingForClass(string $class): ?ClassDiscriminatorMapping { if
{ "filepath": "src/Symfony/Component/Serializer/Mapping/ClassDiscriminatorFromClassMetadata.php", "language": "php", "file_size": 2666, "cut_index": 563, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Mapping; /** * @author Kévin Dunglas <dunglas@gmail.com> * * @final */ class ClassMetadat...
name = $class; $this->classDiscriminatorMapping = $classDiscriminatorMapping; } public function getName(): string { return $this->name; } public function addAttributeMetadata(AttributeMetadataInterface $attributeMetada
lass $reflClass = null; private ?ClassDiscriminatorMapping $classDiscriminatorMapping = null; public function __construct(string $class, ?ClassDiscriminatorMapping $classDiscriminatorMapping = null) { $this->
{ "filepath": "src/Symfony/Component/Serializer/Mapping/ClassMetadata.php", "language": "php", "file_size": 2430, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Mapping; /** * Stores metadata needed for serializing and deserial...
(): string; /** * Adds an {@link AttributeMetadataInterface}. */ public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata): void; /** * Gets the list of {@link AttributeMetadataInterface}. *
its name. * * @psalm-inheritors ClassMetadata * * @author Kévin Dunglas <dunglas@gmail.com> */ interface ClassMetadataInterface { /** * Returns the name of the backing PHP class. */ public function getName
{ "filepath": "src/Symfony/Component/Serializer/Mapping/ClassMetadataInterface.php", "language": "php", "file_size": 1594, "cut_index": 537, "middle_length": 229 }