Skip to content

Commit

Permalink
V0.2.2 - Suppress Warnings and Errors of DomDocument, Update dev depe…
Browse files Browse the repository at this point in the history
…ndencies (#7)

* Add new test file for triggering warning (ErrorException)
* Suppress LIBXML errors and warnings for stuff like missing namespaces
This is done to avoid throwing ErrorExceptions if the error_reporting is strictly configured. The reader will report that the XML is not an e invoice
* Update dev dependencies
  • Loading branch information
BolZer authored Sep 16, 2024
1 parent d420205 commit 47ff72a
Show file tree
Hide file tree
Showing 8 changed files with 1,258 additions and 315 deletions.
6 changes: 5 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?php

use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

$finder = (new PhpCsFixer\Finder())
->in([__DIR__ . '/src', __DIR__ . '/tests']);

return (new PhpCsFixer\Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
Expand All @@ -28,5 +31,6 @@
'declare_strict_types' => true,
'final_class' => true,
'no_unused_imports' => true,
'nullable_type_declaration_for_default_null_value' => false,
])
->setFinder($finder);
->setFinder($finder);
7 changes: 6 additions & 1 deletion .task/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ tasks:
cmds:
- ./vendor/bin/php-cs-fixer fix

fixcs_debug:
desc: Fixes the PHP files and shows which rules were applied
cmds:
- ./vendor/bin/php-cs-fixer fix -vvv

generators:
desc: Runs the code generators (Enums etc.)
cmds:
Expand All @@ -34,4 +39,4 @@ tasks:
- php ./tools/Generators/DocumentTypeEnumGenerator.php
- php ./tools/Generators/ReferenceQualifierEnumGenerator.php
- php ./tools/Generators/UnitCodeEnumGenerator.php
- ./vendor/bin/php-cs-fixer fix
- ./vendor/bin/php-cs-fixer fix
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "easybill/e-invoicing",
"version": "0.2.1",
"version": "0.2.2",
"description": "A package to read and create the formats: factur-x, Peppol BIS Billing, XRechnung (CII/UBL)",
"type": "library",
"license": "MIT",
Expand Down Expand Up @@ -45,10 +45,10 @@
"ext-libxml": "*"
},
"require-dev": {
"pestphp/pest": "^2.34",
"phpstan/phpstan": "^1.10",
"friendsofphp/php-cs-fixer": "^3.51",
"guzzlehttp/guzzle": "^7.8"
"pestphp/pest": "^2.35",
"phpstan/phpstan": "^1.12",
"friendsofphp/php-cs-fixer": "^3.64",
"guzzlehttp/guzzle": "^7.9"
},
"config": {
"platform-check": false,
Expand Down
Loading

0 comments on commit 47ff72a

Please sign in to comment.