Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3d34db3
Fixed #197
Oct 17, 2025
6087c04
Resolved #189, updated Docs and Tests for Enums
Oct 17, 2025
b96f386
Removed phpunit cache
Oct 17, 2025
30b8d82
Resolved #188
Oct 17, 2025
fd4e1cf
wip
Oct 17, 2025
ee22c40
Merge branch 'main' into feature-a-few-fixes
Oct 17, 2025
d8c2a1a
Minor code improvements
Oct 17, 2025
56b872e
Improved TransferDocument Request
Oct 17, 2025
083a264
Merge branch 'main' of github.com:codebar-ag/laravel-docuware into fe…
Nov 14, 2025
9de480b
Security updates
Mar 20, 2026
ddae347
Optimized Repository Skeleton
Mar 20, 2026
72a9de0
chore: sync Laravel Pint workflow from template
Mar 20, 2026
81ff180
chore: sync CONTRIBUTING.md from template
Mar 20, 2026
928c56c
chore: sync security policy from template
Mar 20, 2026
61ccea0
chore: sync PHPStan workflow from template
Mar 21, 2026
6661fd2
chore: sync Laravel Pint workflow from template
Mar 21, 2026
8720eaf
chore: sync Dependabot config and workflows from template
Mar 21, 2026
6ca012b
chore: sync Laravel Pint workflow from template
Mar 21, 2026
8a79d8b
chore: sync PHPStan workflow from template
Mar 21, 2026
b527192
chore: sync release workflow from template
Mar 21, 2026
da18fe8
Optimized Repository Skeleton
Mar 21, 2026
aff5617
chore: sync CONTRIBUTING.md from template
Mar 21, 2026
4fe6613
chore: sync security policy from template
Mar 21, 2026
43984b5
Optimized Repository Skeleton
Mar 26, 2026
abd68bc
Merge remote-tracking branch 'origin/main'
Mar 26, 2026
a9fbe31
Optimized Repository Skeleton
Mar 26, 2026
74c8e09
chore: sync dependency audit workflows from template
Mar 26, 2026
1ab8848
Merge remote-tracking branch 'origin/main'
Mar 26, 2026
62b59c3
chore: sync GitHub issue templates
Apr 3, 2026
7209cf8
chore: sync Laravel Pint workflow from template
Apr 3, 2026
e7a27df
chore: sync PHPStan workflow from template
Apr 3, 2026
9a02f11
chore: sync dependency audit workflows from template
Apr 3, 2026
d843cfc
chore: sync Dependabot config and workflows from template
Apr 3, 2026
fec181b
Laravel 13
Apr 7, 2026
ae62136
#major updated to laravel 13
Apr 7, 2026
0dcae9f
Merge branch 'main' into feature-laravel13
Apr 7, 2026
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
37 changes: 37 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# DocuWare REST API (maps to Postman environment "DocuWare")
#
# Postman Laravel / config
# ---------------- --------------------------------------------
# ServerUrl DOCUWARE_URL (scheme + host, no trailing path)
# Platform DOCUWARE_PLATFORM_PATH (default: DocuWare/Platform)
# Username DOCUWARE_USERNAME
# Password DOCUWARE_PASSWORD
# OrgId DOCUWARE_TESTS_ORG_ID (optional; or DOCUWARE_TESTS_ORGANIZATION_ID)
# FileCabinetId DOCUWARE_TESTS_FILE_CABINET_ID
# SearchDialogId DOCUWARE_TESTS_SEARCH_DIALOG_ID (optional; falls back to DOCUWARE_TESTS_DIALOG_ID in your app)
# StoreDialogId DOCUWARE_TESTS_STORE_DIALOG_ID
# DocumentId DOCUWARE_TESTS_DOCUMENT_ID
# ClientID / ClientSecret — OAuth client; package uses DOCUWARE_CLIENT_ID + password grant by default

DOCUWARE_URL=
DOCUWARE_PLATFORM_PATH=DocuWare/Platform
DOCUWARE_USERNAME=
DOCUWARE_PASSWORD=
DOCUWARE_PASSPHRASE=
DOCUWARE_CLIENT_ID=docuware.platform.net.client
DOCUWARE_SCOPE=docuware.platform
DOCUWARE_TIMEOUT=60
DOCUWARE_CACHE_DRIVER=file
DOCUWARE_CACHE_LIFETIME_IN_SECONDS=60

# PHPUnit / local live tests (see docs/postman-parity.md)
DOCUWARE_TESTS_FILE_CABINET_ID=
DOCUWARE_TESTS_DIALOG_ID=
DOCUWARE_TESTS_BASKET_ID=
DOCUWARE_TESTS_ORG_ID=
DOCUWARE_TESTS_SEARCH_DIALOG_ID=
DOCUWARE_TESTS_STORE_DIALOG_ID=
DOCUWARE_TESTS_DOCUMENT_ID=
DOCUWARE_TESTS_ORGANIZATION_ID=
DOCUWARE_TESTS_GROUP_ID=
DOCUWARE_TESTS_ROLE_ID=
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ We're sorry to hear you have a problem. Can you help us solve it by providing th
attributes:
label: PHP Version
description: What version of PHP are you running? Please be as specific as possible
placeholder: "8.4.0"
value: "8.4.0"
placeholder: "8.5.0"
value: "8.5.0"
validations:
required: true
- type: input
id: laravel-version
attributes:
label: Laravel Version
description: What version of Laravel are you running? Please be as specific as possible
placeholder: "12.0.0"
value: "12.0.0"
placeholder: "13.0.0"
value: "13.0.0"
validations:
required: true
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/composer-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@2.37.0
with:
php-version: '8.4'
php-version: '8.5'
coverage: none

- name: Resolve dependencies and audit
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.5.0
uses: dependabot/fetch-metadata@v3.0.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6.0.2

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@2.6
- name: Setup PHP
uses: shivammathur/setup-php@2.37.0
with:
php-version: '8.5'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@4.0.0

- name: Run Laravel Pint
run: vendor/bin/pint

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v7.1.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@2.37.0
with:
php-version: '8.4'
php-version: '8.5'
coverage: none

- name: Install composer dependencies
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ jobs:
max-parallel: 1
matrix:
os: [ ubuntu-latest ]
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 12.* ]
php: [ 8.3, 8.4, 8.5 ]
laravel: [ 13.* ]
stability: [ prefer-lowest, prefer-stable ]

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none
coverage: pcov

- name: Setup problem matchers
run: |
Expand All @@ -41,10 +41,10 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: Execute tests
- name: Copy PHPUnit configuration
run: cp phpunit.xml.dist phpunit.xml

- name: Execute tests
- name: Run Pest tests
run: vendor/bin/pest
env:
DOCUWARE_URL: ${{ secrets.DOCUWARE_URL }}
Expand All @@ -54,7 +54,7 @@ jobs:

- name: Store Log Artifacts
if: failure()
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: Store report artifacts
path: ./vendor/orchestra/testbench-core/laravel/storage/logs
64 changes: 53 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ See the documentation if you need further functionality. ⚠️
* [💥 Exceptions explained](#-exceptions-explained)
* [✨ Events](#-events)
* [🔧 Configuration file](#-configuration-file)
* [Postman collection parity & Saloon fixtures](#postman-collection-parity--saloon-fixtures)
* [🚧 Testing](#-testing)
* [📝 Changelog](#-changelog)
* [✏️ Contributing](#-contributing)
Expand Down Expand Up @@ -198,20 +199,20 @@ then optimize the processes that power the core of your business.
| FileCabinets/Search | Get a Specific Document From a File Cabinet | ✅ | |
| FileCabinets/Search | Search for Documents in a Single File Cabinet | ✅ | |
| FileCabinets/Search | Search for Documents in Multiple File Cabinets | ✅ | |
| FileCabinets/CheckInCheckOut | Check-out & Download a Document | 🕣 | |
| FileCabinets/CheckInCheckOut | Check-in a Document from the File System | 🕣 | |
| FileCabinets/CheckInCheckOut | Undo Check-out | 🕣 | |
| FileCabinets/CheckInCheckOut | Check-out & Download a Document | | `CheckoutDocumentToFileSystem` |
| FileCabinets/CheckInCheckOut | Check-in a Document from the File System | | `CheckInDocumentFromFileSystem` |
| FileCabinets/CheckInCheckOut | Undo Check-out | | `UndoDocumentCheckout` |
| FileCabinets/SelectLists | Get Select Lists & Get Filtered Select Lists | ✅ | |
| FileCabinets/Upload | Create Data Record | ✅ | |
| FileCabinets/Upload | Append File(s) to a Data Record | ✅ | |
| FileCabinets/Upload | Upload a Single File for a Data Record | ❌ | - |
| FileCabinets/Upload | Create a Data Record & Upload File | ❌ | - |
| FileCabinets/Upload | Create Data Record & Upload File Using Store Dialog | | - |
| FileCabinets/Upload | Create Data Record & Upload File Using Store Dialog | | `CreateDataRecord` + `storeDialogId` |
| FileCabinets/Upload | Append a Single PDF to a Document | ✅ | - |
| FileCabinets/Upload | Replace a PDF Document Section | ✅ | |
| FileCabinets/BatchIndexFieldsUpdate | Batch Update Index Fields By Id | | - |
| FileCabinets/BatchIndexFieldsUpdate | Batch Update Index Fields By Search | | - |
| FileCabinets/BatchIndexFieldsUpdate | Batch Append/Update Keyword Fields By Id | | - |
| FileCabinets/BatchIndexFieldsUpdate | Batch Update Index Fields By Id | | `BatchDocumentsUpdateFields` |
| FileCabinets/BatchIndexFieldsUpdate | Batch Update Index Fields By Search | | `BatchDocumentsUpdateFields` |
| FileCabinets/BatchIndexFieldsUpdate | Batch Append/Update Keyword Fields By Id | | `BatchDocumentsUpdateFields` |
| Documents/UpdateIndexValues | Update Index Values | ✅ | |
| Documents/UpdateIndexValues | Update Table Field Values | ❌ | - ? |
| Documents/ModifyDocuments | Transfer Document | ✅ | |
Expand All @@ -220,15 +221,15 @@ then optimize the processes that power the core of your business.
| Documents/ClipUnclip&StapleUnstaple | Unclip | ✅ | |
| Documents/ClipUnclip&StapleUnstaple | Staple | ✅ | |
| Documents/ClipUnclip&StapleUnstaple | Unstaple | ✅ | |
| Documents/AnnotationsStamps | AddStampWithPosition | 🕣 | |
| Documents/AnnotationsStamps | AddStampWithBestPosition | 🕣 | |
| Documents/AnnotationsStamps | AddStampWithPosition | | `AddDocumentAnnotations` |
| Documents/AnnotationsStamps | AddStampWithBestPosition | | `AddDocumentAnnotations` |
| Documents/AnnotationsStamps | AddTextAnnotation | 🕣 | |
| Documents/AnnotationsStamps | AddRectEntryAnnotation | 🕣 | |
| Documents/AnnotationsStamps | AddLineEntryAnnotation | 🕣 | |
| Documents/AnnotationsStamps | AddPolyLineEntryAnnotation | ❌ | - |
| Documents/AnnotationsStamps | DeleteAnnotation | ❌ | - |
| Documents/AnnotationsStamps | UpdateTextAnnotation | 🕣 | |
| Documents/AnnotationsStamps | Get Stamps | | - |
| Documents/AnnotationsStamps | Get Stamps | | `GetStamps` |
| Documents/DocumentsTrashBin | Get Documents | ✅ | |
| Documents/DocumentsTrashBin | Delete Documents | ✅ | |
| Documents/DocumentsTrashBin | Restore Documents | ✅ | |
Expand Down Expand Up @@ -1744,6 +1745,17 @@ return [

'timeout' => env('DOCUWARE_TIMEOUT', 15),

/*
|--------------------------------------------------------------------------
| Platform path
|--------------------------------------------------------------------------
|
| Matches Postman {{Platform}} (default DocuWare/Platform).
|
*/

'platform_path' => env('DOCUWARE_PLATFORM_PATH', 'DocuWare/Platform'),

/*
|--------------------------------------------------------------------------
| DocuWare Credentials
Expand Down Expand Up @@ -1816,10 +1828,29 @@ return [
'file_cabinet_id' => env('DOCUWARE_TESTS_FILE_CABINET_ID'),
'dialog_id' => env('DOCUWARE_TESTS_DIALOG_ID'),
'basket_id' => env('DOCUWARE_TESTS_BASKET_ID'),
'org_id' => env('DOCUWARE_TESTS_ORG_ID', env('DOCUWARE_TESTS_ORGANIZATION_ID')),
'search_dialog_id' => env('DOCUWARE_TESTS_SEARCH_DIALOG_ID'),
'store_dialog_id' => env('DOCUWARE_TESTS_STORE_DIALOG_ID'),
'document_id' => env('DOCUWARE_TESTS_DOCUMENT_ID'),
],
];
```

## Postman collection parity & Saloon fixtures

The official DocuWare Postman collection uses `{{ServerUrl}}` and `{{Platform}}` (default `DocuWare/Platform`). This package maps them to Laravel env vars — see [`.env.example`](.env.example) for a **Postman variable → `DOCUWARE_*`** table.

- **Parity matrix** (endpoints vs request classes): [`docs/postman-parity.md`](docs/postman-parity.md).
- **Platform path**: `DOCUWARE_PLATFORM_PATH` (used by `DocuWareConnector`, `GetResponsibleIdentityService`, and encrypted Web Client URLs in `DocuWareUrl`).
- **CI-friendly tests**: Default `composer test` runs **unit**, **DTO**, and **Saloon fixture** tests (`tests/Feature/SaloonFixtures`). HTTP responses are replayed from JSON files under [`tests/Fixtures/saloon/`](tests/Fixtures/saloon) using [Saloon fixtures](https://docs.saloon.dev/digging-deeper/testing) (`MockClient` + `Fixture`). Bodies use Saloon’s recorded format: `statusCode`, `headers`, `data` (raw response body), `context`.
- **Recording fixtures** (optional): Edit [`tests/Manual/RecordGetOrganizationFixtureTest.php`](tests/Manual/RecordGetOrganizationFixtureTest.php), remove the `->skip(...)`, set real `DOCUWARE_*` credentials, then run:
```bash
composer test:manual
```
(`composer test:manual` runs only `tests/Manual`.)
Review the generated JSON for secrets, commit if safe, then restore the skip.
- **Live tenant tests** (destructive cleanup, real API): `composer test:live` runs the `integration` PHPUnit testsuite (`tests/Integration`). Requires valid DocuWare credentials and test cabinet IDs in `phpunit.xml` or the environment.

## 🚧 Testing

Copy your own phpunit.xml-file.
Expand All @@ -1832,6 +1863,7 @@ Modify environment variables in the phpunit.xml-file:

```xml
<env name="DOCUWARE_URL" value="https://domain.docuware.cloud"/>
<env name="DOCUWARE_PLATFORM_PATH" value="DocuWare/Platform"/>
<env name="DOCUWARE_USERNAME" value="user@domain.test"/>
<env name="DOCUWARE_PASSWORD" value="password"/>
<env name="DOCUWARE_PASSPHRASE" value="passphrase"/>
Expand All @@ -1844,14 +1876,24 @@ Modify environment variables in the phpunit.xml-file:
<env name="DOCUWARE_TESTS_FILE_CABINET_ID" value=""/>
<env name="DOCUWARE_TESTS_DIALOG_ID" value=""/>
<env name="DOCUWARE_TESTS_BASKET_ID" value=""/>
<env name="DOCUWARE_TESTS_ORG_ID" value=""/>
<env name="DOCUWARE_TESTS_SEARCH_DIALOG_ID" value=""/>
<env name="DOCUWARE_TESTS_STORE_DIALOG_ID" value=""/>
<env name="DOCUWARE_TESTS_DOCUMENT_ID" value=""/>
```

Run the tests:
Default test run (no live DocuWare required):

```bash
composer test
```

Against a real system (integration suite):

```bash
composer test:live
```

## 📝 Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
Expand Down
45 changes: 25 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,27 @@
}
],
"require": {
"php": "8.2.*|8.3.*|8.4.*",
"guzzlehttp/guzzle": "^7.8",
"illuminate/contracts": "^12.0",
"nesbot/carbon": "^3.8",
"php": "8.3.*|8.4.*|8.5.*",
"guzzlehttp/guzzle": "^7.9.2",
"illuminate/contracts": "^13.0",
"illuminate/support": "^13.0",
"nesbot/carbon": "^3.8.4",
"saloonphp/cache-plugin": "^3.1",
"saloonphp/laravel-plugin": "^3.0|^4.0",
"saloonphp/saloon": "^3.0|^4.0",
"spatie/laravel-package-tools": "^1.19"
"saloonphp/laravel-plugin": "^4.0",
"saloonphp/saloon": "^4.0",
"spatie/laravel-package-tools": "^1.19.0"
},
"require-dev": {
"laravel/pint": "^1.21",
"larastan/larastan": "^v3.1",
"orchestra/testbench": "^10.0",
"pestphp/pest": "^3.7",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"spatie/laravel-ray": "^1.39"
"laravel/pint": "^1.21.1",
"larastan/larastan": "^3.9.3",
"nunomaduro/collision": "^8.9",
"orchestra/testbench": "^11.0",
"pestphp/pest": "^4.4",
"phpdocumentor/reflection-docblock": "^5.6.1",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan-deprecation-rules": "^2.0.1",
"phpstan/phpstan-phpunit": "^2.0.4",
"spatie/laravel-ray": "^1.40.0"
},
"autoload": {
"psr-4": {
Expand All @@ -53,16 +56,18 @@
"scripts": {
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage",
"test": "vendor/bin/pest --no-coverage --testsuite=default",
"test:live": "vendor/bin/pest --no-coverage --testsuite=integration",
"test:manual": "vendor/bin/pest --no-coverage tests/Manual",
"test-coverage": "vendor/bin/pest --coverage --testsuite=default",
"format": "vendor/bin/pint"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/package-versions-deprecated": true,
"phpstan/extension-installer": true,
"pestphp/pest-plugin": true
"composer/package-versions-deprecated": false,
"pestphp/pest-plugin": true,
"phpstan/extension-installer": true
}
},
"extra": {
Expand Down
16 changes: 16 additions & 0 deletions config/laravel-docuware.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@

'timeout' => env('DOCUWARE_TIMEOUT', 15),

/*
|--------------------------------------------------------------------------
| Platform path
|--------------------------------------------------------------------------
|
| Postman variable {{Platform}} is usually "DocuWare/Platform". Base URL is
| rtrim(DOCUWARE_URL,'/').'/'.platform_path
|
*/

'platform_path' => env('DOCUWARE_PLATFORM_PATH', 'DocuWare/Platform'),

/*
|--------------------------------------------------------------------------
| DocuWare Credentials
Expand Down Expand Up @@ -95,5 +107,9 @@
'file_cabinet_id' => env('DOCUWARE_TESTS_FILE_CABINET_ID'),
'dialog_id' => env('DOCUWARE_TESTS_DIALOG_ID'),
'basket_id' => env('DOCUWARE_TESTS_BASKET_ID'),
'org_id' => env('DOCUWARE_TESTS_ORG_ID', env('DOCUWARE_TESTS_ORGANIZATION_ID')),
'search_dialog_id' => env('DOCUWARE_TESTS_SEARCH_DIALOG_ID'),
'store_dialog_id' => env('DOCUWARE_TESTS_STORE_DIALOG_ID'),
'document_id' => env('DOCUWARE_TESTS_DOCUMENT_ID'),
],
];
Loading
Loading