Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v 2.0.0 #60

Merged
merged 51 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9ec813a
Drop support for PHP 7
BolZer Feb 29, 2024
67a1d7c
Add author to composer.json
BolZer Feb 29, 2024
f7fcbce
Add composer.phar to .gitignore
BolZer Feb 29, 2024
b55ec3d
Add github action workflow for phpstan
BolZer Feb 29, 2024
8fa7b32
Fix naming of phpstan workflow
BolZer Feb 29, 2024
0352ece
Use rector to change annotation to attributes
BolZer Feb 29, 2024
cb214ba
Fix test using ProcuringProject instead of LogisticsServiceCharge
BolZer Feb 29, 2024
33bf1cb
Fix code issues in various files
BolZer Feb 29, 2024
deaa940
Fix issues with cs fix
BolZer Feb 29, 2024
35cc96f
Fix issues with zugferd10 xml property sorting
BolZer Feb 29, 2024
0b04821
Fix issues with zugferd10 xml property sorting
BolZer Feb 29, 2024
6be0024
Dump php version of github actions to the smallest supported php vers…
BolZer Feb 29, 2024
242e710
Add declare strict types
BolZer Feb 29, 2024
ed23708
Add strict types to every php file
BolZer Feb 29, 2024
3362979
Clean up code in zugferd211
BolZer Feb 29, 2024
7c28aa4
Add phpstan.neon
BolZer Feb 29, 2024
b9de880
Cleanup code
BolZer Feb 29, 2024
3aede02
Merge branch 'master' into dev
BolZer Mar 1, 2024
f30fa57
Specify type for schemeID in ID
BolZer Mar 1, 2024
66f1274
Move references xmls to the appropriate places
BolZer Mar 1, 2024
896cdc8
Add missing field ContractReferencedDocument to HeaderTradeAgreement
BolZer Mar 1, 2024
d55523f
Extend on testcase testBuildXRechnung and include the properties Buye…
BolZer Mar 1, 2024
2411ab7
Add missing AppliedTradeAllowanceCharge to TradePrice
BolZer Mar 1, 2024
7ca145e
Extend on testcase to include AppliedTradeAllowanceCharge in TradePrice
BolZer Mar 1, 2024
e9f7dcc
Add static constructor to TradeTax
BolZer Mar 1, 2024
af9981c
Use correct ramid in test
BolZer Mar 1, 2024
1ffe0ae
Fix PHPStan
BolZer Mar 1, 2024
417fd83
Add missing model for LegalOrganization
BolZer Mar 1, 2024
4c7e318
Revert "Add missing model for LegalOrganization"
BolZer Mar 1, 2024
b66ea2d
Rename namespace Easybill\ZUGFeRD211\ to Easybill\ZUGFeRD2\
BolZer Mar 2, 2024
9ddb082
Check in schemas for ZUGFeRD 2.2
BolZer Mar 2, 2024
ba812b7
Move old test to legacy subdir
BolZer Mar 2, 2024
7356522
Add test for BASIC_Einfach.xml
BolZer Mar 2, 2024
7664be4
Add test for BASIC_Rechnungskorrektur.xml
BolZer Mar 2, 2024
bb17b0d
Add test for BASIC_Taxifahrt.xml
BolZer Mar 2, 2024
3407554
Remove Constants Class
BolZer Mar 2, 2024
86f6960
Add test for example MINIMUM_Rechnung.xml
BolZer Mar 2, 2024
37c0585
Add test for example MINIMUM_Buchungshilfe.xml
BolZer Mar 2, 2024
18580ed
Add test for XRECHNUNG_Einfach.xml
BolZer Mar 2, 2024
47bd04d
Add test for XRECHNUNG_Reisekostenabrechnung.xml
BolZer Mar 2, 2024
bbc2e4e
Add test fir XRECHNUNG_Reisekostenabrechnung
BolZer Mar 5, 2024
5266d13
Add test fir XRECHNUNG_Betriebskostenabrechnung
BolZer Mar 5, 2024
0097824
Add test for XRECHNUNG_Betriebskostenabrechnung.xml'
BolZer Mar 8, 2024
a73baaa
Add test for EXTENDED_InnergemeinschLieferungMehrereBestellungen
BolZer Mar 8, 2024
a43699a
Add test for EN16931_Einfach.xml
BolZer Mar 8, 2024
a3bf8a8
Add reference file for test with legal organisation
BolZer Mar 8, 2024
7976631
Fix TradePrice. AppliedTradeAllowanceCharge is unbound.
BolZer Mar 8, 2024
4d4bfa9
Remove broken Test
BolZer Mar 8, 2024
e500353
Fix cs style
BolZer Mar 8, 2024
72352f1
Update Readme
BolZer Mar 8, 2024
46a5450
Fix SellerAssignedID in ZUGFeRD 1.0
BolZer Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
include:
- { operating-system: 'ubuntu-latest', php-version: '8.2', dependencies: '' }
- { operating-system: 'ubuntu-latest', php-version: '8.1', dependencies: '' }

name: PHP ${{ matrix.php-version }}

Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PHPStan

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- { operating-system: 'ubuntu-latest', php-version: '8.1', dependencies: '' }

name: PHP ${{ matrix.php-version }}

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer:v2

- name: Install dependencies
run: |
composer install --no-interaction --prefer-dist --no-progress ${{ matrix.dependencies }}

- name: Analyze code for issues
run: |
php vendor/bin/phpstan analyse src --level 8
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
strategy:
matrix:
include:
- { operating-system: 'ubuntu-latest', php-version: '7.4', dependencies: '--ignore-platform-req=php' }
- { operating-system: 'ubuntu-latest', php-version: '8.0', dependencies: '--ignore-platform-req=php' }
- { operating-system: 'ubuntu-latest', php-version: '8.1', dependencies: '' }
- { operating-system: 'ubuntu-latest', php-version: '8.2', dependencies: '' }
- { operating-system: 'ubuntu-latest', php-version: '8.3', dependencies: '' }


name: PHP ${{ matrix.php-version }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ vendor
.phpunit.result.cache
.php-cs-fixer.cache
.vscode
composer.phar
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@ make:
test:
./vendor/bin/phpunit

test74:
docker run --rm -v $(current_dir):/app -w /app php:7.4 vendor/bin/phpunit

test8:
docker run --rm -v $(current_dir):/app -w /app php:8.0 vendor/bin/phpunit

test81:
docker run --rm -v $(current_dir):/app -w /app php:8.1 vendor/bin/phpunit

test82:
docker run --rm -v $(current_dir):/app -w /app php:8.2 vendor/bin/phpunit

test83:
docker run --rm -v $(current_dir):/app -w /app php:8.3 vendor/bin/phpunit

cs-fix:
./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.dist.php
PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.dist.php

phpstan:
./vendor/bin/phpstan analyse

rector:
./vendor/bin/rector process

rector-dry-run:
./vendor/bin/rector process --dry-run
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ $xml = Builder::create()->getXML($doc);
echo $xml; // Zugferd XML.
```

## Usage ZUGFeRD v2.1
## Usage ZUGFeRD v2

Convert XML to PHP Objects:

```php
use Easybill\ZUGFeRD211\Reader;
use Easybill\ZUGFeRD2\Reader;

$xml = file_get_contents('factur-x.xml');
$obj = Reader::create()->transform($xml);
Expand All @@ -54,7 +54,7 @@ $obj = Reader::create()->transform($xml);
Convert PHP Objects to XML:

```php
use Easybill\ZUGFeRD211\Builder;
use Easybill\ZUGFeRD2\Builder;

$obj = ...;

Expand Down
14 changes: 10 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
{
"name": "Patrick Romowicz",
"email": "patrick@romowicz.de"
},
{
"name": "Jan Nöhles",
"email": "jan.noehles@easybill.de"
}
],
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.1",
"jms/serializer": "^3.16",
"ext-dom": "*"
},
Expand All @@ -24,18 +28,20 @@
"require-dev": {
"phpunit/phpunit": "^9.3",
"ext-libxml": "*",
"friendsofphp/php-cs-fixer": "^3.16"
"friendsofphp/php-cs-fixer": "^3.16",
"phpstan/phpstan": "^1.10",
"rector/rector": "^1.0"
},
"autoload": {
"psr-4": {
"Easybill\\ZUGFeRD\\": "src/zugferd10",
"Easybill\\ZUGFeRD211\\": "src/zugferd211"
"Easybill\\ZUGFeRD2\\": "src/zugferd2"
}
},
"autoload-dev": {
"psr-4": {
"Easybill\\ZUGFeRD\\": "tests/zugferd10",
"Easybill\\ZUGFeRD211\\": "tests/zugferd211"
"Easybill\\ZUGFeRD2\\": "tests/zugferd2"
}
},
"config": {
Expand Down
Loading
Loading