Skip to content

Commit

Permalink
Mark CombinedAddress as deprecated and remove it from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sprain committed Feb 12, 2025
1 parent 4c92046 commit 134b216
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
11 changes: 5 additions & 6 deletions example/example.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
// Add creditor information
// Who will receive the payment and to which bank account?
$qrBill->setCreditor(
QrBill\DataGroup\Element\CombinedAddress::create(
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
'Robert Schneider AG',
'Rue du Lac 1268',
'2501 Biel',
'Rue du Lac',
'1268',
'2501',
'Biel',
'CH'
)
);
Expand All @@ -35,9 +37,6 @@

// Add debtor information
// Who has to pay the invoice? This part is optional.
//
// Note how you can use two different styles of addresses: CombinedAddress or StructuredAddress.
// They are interchangeable for creditor as well as debtor.
$qrBill->setUltimateDebtor(
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
'Pia-Maria Rutschmann-Schnyder',
Expand Down
8 changes: 5 additions & 3 deletions example/example_minimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
// Add creditor information
// Who will receive the payment and to which bank account?
$qrBill->setCreditor(
QrBill\DataGroup\Element\CombinedAddress::create(
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
'Robert Schneider AG',
'Rue du Lac 1268',
'2501 Biel',
'Rue du Lac',
'1268',
'2501',
'Biel',
'CH'
)
);
Expand Down
11 changes: 5 additions & 6 deletions example/example_scor.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
// Add creditor information
// Who will receive the payment and to which bank account?
$qrBill->setCreditor(
QrBill\DataGroup\Element\CombinedAddress::create(
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
'Robert Schneider AG',
'Rue du Lac 1268',
'2501 Biel',
'Rue du Lac',
'1268',
'2501',
'Biel',
'CH'
)
);
Expand All @@ -28,9 +30,6 @@

// Add debtor information
// Who has to pay the invoice? This part is optional.
//
// Notice how you can use two different styles of addresses: CombinedAddress or StructuredAddress.
// They are interchangeable for creditor as well as debtor.
$qrBill->setUltimateDebtor(
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
'Pia-Maria Rutschmann-Schnyder',
Expand Down
8 changes: 5 additions & 3 deletions example/example_zero_amount.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

// Add creditor information
$qrBill->setCreditor(
QrBill\DataGroup\Element\CombinedAddress::create(
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
'Robert Schneider AG',
'Rue du Lac 1268',
'2501 Biel',
'Rue du Lac',
'1268',
'2501',
'Biel',
'CH'
)
);
Expand Down
5 changes: 5 additions & 0 deletions src/DataGroup/Element/CombinedAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Mapping\ClassMetadata;

/**
* @deprecated The CombinedAdress is no longer supported by v2.3 of the QR bill specifications, valid from 21 November 2025.
* This class will be removed in a future major version of this library. Use StructuredAddress instead.
* For UltimateDebtor, you can also choose to set no data at all.
*/
class CombinedAddress extends Address implements AddressInterface, SelfValidatableInterface, QrCodeableInterface
{
use SelfValidatableTrait;
Expand Down

0 comments on commit 134b216

Please sign in to comment.