Skip to content

Generate DANFSE locally from authorized XML#144

Open
vitormattos wants to merge 4 commits into
mainfrom
fix/local-danfse-generation
Open

Generate DANFSE locally from authorized XML#144
vitormattos wants to merge 4 commits into
mainfrom
fix/local-danfse-generation

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Summary

  • pin librecodeoop/nfse-php to the upstream revision that includes local DANFSE generation support
  • update InvoiceController to generate DANFSE locally from the authorized NFS-e XML instead of routing through the client transport path
  • align the focused DANFSE controller tests with the local XML-based generation flow
  • update the transport cleanup regression test to assert the HTTP client DANFSE path is not used during artifact storage

How to test

  1. Run the focused DANFSE controller tests:
    • docker compose exec -u www-data akaunting.php sh -lc 'cd /var/www/html/modules/Nfse && php vendor-bin/phpunit/vendor/bin/phpunit --filter "testStoreArtifactsPersistsXmlEvenWhenDanfseFails|testGenerateDanfseFromAuthorizedXmlUsesReceiptRawXml|testStoreArtifactsPersistsPdfWhenDanfseGenerationSucceeds|testStoreArtifactsGeneratesDanfseLocallyWithoutUsingClientTransport" tests/Unit/Http/Controllers/InvoiceControllerTest.php tests/Unit/Http/Controllers/TransportCertificateCleanupTest.php'
  2. Confirm the tests pass.
  3. Optionally verify that 3rdparty/scoped/librecodeoop/nfse-php/src/Danfse/ exists after the scoped dependency refresh.

Checklist

  • Tests added or updated
  • Documentation updated if needed
  • No deprecated APIs used

AI disclosure

  • AI assistance was used to help diagnose the DANFSE transport issue, update the controller/tests, and prepare this pull request.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
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.

1 participant