Skip to content

Commit d1a9806

Browse files
authored
Merge pull request #278 from sprain/deprecate-combined-address
Deprecate combined address
2 parents bf317d5 + 134b216 commit d1a9806

File tree

8 files changed

+26
-19
lines changed

8 files changed

+26
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ approximately 10% of current installations of the corresponding dependency.
8181
## Official resources
8282
The repository contains the official specifications the library is based on:
8383

84-
- [Swiss Implementation Guidelines QR-bill](docs/specs/ig-qr-bill-en-v2.2.pdf)
84+
- [Swiss Implementation Guidelines QR-bill](docs/specs/ig-qr-bill-v2.3-en.pdf)
8585
- [Technical information about the QR-IID and QR-IBAN](docs/specs/qr-iid_qr-iban-en.pdf)
8686
- [Style Guide QR-bill](docs/specs/style-guide-en.pdf)
8787
- [Validation Tool](https://validation.iso-payments.ch/gp/qrrechnung/validation/)
266 KB
Binary file not shown.

docs/specs/ig-qr-bill-v2.3-en.pdf

2.49 MB
Binary file not shown.

example/example.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
// Add creditor information
2020
// Who will receive the payment and to which bank account?
2121
$qrBill->setCreditor(
22-
QrBill\DataGroup\Element\CombinedAddress::create(
22+
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
2323
'Robert Schneider AG',
24-
'Rue du Lac 1268',
25-
'2501 Biel',
24+
'Rue du Lac',
25+
'1268',
26+
'2501',
27+
'Biel',
2628
'CH'
2729
)
2830
);
@@ -35,9 +37,6 @@
3537

3638
// Add debtor information
3739
// Who has to pay the invoice? This part is optional.
38-
//
39-
// Note how you can use two different styles of addresses: CombinedAddress or StructuredAddress.
40-
// They are interchangeable for creditor as well as debtor.
4140
$qrBill->setUltimateDebtor(
4241
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
4342
'Pia-Maria Rutschmann-Schnyder',

example/example_minimal.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
// Add creditor information
1616
// Who will receive the payment and to which bank account?
1717
$qrBill->setCreditor(
18-
QrBill\DataGroup\Element\CombinedAddress::create(
18+
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
1919
'Robert Schneider AG',
20-
'Rue du Lac 1268',
21-
'2501 Biel',
20+
'Rue du Lac',
21+
'1268',
22+
'2501',
23+
'Biel',
2224
'CH'
2325
)
2426
);

example/example_scor.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
// Add creditor information
1313
// Who will receive the payment and to which bank account?
1414
$qrBill->setCreditor(
15-
QrBill\DataGroup\Element\CombinedAddress::create(
15+
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
1616
'Robert Schneider AG',
17-
'Rue du Lac 1268',
18-
'2501 Biel',
17+
'Rue du Lac',
18+
'1268',
19+
'2501',
20+
'Biel',
1921
'CH'
2022
)
2123
);
@@ -28,9 +30,6 @@
2830

2931
// Add debtor information
3032
// Who has to pay the invoice? This part is optional.
31-
//
32-
// Notice how you can use two different styles of addresses: CombinedAddress or StructuredAddress.
33-
// They are interchangeable for creditor as well as debtor.
3433
$qrBill->setUltimateDebtor(
3534
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
3635
'Pia-Maria Rutschmann-Schnyder',

example/example_zero_amount.php

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

1717
// Add creditor information
1818
$qrBill->setCreditor(
19-
QrBill\DataGroup\Element\CombinedAddress::create(
19+
QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
2020
'Robert Schneider AG',
21-
'Rue du Lac 1268',
22-
'2501 Biel',
21+
'Rue du Lac',
22+
'1268',
23+
'2501',
24+
'Biel',
2325
'CH'
2426
)
2527
);

src/DataGroup/Element/CombinedAddress.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
use Symfony\Component\Validator\Constraints as Assert;
1111
use Symfony\Component\Validator\Mapping\ClassMetadata;
1212

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

0 commit comments

Comments
 (0)