Skip to content

Commit 0e563d2

Browse files
committed
Merge branch '2026.1' into 2026.x
2 parents 904d3a7 + 1e2fda3 commit 0e563d2

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/Class/Schema/ClassDefinition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function __construct(
7575
#[Property(description: 'Modification date timestamp', type: 'integer', example: 1700000000)]
7676
private readonly ?int $modificationDate,
7777
#[Property(description: 'User id of owner', type: 'integer', example: 1)]
78-
private readonly int $userOwner,
78+
private readonly ?int $userOwner,
7979
#[Property(
8080
description: 'Namespace of parent class',
8181
type: 'string',
@@ -175,7 +175,7 @@ public function getModificationDate(): ?int
175175
return $this->modificationDate;
176176
}
177177

178-
public function getUserOwner(): int
178+
public function getUserOwner(): ?int
179179
{
180180
return $this->userOwner;
181181
}

src/Class/Schema/CustomLayout/CustomLayout.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct(
5454
#[Property(description: 'Modification date timestamp', type: 'integer', example: 1633036800)]
5555
private readonly int $modificationDate,
5656
#[Property(description: 'User id of owner', type: 'integer', example: 1)]
57-
private readonly int $userOwner,
57+
private readonly ?int $userOwner,
5858
#[Property(description: 'Class id', type: 'string', example: 'Product')]
5959
private readonly string $classId,
6060
#[Property(description: 'Whether it is the default layout', type: 'boolean', example: false)]
@@ -94,7 +94,7 @@ public function getModificationDate(): int
9494
return $this->modificationDate;
9595
}
9696

97-
public function getUserOwner(): int
97+
public function getUserOwner(): ?int
9898
{
9999
return $this->userOwner;
100100
}

src/Document/Service/TranslationService.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidArgumentException;
2424
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException;
2525
use Pimcore\Bundle\StudioBackendBundle\Security\Service\SecurityServiceInterface;
26+
use Pimcore\Bundle\StudioBackendBundle\Util\Constant\HttpResponseErrorKeys;
2627
use Pimcore\Model\Document;
2728
use Pimcore\Model\Document\Service as DocumentService;
2829
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -164,7 +165,9 @@ private function validateDocumentLanguage(Document $document, string $type): voi
164165
'%s Document(ID: %s) has no Language property set.',
165166
ucfirst($type),
166167
$document->getId(),
167-
)
168+
),
169+
null,
170+
HttpResponseErrorKeys::DOCUMENT_LANGUAGE_NOT_SET->value
168171
);
169172
}
170173
}

src/Util/Constant/HttpResponseErrorKeys.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ enum HttpResponseErrorKeys: string
2020
use EnumToValueArrayTrait;
2121

2222
case GENERIC_ERROR = 'error_something_generic_went_wrong';
23+
case DOCUMENT_LANGUAGE_NOT_SET = 'error_document_language_not_set';
2324
case ELEMENT_EXISTS = 'error_element_exists';
2425
case ELEMENT_NOT_FOUND = 'error_element_not_found';
2526
case ELEMENT_VALIDATION_FAILED = 'error_element_validation_failed';

0 commit comments

Comments
 (0)