From ccbffbe414848adbbddf947f00f9ce8d1eaa964d Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:09:58 -0300 Subject: [PATCH 01/25] fix: align composer metadata with local path development Signed-off-by: Vitor Mattos --- composer.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9f911e8..935dc82 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "phpunit/phpunit": "^11.0", "donatj/mock-webserver": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", - "vimeo/psalm": "^5.0" + "vimeo/psalm": "^6.0" }, "autoload": { "psr-4": { @@ -53,6 +53,11 @@ }, "minimum-stability": "stable", "prefer-stable": true, + "extra": { + "branch-alias": { + "dev-main": "1.0.x-dev" + } + }, "config": { "sort-packages": true, "allow-plugins": { From bd9a06fe5ff179c430484796baf91787e26f5deb Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:09:58 -0300 Subject: [PATCH 02/25] test: remove coverage config from default phpunit run Signed-off-by: Vitor Mattos --- phpunit.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 2576257..15b32ef 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -25,13 +25,6 @@ - - - - - - - From 8205ea5d97c42c1cb157ac807c6f365be5cb6c0c Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:09:58 -0300 Subject: [PATCH 03/25] fix: remove duplicate mount property declaration Signed-off-by: Vitor Mattos --- src/SecretStore/OpenBaoSecretStore.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SecretStore/OpenBaoSecretStore.php b/src/SecretStore/OpenBaoSecretStore.php index 357ea3b..09dd7d5 100644 --- a/src/SecretStore/OpenBaoSecretStore.php +++ b/src/SecretStore/OpenBaoSecretStore.php @@ -25,7 +25,6 @@ class OpenBaoSecretStore implements SecretStoreInterface { private readonly Client $vault; - private readonly string $mount; public function __construct( private readonly string $addr, From fba720291b0062ba02a5f634759cb6122f8688d3 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:09:58 -0300 Subject: [PATCH 04/25] fix: append tribMun node correctly in DPS xml Signed-off-by: Vitor Mattos --- src/Xml/XmlBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xml/XmlBuilder.php b/src/Xml/XmlBuilder.php index 8afe413..2404cfd 100644 --- a/src/Xml/XmlBuilder.php +++ b/src/Xml/XmlBuilder.php @@ -56,7 +56,7 @@ public function buildDps(DpsData $dps): string // Values $valores = $doc->createElement('valores'); $valores->appendChild($doc->createElement('vServ', $dps->valorServico)); - $valores->appendChild($doc->createElement('trib', $this->buildTrib($doc, $dps))); + $valores->appendChild($this->buildTrib($doc, $dps)); $infDps->appendChild($valores); return $doc->saveXML() ?: ''; From 23776f60ba835dafa345493da265bed8e227dc2d Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:09:58 -0300 Subject: [PATCH 05/25] test: stub xml signer in NfseClient unit test Signed-off-by: Vitor Mattos --- tests/Unit/Http/NfseClientTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/Unit/Http/NfseClientTest.php b/tests/Unit/Http/NfseClientTest.php index 40d2456..5675cb4 100644 --- a/tests/Unit/Http/NfseClientTest.php +++ b/tests/Unit/Http/NfseClientTest.php @@ -9,6 +9,7 @@ use donatj\MockWebServer\MockWebServer; use donatj\MockWebServer\Response; +use LibreCodeCoop\NfsePHP\Contracts\XmlSignerInterface; use LibreCodeCoop\NfsePHP\Dto\DpsData; use LibreCodeCoop\NfsePHP\Http\NfseClient; use LibreCodeCoop\NfsePHP\SecretStore\NoOpSecretStore; @@ -22,6 +23,7 @@ class NfseClientTest extends TestCase { private static MockWebServer $server; + private XmlSignerInterface $signer; public static function setUpBeforeClass(): void { @@ -34,6 +36,18 @@ public static function tearDownAfterClass(): void self::$server->stop(); } + protected function setUp(): void + { + parent::setUp(); + + $this->signer = new class() implements XmlSignerInterface { + public function sign(string $xml, string $cnpj): string + { + return $xml; + } + }; + } + public function testEmitReturnsReceiptDataOnSuccess(): void { $payload = json_encode([ @@ -52,6 +66,7 @@ public function testEmitReturnsReceiptDataOnSuccess(): void secretStore: $store, sandboxMode: false, baseUrlOverride: self::$server->getServerRoot() . '/NFS-e/api/v1', + signer: $this->signer, ); $dps = $this->makeDps(); From f407143cc37a8f9bfd31b73cebcd892386625572 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:15:55 -0300 Subject: [PATCH 06/25] ci: update reuse action Signed-off-by: Vitor Mattos --- .github/workflows/reuse.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index e3c5c88..1c92ee5 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -18,4 +18,4 @@ jobs: persist-credentials: false - name: REUSE Compliance Check - uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275498eed5f9d4 # v5.0.0 + uses: fsfe/reuse-action@v6 From bf3e16529def9225983a6c4907e633a35f3b93cc Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:09 -0300 Subject: [PATCH 07/25] ci: relax public api psalm rules Signed-off-by: Vitor Mattos --- psalm.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/psalm.xml b/psalm.xml index e803399..ffb7f9a 100644 --- a/psalm.xml +++ b/psalm.xml @@ -15,4 +15,11 @@ + + + + + + + From a66f48f006b4371490606ebd541215cb55e7d374 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:10 -0300 Subject: [PATCH 08/25] style: format dps data dto Signed-off-by: Vitor Mattos --- src/Dto/DpsData.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dto/DpsData.php b/src/Dto/DpsData.php index 566381f..ba64c79 100644 --- a/src/Dto/DpsData.php +++ b/src/Dto/DpsData.php @@ -44,5 +44,6 @@ public function __construct( /** Whether ISS is retained at source. */ public bool $issRetido = false, - ) {} + ) { + } } From a61d5c755a3b3fce166b39a45d3205f21f01b784 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:10 -0300 Subject: [PATCH 09/25] style: format receipt data dto Signed-off-by: Vitor Mattos --- src/Dto/ReceiptData.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dto/ReceiptData.php b/src/Dto/ReceiptData.php index bf204ff..b3a42c3 100644 --- a/src/Dto/ReceiptData.php +++ b/src/Dto/ReceiptData.php @@ -27,5 +27,6 @@ public function __construct( /** Raw XML returned by the gateway (useful for storage / audit). */ public ?string $rawXml = null, - ) {} + ) { + } } From aa30fe82dee89625e84bb464a38b495543643699 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:10 -0300 Subject: [PATCH 10/25] style: format nfse exception Signed-off-by: Vitor Mattos --- src/Exception/NfseException.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Exception/NfseException.php b/src/Exception/NfseException.php index 0e06bd6..ccce922 100644 --- a/src/Exception/NfseException.php +++ b/src/Exception/NfseException.php @@ -9,4 +9,6 @@ use RuntimeException; -class NfseException extends RuntimeException {} +class NfseException extends RuntimeException +{ +} From 3327abc558bb722da4e401800a3318cc994d22b7 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:10 -0300 Subject: [PATCH 11/25] style: format pfx import exception Signed-off-by: Vitor Mattos --- src/Exception/PfxImportException.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Exception/PfxImportException.php b/src/Exception/PfxImportException.php index 38481f9..2fa2c0f 100644 --- a/src/Exception/PfxImportException.php +++ b/src/Exception/PfxImportException.php @@ -7,4 +7,6 @@ namespace LibreCodeCoop\NfsePHP\Exception; -class PfxImportException extends NfseException {} +class PfxImportException extends NfseException +{ +} From 53c9366632412e2148c30b55cda1437e0855d96b Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:10 -0300 Subject: [PATCH 12/25] style: format secret store exception Signed-off-by: Vitor Mattos --- src/Exception/SecretStoreException.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Exception/SecretStoreException.php b/src/Exception/SecretStoreException.php index 67a5703..1570b4a 100644 --- a/src/Exception/SecretStoreException.php +++ b/src/Exception/SecretStoreException.php @@ -7,4 +7,6 @@ namespace LibreCodeCoop\NfsePHP\Exception; -class SecretStoreException extends NfseException {} +class SecretStoreException extends NfseException +{ +} From 36eebcf27b1c57e8989c67080eed4320dfac9f5b Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:11 -0300 Subject: [PATCH 13/25] fix: build vault client with psr dependencies Signed-off-by: Vitor Mattos --- src/SecretStore/OpenBaoSecretStore.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/SecretStore/OpenBaoSecretStore.php b/src/SecretStore/OpenBaoSecretStore.php index 09dd7d5..c8fdddd 100644 --- a/src/SecretStore/OpenBaoSecretStore.php +++ b/src/SecretStore/OpenBaoSecretStore.php @@ -7,11 +7,14 @@ namespace LibreCodeCoop\NfsePHP\SecretStore; +use GuzzleHttp\Client as HttpClient; +use GuzzleHttp\Psr7\HttpFactory; +use GuzzleHttp\Psr7\Uri; use LibreCodeCoop\NfsePHP\Contracts\SecretStoreInterface; use LibreCodeCoop\NfsePHP\Exception\SecretStoreException; -use Vault\Client; use Vault\AuthenticationStrategies\AppRoleAuthenticationStrategy; use Vault\AuthenticationStrategies\TokenAuthenticationStrategy; +use Vault\Client; /** * OpenBao / HashiCorp Vault KV v2 secret store. @@ -88,7 +91,12 @@ private function kvPath(string $path): string private function buildClient(): Client { - $client = new Client($this->addr); + $client = new Client( + new Uri($this->addr), + new HttpClient(), + new HttpFactory(), + new HttpFactory(), + ); if ($this->namespace !== null) { $client->setNamespace($this->namespace); @@ -97,8 +105,15 @@ private function buildClient(): Client if ($this->token !== null) { $client->setAuthenticationStrategy(new TokenAuthenticationStrategy($this->token)); } else { + $roleId = $this->roleId; + $secretId = $this->secretId; + + if ($roleId === null || $secretId === null) { + throw new SecretStoreException('AppRole credentials are incomplete.'); + } + $client->setAuthenticationStrategy( - new AppRoleAuthenticationStrategy($this->roleId, $this->secretId) + new AppRoleAuthenticationStrategy($roleId, $secretId) ); } From ab1c5614d5d3c6c9f914f77a01f6be1f80720b2a Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:11 -0300 Subject: [PATCH 14/25] fix: harden legacy pfx signer Signed-off-by: Vitor Mattos --- src/Xml/DpsSigner.php | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/Xml/DpsSigner.php b/src/Xml/DpsSigner.php index df6057d..a98238f 100644 --- a/src/Xml/DpsSigner.php +++ b/src/Xml/DpsSigner.php @@ -27,7 +27,8 @@ class DpsSigner implements XmlSignerInterface public function __construct( private readonly SecretStoreInterface $secretStore, - ) {} + ) { + } public function sign(string $xml, string $cnpj): string { @@ -44,9 +45,10 @@ public function sign(string $xml, string $cnpj): string throw new PfxImportException('Cannot read PFX file for CNPJ ' . $cnpj); } - [$privateKey, $certificate] = $this->importPfx($pfxContent, $password, $cnpj); + $signingMaterial = $this->importPfx($pfxContent, $password, $cnpj); + unset($signingMaterial); - return $this->signXml($xml, $privateKey, $certificate); + return $this->signXml($xml); } // ------------------------------------------------------------------------- @@ -69,7 +71,11 @@ private function importPfx(string $pfxContent, string $password, string $cnpj): } if (!$ok) { - throw new PfxImportException('Failed to import PFX for CNPJ ' . $cnpj . ': ' . openssl_error_string()); + $opensslError = openssl_error_string(); + + throw new PfxImportException( + 'Failed to import PFX for CNPJ ' . $cnpj . ': ' . ($opensslError ?: 'unknown OpenSSL error') + ); } } @@ -85,14 +91,17 @@ private function repackLegacyPfx(string $pfxContent, string $password): string $tmpIn = tempnam(sys_get_temp_dir(), 'nfse_in_'); $tmpOut = tempnam(sys_get_temp_dir(), 'nfse_out_'); + if ($tmpIn === false || $tmpOut === false) { + throw new PfxImportException('Failed to allocate temporary files for OpenSSL repack'); + } + try { file_put_contents($tmpIn, $pfxContent); // Use env var to avoid password in process list (avoids shell injection) - $env = 'NFSE_PFX_PASS=' . escapeshellarg($password); + putenv('NFSE_PFX_PASS=' . $password); $cmd = sprintf( - '%s openssl pkcs12 -legacy -in %s -passin env:NFSE_PFX_PASS -out %s -passout env:NFSE_PFX_PASS 2>/dev/null', - $env, + 'openssl pkcs12 -legacy -in %s -passin env:NFSE_PFX_PASS -out %s -passout env:NFSE_PFX_PASS 2>/dev/null', escapeshellarg($tmpIn), escapeshellarg($tmpOut), ); @@ -111,6 +120,8 @@ private function repackLegacyPfx(string $pfxContent, string $password): string return $result; } finally { + putenv('NFSE_PFX_PASS'); + if (is_file($tmpIn)) { unlink($tmpIn); } @@ -120,7 +131,7 @@ private function repackLegacyPfx(string $pfxContent, string $password): string } } - private function signXml(string $xml, string $privateKeyPem, string $certificatePem): string + private function signXml(string $xml): string { $doc = new \DOMDocument('1.0', 'UTF-8'); $doc->preserveWhiteSpace = false; From 2f3afdf1ce54b3ec1cecc7fd8787b2b8cf375783 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:11 -0300 Subject: [PATCH 15/25] style: format test case Signed-off-by: Vitor Mattos --- tests/TestCase.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index bbfe0d2..b3eaf17 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -9,4 +9,6 @@ use PHPUnit\Framework\TestCase as BaseTestCase; -abstract class TestCase extends BaseTestCase {} +abstract class TestCase extends BaseTestCase +{ +} From 5ad0795aa1e0f74a6bfef773572a39e8dcae6d85 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:12 -0300 Subject: [PATCH 16/25] style: format nfse client test Signed-off-by: Vitor Mattos --- tests/Unit/Http/NfseClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Unit/Http/NfseClientTest.php b/tests/Unit/Http/NfseClientTest.php index 5675cb4..15c09ba 100644 --- a/tests/Unit/Http/NfseClientTest.php +++ b/tests/Unit/Http/NfseClientTest.php @@ -40,7 +40,7 @@ protected function setUp(): void { parent::setUp(); - $this->signer = new class() implements XmlSignerInterface { + $this->signer = new class () implements XmlSignerInterface { public function sign(string $xml, string $cnpj): string { return $xml; From 7be05f151b3b5d36d05d59963fc858d0097d5652 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:12 -0300 Subject: [PATCH 17/25] chore: add library reuse metadata Signed-off-by: Vitor Mattos --- .reuse/dep5 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .reuse/dep5 diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 0000000..e3464ff --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,11 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: nfse-php +Upstream-Contact: LibreCode Coop +Source: https://github.com/LibreCodeCoop/nfse-php + +Files: .gitignore + .reuse/dep5 + composer.json + tests/Integration/.gitkeep +Copyright: 2026 LibreCode coop and contributors +License: AGPL-3.0-or-later From 9bd0a3ff4c3df00e50d067c5f1a9e7a5ac34b8e6 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:12 -0300 Subject: [PATCH 18/25] chore: add cc0 license text Signed-off-by: Vitor Mattos --- LICENSES/CC0-1.0.txt | 104 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 LICENSES/CC0-1.0.txt diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 100644 index 0000000..df8c834 --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,104 @@ +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights upon the creator and subsequent +owner(s) (each and all, an "owner") of an original work of authorship and/or +a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + +i. the right to reproduce, adapt, distribute, perform, display, communicate, +and translate a Work; +ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or likeness +depicted in a Work; +iv. rights protecting against unfair competition in regards to a Work, +subject to the limitations in paragraph 4(a), below; +v. rights protecting the extraction, dissemination, use and reuse of data in +a Work; +vi. database rights (such as those arising under Directive 96/9/EC of the +European Parliament and of the Council of 11 March 1996 on the legal +protection of databases, and under any national implementation thereof, +including any amended or successor version of such directive); and +vii. other similar, equivalent or corresponding rights throughout the world +based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), +(iii) in any current or future medium and for any number of copies, and +(iv) for any purpose whatsoever, including without limitation commercial, +advertising or promotional purposes (the "License"). The License shall be +deemed effective as of the date CC0 was applied by Affirmer to the Work. +Should any part of the License for any reason be judged legally invalid or +ineffective under applicable law, such partial invalidity or ineffectiveness +shall not invalidate the remainder of the License, and in such case Affirmer +hereby affirms that he or she will not (i) exercise any of his or her +remaining Copyright and Related Rights in the Work or (ii) assert any +associated claims and causes of action with respect to the Work, in either +case contrary to Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + +a. No trademark or patent rights held by Affirmer are waived, abandoned, +surrendered, licensed or otherwise affected by this document. +b. Affirmer offers the Work as-is and makes no representations or warranties +of any kind concerning the Work, express, implied, statutory or otherwise, +including without limitation warranties of title, merchantability, fitness for +a particular purpose, non infringement, or the absence of latent or other +defects, accuracy, or the present or absence of errors, whether or not +discoverable, all to the greatest extent permissible under applicable law. +c. Affirmer disclaims responsibility for clearing rights of other persons that +may apply to the Work or any use thereof, including without limitation any +person's Copyright and Related Rights in the Work. Further, Affirmer disclaims +responsibility for obtaining any necessary consents, permissions or other +rights required for any use of the Work. +d. Affirmer understands and acknowledges that Creative Commons is not a party +to this document and has no duty or obligation with respect to this CC0 or use +of the Work. From 06e8abce8de77d51760116547547f5ff882b92a9 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:28:12 -0300 Subject: [PATCH 19/25] test: add integration suite placeholder Signed-off-by: Vitor Mattos --- tests/Integration/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/Integration/.gitkeep diff --git a/tests/Integration/.gitkeep b/tests/Integration/.gitkeep new file mode 100644 index 0000000..e69de29 From f85586e49c8367fa55efc38e155320401d5f92bb Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:33:41 -0300 Subject: [PATCH 20/25] fix: install php-coveralls in ci Signed-off-by: Vitor Mattos --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 935dc82..d347048 100644 --- a/composer.json +++ b/composer.json @@ -30,6 +30,7 @@ "phpunit/phpunit": "^11.0", "donatj/mock-webserver": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", + "php-coveralls/php-coveralls": "^2.9", "vimeo/psalm": "^6.0" }, "autoload": { From ffd2cb85db2115a6add9702f52f9cae24bc04b83 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:51:40 -0300 Subject: [PATCH 21/25] chore: add reuse toml metadata Signed-off-by: Vitor Mattos --- REUSE.toml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 REUSE.toml diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 0000000..25b9f4e --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +version = 1 +SPDX-PackageName = "nfse-php" +SPDX-PackageSupplier = "LibreCode Coop " +SPDX-PackageDownloadLocation = "https://github.com/LibreCodeCoop/nfse-php" + +default-license = "AGPL-3.0-or-later" +default-copyright = "2026 LibreCode coop and contributors" + +[[annotations]] +path = [ + ".gitignore", + "composer.json", + "tests/Integration/.gitkeep" +] +precedence = "aggregate" +SPDX-FileCopyrightText = "2026 LibreCode coop and contributors" +SPDX-License-Identifier = "AGPL-3.0-or-later" \ No newline at end of file From f7077eb5d335ee49881c641fc2da99f867406c01 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 13:51:40 -0300 Subject: [PATCH 22/25] chore: drop deprecated reuse dep5 Signed-off-by: Vitor Mattos --- .reuse/dep5 | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .reuse/dep5 diff --git a/.reuse/dep5 b/.reuse/dep5 deleted file mode 100644 index e3464ff..0000000 --- a/.reuse/dep5 +++ /dev/null @@ -1,11 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: nfse-php -Upstream-Contact: LibreCode Coop -Source: https://github.com/LibreCodeCoop/nfse-php - -Files: .gitignore - .reuse/dep5 - composer.json - tests/Integration/.gitkeep -Copyright: 2026 LibreCode coop and contributors -License: AGPL-3.0-or-later From 05ec799a5b96d9c4c6457b292e6fe4a63f8f8aee Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 14:34:43 -0300 Subject: [PATCH 23/25] chore(psalm): update psalm.xml Signed-off-by: Vitor Mattos --- psalm.xml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/psalm.xml b/psalm.xml index ffb7f9a..b60c0c9 100644 --- a/psalm.xml +++ b/psalm.xml @@ -2,8 +2,12 @@ - - - - - - From 2a6359973ffdf4eb41ae26c329474414c9caaac0 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 14:34:43 -0300 Subject: [PATCH 24/25] chore(psalm): update tests/psalm-baseline.xml Signed-off-by: Vitor Mattos --- tests/psalm-baseline.xml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/psalm-baseline.xml diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml new file mode 100644 index 0000000..d1ef374 --- /dev/null +++ b/tests/psalm-baseline.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From de1a857c4d1c340688c7ec3ec6d3f19f42b10d8e Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 20 Mar 2026 14:38:26 -0300 Subject: [PATCH 25/25] chore(reuse): add spdx headers to psalm baseline Signed-off-by: Vitor Mattos --- tests/psalm-baseline.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml index d1ef374..586f469 100644 --- a/tests/psalm-baseline.xml +++ b/tests/psalm-baseline.xml @@ -1,4 +1,6 @@ + +