From cd60b4376438e064eb0512782721c5c3b76244c7 Mon Sep 17 00:00:00 2001 From: dhqcz Date: Thu, 7 Sep 2023 13:07:29 +0200 Subject: [PATCH] =?UTF-8?q?ODZIdent=20mu=C5=BEe=20b=C3=BDt=20null,=20uv?= =?UTF-8?q?=C3=A1d=C4=9Bn=20je=20pouze=20u=20typu=20"O",=20tj.=20u=20odpov?= =?UTF-8?q?=C4=9Bdn=C3=ADch=20PDZ=20+=20oprava=20parsov=C3=A1n=C3=AD,=20kd?= =?UTF-8?q?y=20pole=20PDZRecord=20bylo=20jinak=20v=C5=BEdy=20pr=C3=A1zdn?= =?UTF-8?q?=C3=A9=20(#19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: horak --- src/DTO/PDZRecord.php | 8 ++++---- src/DTO/Response/PDZInfo.php | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/DTO/PDZRecord.php b/src/DTO/PDZRecord.php index a6786f7..6b3e5f7 100644 --- a/src/DTO/PDZRecord.php +++ b/src/DTO/PDZRecord.php @@ -45,8 +45,8 @@ class PDZRecord #[Serializer\Type('string')] #[Serializer\SerializedName('p:ODZIdent')] #[Serializer\XmlElement(cdata: false)] - #[Assert\NotBlank(allowNull: false)] - protected string $ident; + #[Assert\NotBlank(allowNull: true)] + protected ?string $ident; public function getType(): string { @@ -103,12 +103,12 @@ public function setCount(?int $count): PDZRecord return $this; } - public function getIdent(): string + public function getIdent(): ?string { return $this->ident; } - public function setIdent(string $ident): PDZRecord + public function setIdent(?string $ident): PDZRecord { $this->ident = $ident; return $this; diff --git a/src/DTO/Response/PDZInfo.php b/src/DTO/Response/PDZInfo.php index 3acbebc..1f09713 100644 --- a/src/DTO/Response/PDZInfo.php +++ b/src/DTO/Response/PDZInfo.php @@ -19,8 +19,9 @@ class PDZInfo extends IResponse * @var PDZRecord[] */ #[Serializer\Type('array')] - #[Serializer\XmlList(entry: 'dbPDZRecord', inline: false)] - #[Serializer\SerializedName('p:dbPDZRecords')] + #[Serializer\XmlList(entry: 'dbPDZRecord', inline: false, namespace: 'http://isds.czechpoint.cz/v20')] + #[Serializer\SerializedName('dbPDZRecords')] + #[Serializer\XmlElement(cdata: false, namespace: 'http://isds.czechpoint.cz/v20')] #[Assert\All([ new Assert\Type(type: PDZRecord::class) ])]