Skip to content

Commit d7602d3

Browse files
committed
[BUGFIX] Extbase DataMapFactory cannot handle Interfaces for properties
1 parent 9f655d4 commit d7602d3

7 files changed

Lines changed: 32 additions & 32 deletions

File tree

Classes/Domain/Model/Order/AbstractService.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ abstract class AbstractService extends AbstractEntity
2323

2424
protected string $serviceCountry = '';
2525

26-
#[Validate(['validator' => 'NotEmpty'])]
26+
#[Validate(validator: 'NotEmpty')]
2727
protected int $serviceId;
2828

29-
#[Validate(['validator' => 'NotEmpty'])]
29+
#[Validate(validator: 'NotEmpty')]
3030
protected string $name = '';
3131

32-
#[Validate(['validator' => 'NotEmpty'])]
32+
#[Validate(validator: 'NotEmpty')]
3333
protected string $status = 'open';
3434

3535
protected float $net = 0.0;
@@ -38,7 +38,7 @@ abstract class AbstractService extends AbstractEntity
3838

3939
protected ?TaxClass $taxClass = null;
4040

41-
#[Validate(['validator' => 'NotEmpty'])]
41+
#[Validate(validator: 'NotEmpty')]
4242
protected float $tax = 0.0;
4343

4444
protected string $note = '';

Classes/Domain/Model/Order/Discount.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ class Discount extends AbstractEntity
2323
protected LazyLoadingProxy|Item $item;
2424

2525
public function __construct(
26-
#[Validate(['validator' => 'NotEmpty'])]
26+
#[Validate(validator: 'NotEmpty')]
2727
protected string $title,
28-
#[Validate(['validator' => 'NotEmpty'])]
28+
#[Validate(validator: 'NotEmpty')]
2929
protected string $code,
30-
#[Validate(['validator' => 'NotEmpty'])]
30+
#[Validate(validator: 'NotEmpty')]
3131
protected float $gross,
32-
#[Validate(['validator' => 'NotEmpty'])]
32+
#[Validate(validator: 'NotEmpty')]
3333
protected float $net,
34-
#[Validate(['validator' => 'NotEmpty'])]
34+
#[Validate(validator: 'NotEmpty')]
3535
protected TaxClass $taxClass,
36-
#[Validate(['validator' => 'NotEmpty'])]
36+
#[Validate(validator: 'NotEmpty')]
3737
protected float $tax
3838
) {}
3939

Classes/Domain/Model/Order/Item.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class Item extends AbstractEntity
3838

3939
protected bool $shippingSameAsBilling = false;
4040

41-
protected ?AddressInterface $billingAddress = null;
41+
protected ?BillingAddress $billingAddress = null;
4242

43-
protected ?AddressInterface $shippingAddress = null;
43+
protected ?ShippingAddress $shippingAddress = null;
4444

4545
protected string $additionalData = '';
4646

@@ -259,22 +259,22 @@ public function setShippingSameAsBilling(bool $shippingSameAsBilling): void
259259
$this->shippingSameAsBilling = $shippingSameAsBilling;
260260
}
261261

262-
public function getBillingAddress(): ?AddressInterface
262+
public function getBillingAddress(): ?BillingAddress
263263
{
264264
return $this->billingAddress;
265265
}
266266

267-
public function setBillingAddress(AddressInterface $billingAddress): void
267+
public function setBillingAddress(BillingAddress $billingAddress): void
268268
{
269269
$this->billingAddress = $billingAddress;
270270
}
271271

272-
public function getShippingAddress(): ?AddressInterface
272+
public function getShippingAddress(): ?ShippingAddress
273273
{
274274
return $this->shippingAddress;
275275
}
276276

277-
public function setShippingAddress(AddressInterface $shippingAddress): void
277+
public function setShippingAddress(ShippingAddress $shippingAddress): void
278278
{
279279
$this->shippingAddress = $shippingAddress;
280280
}

Classes/Domain/Model/Order/Product.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,31 @@ class Product extends AbstractEntity
2626

2727
protected string $productType = '';
2828

29-
#[Validate(['validator' => 'NotEmpty'])]
29+
#[Validate(validator: 'NotEmpty')]
3030
protected string $sku = '';
3131

32-
#[Validate(['validator' => 'NotEmpty'])]
32+
#[Validate(validator: 'NotEmpty')]
3333
protected string $title = '';
3434

35-
#[Validate(['validator' => 'NotEmpty'])]
35+
#[Validate(validator: 'NotEmpty')]
3636
protected int $count = 0;
3737

38-
#[Validate(['validator' => 'NotEmpty'])]
38+
#[Validate(validator: 'NotEmpty')]
3939
protected float $price = 0.0;
4040

41-
#[Validate(['validator' => 'NotEmpty'])]
41+
#[Validate(validator: 'NotEmpty')]
4242
protected float $discount = 0.0;
4343

44-
#[Validate(['validator' => 'NotEmpty'])]
44+
#[Validate(validator: 'NotEmpty')]
4545
protected float $gross = 0.0;
4646

47-
#[Validate(['validator' => 'NotEmpty'])]
47+
#[Validate(validator: 'NotEmpty')]
4848
protected float $net = 0.0;
4949

50-
#[Validate(['validator' => 'NotEmpty'])]
50+
#[Validate(validator: 'NotEmpty')]
5151
protected TaxClass $taxClass;
5252

53-
#[Validate(['validator' => 'NotEmpty'])]
53+
#[Validate(validator: 'NotEmpty')]
5454
protected float $tax = 0.0;
5555

5656
protected string $additionalData = '';

Classes/Domain/Model/Order/Tax.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
class Tax extends AbstractEntity
1818
{
1919
public function __construct(
20-
#[Validate(['validator' => 'NotEmpty'])]
20+
#[Validate(validator: 'NotEmpty')]
2121
protected float $tax,
22-
#[Validate(['validator' => 'NotEmpty'])]
22+
#[Validate(validator: 'NotEmpty')]
2323
protected TaxClass $taxClass
2424
) {}
2525

Classes/Domain/Model/Order/TaxClass.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
class TaxClass extends AbstractEntity
1818
{
19-
#[Validate(['validator' => 'NotEmpty'])]
19+
#[Validate(validator: 'NotEmpty')]
2020
protected string $title = '';
2121

22-
#[Validate(['validator' => 'NotEmpty'])]
22+
#[Validate(validator: 'NotEmpty')]
2323
protected string $value = '';
2424

25-
#[Validate(['validator' => 'NotEmpty'])]
25+
#[Validate(validator: 'NotEmpty')]
2626
protected float $calc = 0.0;
2727

2828
public function toArray(): array

Classes/Domain/Model/Product/AbstractProduct.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
abstract class AbstractProduct extends AbstractEntity
1717
{
18-
#[Validate(['validator' => 'NotEmpty'])]
18+
#[Validate(validator: 'NotEmpty')]
1919
protected string $sku = '';
2020

21-
#[Validate(['validator' => 'NotEmpty'])]
21+
#[Validate(validator: 'NotEmpty')]
2222
protected string $title = '';
2323

2424
protected string $teaser = '';

0 commit comments

Comments
 (0)