Skip to content

Commit 19a20a7

Browse files
committed
Added Logger.
1 parent 9fed295 commit 19a20a7

47 files changed

Lines changed: 824 additions & 308 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,16 @@ Pass `$fake = true` or `$debug = true` to `setupClient*()` to use `FakerHttpClie
143143
## Notable Implementation Details
144144

145145
- Classes marked `@internal` may change without notice.
146+
147+
## Zero-Dependency Policy
148+
149+
**The library must have zero external production dependencies.** This is a core design principle. Only PHP extensions are allowed in `require`.
150+
151+
- `composer.json` `require` section may only contain `php ^8.5` and `ext-*` entries.
152+
- When a PSR interface is needed (e.g. PSR-3 Logger), copy it into `src/Contracts/`.
153+
- PSR-18 HTTP client: the library uses its own `HttpClientInterface` in `src/Contracts/` (not PSR-18).
154+
- PSR-3 Logger: `LoggerInterface` is defined in `src/Contracts/LoggerInterface.php`.
155+
156+
## Logging
157+
158+
The `EbicsClient` uses `LoggerInterface` (PSR-3 compatible) for logging transaction steps, HTTP requests, errors, and other important events.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 3.1
22

3+
* Added Logger.
34
* Safety & Stability & Documentation improvements.
45

56
## 3.0

src/Builders/Request/BodyBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
*/
1717
abstract class BodyBuilder extends XmlBuilder
1818
{
19-
protected ZipService $zipService;
20-
protected CryptService $cryptService;
19+
protected readonly ZipService $zipService;
20+
protected readonly CryptService $cryptService;
2121
protected DOMElement $instance;
2222

2323
public function __construct(ZipService $zipService, CryptService $cryptService, DOMDocument $dom)

src/Builders/Request/DataEncryptionInfoBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
final class DataEncryptionInfoBuilder extends XmlBuilder
1818
{
1919
private DOMElement $instance;
20-
private CryptService $cryptService;
20+
private readonly CryptService $cryptService;
2121

2222
public function __construct(CryptService $cryptService, DOMDocument $dom)
2323
{

src/Builders/Request/DataTransferBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
abstract class DataTransferBuilder extends XmlBuilder
1919
{
2020
protected DOMElement $instance;
21-
protected ZipService $zipService;
22-
protected CryptService $cryptService;
21+
protected readonly ZipService $zipService;
22+
protected readonly CryptService $cryptService;
2323

2424
public function __construct(ZipService $zipService, CryptService $cryptService, DOMDocument $dom)
2525
{

src/Builders/Request/HeaderBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
abstract class HeaderBuilder extends XmlBuilder
1717
{
18-
protected CryptService $cryptService;
18+
protected readonly CryptService $cryptService;
1919
protected DOMElement $instance;
2020

2121
public function __construct(CryptService $cryptService, DOMDocument $dom)

src/Builders/Request/RequestBuilder.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@
1515
*/
1616
final class RequestBuilder
1717
{
18-
private AuthSignatureHandler $authSignatureHandler;
1918
private ?Request $instance;
2019
private RootBuilder $rootBuilder;
21-
private SchemaValidator $validator;
2220

23-
public function __construct(AuthSignatureHandler $authSignatureHandler, SchemaValidator $validator)
24-
{
25-
$this->authSignatureHandler = $authSignatureHandler;
26-
$this->validator = $validator;
21+
public function __construct(
22+
private readonly AuthSignatureHandler $authSignatureHandler,
23+
private readonly SchemaValidator $validator
24+
) {
2725
}
2826

2927
public function createInstance(Closure $callback): RequestBuilder

src/Builders/Request/RootBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ abstract class RootBuilder extends XmlBuilder
3030
self::EBICS_HEV => false,
3131
];
3232

33-
protected ZipService $zipService;
34-
protected CryptService $cryptService;
33+
protected readonly ZipService $zipService;
34+
protected readonly CryptService $cryptService;
3535
protected DOMElement $instance;
3636

3737
public function __construct(

src/Builders/Request/StaticBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class StaticBuilder extends XmlBuilder
2020
const SECURITY_MEDIUM_0200 = '0200';
2121

2222
protected DOMElement $instance;
23-
protected CryptService $cryptService;
23+
protected readonly CryptService $cryptService;
2424

2525
public function __construct(CryptService $cryptService, DOMDocument $dom)
2626
{

src/Builders/Request/XmlBuilder.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313
*/
1414
abstract class XmlBuilder
1515
{
16-
protected DOMDocument $dom;
17-
18-
public function __construct(DOMDocument $dom)
16+
public function __construct(protected readonly DOMDocument $dom)
1917
{
20-
$this->dom = $dom;
2118
}
2219

2320
/**

0 commit comments

Comments
 (0)