Skip to content

C14N options - #29

Open
miguelfrmn wants to merge 4 commits into
selective-php:masterfrom
kodens-dev:master
Open

C14N options#29
miguelfrmn wants to merge 4 commits into
selective-php:masterfrom
kodens-dev:master

Conversation

@miguelfrmn

@miguelfrmn miguelfrmn commented May 3, 2025

Copy link
Copy Markdown

I'm implementing this library for the upcoming official electronic invoicing system required by the Dominican Republic's IRS (DGII).

For that use case, some parameters need to be set (related to C14N and preserving whitespaces). This pull request adds the option to specifying those parameters.

@odan

odan commented May 5, 2025

Copy link
Copy Markdown
Member

Thanks for the PR.

Please check the test results: https://github.com/selective-php/xmldsig/actions/runs/14814040829/job/41639555159?pr=29

@odan

odan commented May 18, 2025

Copy link
Copy Markdown
Member

Please check for the latest build result. Note: Locally you can also run "composer stan" or "composer test:all" to see the results.

@miguelfrmn

Copy link
Copy Markdown
Author

Did you check it out?

@odan

odan commented Jul 17, 2025

Copy link
Copy Markdown
Member

I will check today.

Comment thread src/XmlSigner.php
}

$canonicalData = $element->C14N(true, false);
$canonicalData = $element->C14N($this->exclusive, false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the use case for this?

Comment thread src/XmlSigner.php

public function __construct(
CryptoSignerInterface $cryptoSigner,
bool $preserveWhiteSpace = true,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer having immutable with* Methods for these new parameters.
e.g. withPreserveWhiteSpace() and withExclusive()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants