Conversation
…ature-a-few-fixes
There was a problem hiding this comment.
Pull request overview
This PR updates the package for Laravel 13 / newer Saloon, expands Postman-parity endpoint coverage (check-in/out, batch update, stamps, workflow), and reworks the test strategy to separate CI-safe fixture tests from live integration tests.
Changes:
- Upgrade dependencies/tooling for Laravel 13 + newer PHP/Saloon, and raise static-analysis strictness.
- Add
platform_pathconfiguration and apply it to base URLs and WebClient URL generation. - Introduce Saloon fixture-based tests + reorganize test suites; add/extend request/DTO/response parsing to normalize JSON array/object shapes.
Reviewed changes
Copilot reviewed 127 out of 174 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/TestCase.php | Sets Saloon fixture path during test environment setup; removes prior factory/event debug setup. |
| tests/Support/FixtureDocuWareConnector.php | Test connector that bypasses OAuth with a static bearer token for fixture tests. |
| tests/Pest.php | Reorganizes test hooks for integration suite and adds polling-based “document processed” refresh helper. |
| tests/Manual/RecordGetOrganizationFixtureTest.php | Adds a skipped manual test for recording Saloon fixtures from a live tenant. |
| tests/Integration/Requests/Workflow/GetDocumentWorkflowHistoryTest.php | Adds integration coverage for workflow history (currently skipped). |
| tests/Integration/Requests/Workflow/GetDocumentWorkflowHistoryStepsTest.php | Adds integration coverage for workflow history steps (currently skipped). |
| tests/Integration/Requests/SelectList/GetSelectListRequest.php | Adds integration test for listing select list values. |
| tests/Integration/Requests/Search/GetSearchRequestTest.php | Adds integration tests covering search builder behaviors and error cases. |
| tests/Integration/Requests/Organization/GetOrganizationsRequestTest.php | Adds integration test for organizations response mapping. |
| tests/Integration/Requests/General/UserManagement/GetUsers/GetUsersTest.php | Adds integration test for listing users. |
| tests/Integration/Requests/General/UserManagement/GetUsers/GetUsersOfARoleTest.php | Adds integration test for users-of-role request. |
| tests/Integration/Requests/General/UserManagement/GetUsers/GetUsersOfAGroupTest.php | Adds integration test for users-of-group request. |
| tests/Integration/Requests/General/UserManagement/GetUsers/GetUserByIdTest.php | Adds integration test for user-by-id request. |
| tests/Integration/Requests/General/UserManagement/GetModifyRoles/GetRolesTest.php | Adds integration test for listing roles. |
| tests/Integration/Requests/General/UserManagement/GetModifyRoles/GetAllRolesForASpecificUserTest.php | Adds integration test for listing roles for a user. |
| tests/Integration/Requests/General/UserManagement/GetModifyRoles/AddRemoveUserToARoleTest.php | Adds integration tests for adding/removing roles to a user (live). |
| tests/Integration/Requests/General/UserManagement/GetModifyGroups/GetGroupsTest.php | Adds integration test for listing groups. |
| tests/Integration/Requests/General/UserManagement/GetModifyGroups/GetAllGroupsForASpecificUserTest.php | Adds integration test for listing groups for a user. |
| tests/Integration/Requests/General/UserManagement/GetModifyGroups/AddRemoveUserToAGroupTest.php | Adds integration tests for adding/removing groups to a user (live). |
| tests/Integration/Requests/General/UserManagement/CreateUpdateUsers/CreateUpdateUserTest.php | Adds integration tests for creating/updating users (live). |
| tests/Integration/Requests/FileCabinets/Upload/ReplaceAPDFDocumentSectionTest.php | Adds integration test for replacing a PDF section. |
| tests/Integration/Requests/FileCabinets/Upload/AppendFilesToADataRecordTest.php | Adds integration tests for appending file(s) to a record (one test skipped). |
| tests/Integration/Requests/FileCabinets/Upload/AppendASinglePDFToADocumentTest.php | Adds integration test for appending a single PDF. |
| tests/Integration/Requests/FileCabinets/Search/GetDocumentsFromAFileCabinetTest.php | Adds integration test for listing documents in a cabinet. |
| tests/Integration/Requests/FileCabinets/Search/GetASpecificDocumentFromAFileCabinetTest.php | Adds integration test for fetching a document by ID. |
| tests/Integration/Requests/FileCabinets/General/GetFileCabinetInformationTest.php | Adds integration test for file cabinet info. |
| tests/Integration/Requests/FileCabinets/Dialogs/GetDialogsOfASpecificTypeTest.php | Adds integration test for dialogs-by-type. |
| tests/Integration/Requests/FileCabinets/Dialogs/GetASpecificDialogTest.php | Adds integration test for specific dialog lookup. |
| tests/Integration/Requests/FileCabinets/Dialogs/GetAllDialogs.php | Adds integration test for listing all dialogs. |
| tests/Integration/Requests/Fields/GetFieldsRequestTest.php | Adds integration test for cabinet fields. |
| tests/Integration/Requests/Documents/Thumbnail/GetDocumentDownloadThumbnailRequestTest.php | Adds integration test for thumbnail download DTO mapping. |
| tests/Integration/Requests/Documents/Sections/GetTextshotTest.php | Adds integration test for textshot extraction and mapping. |
| tests/Integration/Requests/Documents/Sections/GetASpecificSectionTest.php | Adds integration test for section-by-id request. |
| tests/Integration/Requests/Documents/Sections/GetAllSectionsFromADocumentTest.php | Adds integration test for sections list mapping. |
| tests/Integration/Requests/Documents/Sections/DeleteSectionTest.php | Adds integration test for deleting a section. |
| tests/Integration/Requests/Documents/PutDocumentFieldsRequestTest.php | Adds integration tests for updating index values. |
| tests/Integration/Requests/Documents/PostDocumentRequestTest.php | Adds integration tests for uploading data-record documents (with/without files). |
| tests/Integration/Requests/Documents/GetDocumentPreviewRequestTest.php | Adds integration test for preview download size. |
| tests/Integration/Requests/Documents/GetDocumentCountRequestTest.php | Adds integration test for total document count. |
| tests/Integration/Requests/Documents/Download/DownloadThumbnailTest.php | Adds integration test for thumbnail download mapping. |
| tests/Integration/Requests/Documents/Download/DownloadSectionTest.php | Adds integration test for section download. |
| tests/Integration/Requests/Documents/Download/DownloadDocumentTest.php | Adds integration test for document download. |
| tests/Integration/Requests/Documents/DocumentsTrashBin/RestoreDocumentsFromTrashBinTest.php | Adds integration test for trash restore behavior. |
| tests/Integration/Requests/Documents/DocumentsTrashBin/GetDocumentsFromTrashBinTest.php | Adds integration tests for trash search builder behaviors. |
| tests/Integration/Requests/Documents/DocumentsTrashBin/DeleteDocumentsFromTrashBinTest.php | Adds integration test for trash batch delete. |
| tests/Integration/Requests/Documents/ClipUnclipStapleUnstaple/UnstapleTest.php | Adds integration test for unstaple operation. |
| tests/Integration/Requests/Documents/ClipUnclipStapleUnstaple/UnclipTest.php | Adds integration test for unclip operation. |
| tests/Integration/Requests/Documents/ClipUnclipStapleUnstaple/StapleTest.php | Adds integration test for staple operation. |
| tests/Integration/Requests/Documents/ClipUnclipStapleUnstaple/ClipTest.php | Adds integration test for clip operation. |
| tests/Integration/Requests/Documents/ApplicationProperties/ApplicationPropertiesTest.php | Adds integration test for CRUD on application properties. |
| tests/Integration/DocuWareTest.php | Makes WebClient URL generation respect configurable platform path. |
| tests/Integration/DocuWareAuthenticationTest.php | Adds integration coverage for OAuth discovery/config + credential auth behavior. |
| tests/Fixtures/saloon/get-organization.json | Adds recorded Saloon fixture file for GetOrganization. |
| tests/Feature/SaloonFixtures/GetOrganizationFixtureTest.php | Adds CI-friendly fixture test verifying response mapping. |
| src/Support/ParseValue.php | Hardens parsing for dates/keywords/tables and improves type annotations. |
| src/Support/JsonArrays.php | Adds helper to normalize decoded JSON into string-keyed rows / record lists. |
| src/Support/Auth.php | Hardens cookie-cache typing and adds phpdoc types. |
| src/Responses/Workflow/GetDocumentWorkflowHistoryResponse.php | Uses JsonArrays normalization before DTO mapping. |
| src/Responses/Search/GetTrashSearchResponse.php | Tightens method signature types for paging params. |
| src/Responses/Search/GetSearchResponse.php | Tightens method signature types for paging params. |
| src/Responses/General/UserManagement/GetUsers/GetUsersResponse.php | Normalizes user arrays and narrows return type to Collection<int, User>. |
| src/Responses/General/UserManagement/GetModifyRoles/GetRolesResponse.php | Normalizes role arrays and narrows return type to Collection<int, Role>. |
| src/Responses/General/UserManagement/GetModifyGroups/GetGroupsResponse.php | Normalizes group arrays and narrows return type to Collection<int, Group>. |
| src/Responses/General/Organization/GetOrganizationResponse.php | Normalizes organization arrays and narrows return type to Collection<int, Organization>. |
| src/Responses/General/Organization/GetAllFileCabinetsAndDocumentTraysResponse.php | Normalizes cabinet arrays and narrows return type to Collection<int, FileCabinet>. |
| src/Responses/FileCabinets/Search/GetDocumentsFromAFileCabinetResponse.php | Tightens paging param types in response factory. |
| src/Responses/FileCabinets/Dialogs/GetAllDialogsResponse.php | Normalizes dialog arrays and narrows return type. |
| src/Responses/Fields/GetFieldsResponse.php | Normalizes fields arrays and narrows return type. |
| src/Responses/Documents/UpdateIndexValues/UpdateIndexValuesResponse.php | Normalizes field arrays prior to mapping to parsed values. |
| src/Responses/Documents/Sections/GetAllSectionsFromADocumentResponse.php | Normalizes section arrays prior to DTO mapping. |
| src/Responses/Documents/ApplicationProperties/GetApplicationPropertiesResponse.php | Returns typed Collection of properties with normalized record shapes. |
| src/Requests/Workflow/GetDocumentWorkflowHistory.php | Adds explicit DTO typing annotation for response collection. |
| src/Requests/Search/GetSearchRequest.php | Improves phpdoc typing for constructor/body. |
| src/Requests/General/UserManagement/GetUsers/GetUsersOfARole.php | Narrows DTO type to Collection<int, User>. |
| src/Requests/General/UserManagement/GetUsers/GetUsersOfAGroup.php | Narrows DTO type to Collection<int, User>. |
| src/Requests/General/UserManagement/GetUsers/GetUsers.php | Narrows DTO type to Collection<int, User>. |
| src/Requests/General/UserManagement/GetModifyRoles/RemoveUserFromARole.php | Adds typing docs for IDs and request body shape. |
| src/Requests/General/UserManagement/GetModifyRoles/GetRoles.php | Narrows DTO type to Collection<int, Role>. |
| src/Requests/General/UserManagement/GetModifyRoles/GetAllRolesForASpecificUser.php | Narrows DTO type to Collection<int, Role>. |
| src/Requests/General/UserManagement/GetModifyRoles/AddUserToARole.php | Adds typing docs for IDs and request body shape. |
| src/Requests/General/UserManagement/GetModifyGroups/RemoveUserFromAGroup.php | Adds typing docs for IDs and request body shape. |
| src/Requests/General/UserManagement/GetModifyGroups/GetGroups.php | Narrows DTO type to Collection<int, Group>. |
| src/Requests/General/UserManagement/GetModifyGroups/GetAllGroupsForASpecificUser.php | Narrows DTO type to Collection<int, Group>. |
| src/Requests/General/UserManagement/GetModifyGroups/AddUserToAGroup.php | Adds typing docs for IDs and request body shape. |
| src/Requests/General/UserManagement/CreateUpdateUsers/UpdateUser.php | Adds typed body phpdoc. |
| src/Requests/General/UserManagement/CreateUpdateUsers/CreateUser.php | Adds typed body phpdoc. |
| src/Requests/General/Organization/GetOrganization.php | Narrows DTO type to Collection<int, Organization>. |
| src/Requests/General/Organization/GetLoginToken.php | Adds typing docs for payload shape. |
| src/Requests/General/Organization/GetAllFileCabinetsAndDocumentTrays.php | Narrows DTO type to Collection<int, FileCabinet>. |
| src/Requests/FileCabinets/Upload/ReplaceAPDFDocumentSection.php | Adds typed multipart body phpdoc. |
| src/Requests/FileCabinets/Upload/CreateDataRecord.php | Adds storeDialogId support and richer index typing. |
| src/Requests/FileCabinets/Upload/AppendFilesToADataRecord.php | Adds explicit multipart typing for appended files. |
| src/Requests/FileCabinets/Upload/AppendASinglePDFToADocument.php | Adds typed multipart body phpdoc. |
| src/Requests/FileCabinets/Search/GetDocumentsFromAFileCabinet.php | Adds typing docs for requested fields list. |
| src/Requests/FileCabinets/CheckInCheckOut/UndoDocumentCheckout.php | Adds request for undo checkout via ProcessDocumentAction. |
| src/Requests/FileCabinets/CheckInCheckOut/CheckoutDocumentToFileSystem.php | Adds checkout-to-filesystem request and DTO mapping. |
| src/Requests/FileCabinets/CheckInCheckOut/CheckInDocumentFromFileSystem.php | Adds multipart check-in request. |
| src/Requests/FileCabinets/Batch/BatchDocumentsUpdateFields.php | Adds batch update fields request with raw JSON payload support. |
| src/Requests/Fields/GetFieldsRequest.php | Narrows DTO type to Collection<int, Field>. |
| src/Requests/Documents/UpdateIndexValues/UpdateIndexValues.php | Broadens allowed index DTO types and improves typing docs. |
| src/Requests/Documents/Stamps/GetStamps.php | Adds request for listing stamps. |
| src/Requests/Documents/Stamps/AddDocumentAnnotations.php | Adds request for posting annotations/stamps payload. |
| src/Requests/Documents/Sections/GetAllSectionsFromADocument.php | Narrows DTO type to Collection<int, Section>. |
| src/Requests/Documents/ModifyDocuments/TransferDocument.php | Improves imports and typing docs for transferred fields. |
| src/Requests/Documents/DocumentsTrashBin/RestoreDocuments.php | Adds typing docs for IDs/body shape. |
| src/Requests/Documents/DocumentsTrashBin/GetDocuments.php | Adds typing docs for search condition body. |
| src/Requests/Documents/DocumentsTrashBin/DeleteDocuments.php | Adds typing docs for IDs/body shape. |
| src/Requests/Documents/ClipUnclipStapleUnstaple/Unstaple.php | Adds typed body phpdoc. |
| src/Requests/Documents/ClipUnclipStapleUnstaple/Unclip.php | Adds typed body phpdoc. |
| src/Requests/Documents/ClipUnclipStapleUnstaple/Staple.php | Adds typing docs for document list and body shape. |
| src/Requests/Documents/ClipUnclipStapleUnstaple/Clip.php | Adds typing docs for document list and body shape. |
| src/Requests/Documents/ApplicationProperties/UpdateApplicationProperties.php | Adds typed defaultBody return type + property list typing. |
| src/Requests/Documents/ApplicationProperties/DeleteApplicationProperties.php | Adds typed defaultBody return type + propertyNames typing. |
| src/Requests/Documents/ApplicationProperties/AddApplicationProperties.php | Adds typed defaultBody return type + properties typing. |
| src/Requests/Authentication/OAuth/RequestTokenWithCredentialsTrustedUser.php | Adds typed defaultBody phpdoc. |
| src/Requests/Authentication/OAuth/RequestTokenWithCredentials.php | Adds typed defaultBody phpdoc. |
| src/Requests/Authentication/OAuth/GetResponsibleIdentityService.php | Applies configurable platform path to OAuth discovery endpoint. |
| src/Facades/DocuWare.php | Updates facade phpdoc return types to more precise generics. |
| src/DTO/Workflow/InstanceHistory.php | Normalizes step arrays and improves typing annotations. |
| src/DTO/Workflow/HistoryStep.php | Normalizes Info.Item to a consistent list-of-records shape. |
| src/DTO/TextshotPage.php | Normalizes raw JSON arrays before content extraction; improves typing. |
| src/DTO/Textshot.php | Normalizes pages records; improves typing. |
| src/DTO/SuggestionField.php | Adds typing annotations. |
| src/DTO/Section.php | Adds typing annotations. |
| src/DTO/General/UserManagement/GetUsers/User.php | Adds typing annotations. |
| src/DTO/General/UserManagement/GetUsers/RegionalSettings.php | Adds typing annotations. |
| src/DTO/General/UserManagement/GetUsers/OutOfOffice.php | Adds typing annotations. |
| src/DTO/General/UserManagement/GetModifyRoles/Role.php | Adds typing annotations. |
| src/DTO/General/UserManagement/GetModifyGroups/Group.php | Adds typing annotations. |
| src/DTO/General/UserManagement/CreateUpdateUser/User.php | Adds typing annotations. |
| src/DTO/General/Organization/OrganizationIndex.php | Adds typing annotations. |
| src/DTO/General/Organization/Organization.php | Adds typing annotations for nested arrays. |
| src/DTO/General/Organization/FileCabinet.php | Adds typing annotations. |
| src/DTO/FileCabinets/General/FileCabinetInformation.php | Adds typing annotations. |
| src/DTO/FileCabinets/Dialog.php | Normalizes dialog Fields shape and improves typing. |
| src/DTO/FileCabinets/CheckoutToFileSystemResult.php | Adds DTO for checkout result and response mapping. |
| src/DTO/Documents/TrashDocumentPaginator.php | Hardens header/row mapping and normalizes record shapes. |
| src/DTO/Documents/TableRow.php | Normalizes field rows and improves typing. |
| src/DTO/Documents/Field.php | Adds typing annotations. |
| src/DTO/Documents/DocumentThumbnail.php | Adds typing annotations. |
| src/DTO/Documents/DocumentsTrashBin/RestoreDocuments.php | Normalizes failed item shapes and improves typing. |
| src/DTO/Documents/DocumentsTrashBin/DeleteDocuments.php | Normalizes failed item shapes and improves typing. |
| src/DTO/Documents/DocumentPaginator.php | Hardens Items parsing and improves typing consistency. |
| src/DTO/Documents/DocumentIndex/PrepareDTO.php | Adds phpdoc for index collection typing and return shapes. |
| src/DTO/Documents/DocumentIndex/IndexTextDTO.php | Adds typed values() return doc. |
| src/DTO/Documents/DocumentIndex/IndexTableDTO.php | Hardens row processing and adds typing docs. |
| src/DTO/Documents/DocumentIndex/IndexNumericDTO.php | Adds typed values() return doc. |
| src/DTO/Documents/DocumentIndex/IndexMemoDTO.php | Adds typed values() return doc. |
| src/DTO/Documents/DocumentIndex/IndexKeywordDTO.php | Adds typed values() return doc. |
| src/DTO/Documents/DocumentIndex/IndexDetectDTO.php | Narrows make return type to the actual DTO union. |
| src/DTO/Documents/DocumentIndex/IndexDecimalDTO.php | Adds typed values() return doc. |
| src/DTO/Documents/DocumentIndex/IndexDateTimeDTO.php | Narrows fallback return type and adds typed values() return doc. |
| src/DTO/Documents/DocumentIndex/IndexDateDTO.php | Narrows fallback return type and adds typed values() return doc. |
| src/DTO/Documents/DocumentField.php | Adds typing docs for value union. |
| src/DTO/Documents/Document.php | Normalizes list fields/sections/suggestions and hardens extension extraction. |
| src/DTO/Authentication/OAuth/ResponsibleIdentityService.php | Adds typing annotations. |
| src/DTO/Authentication/OAuth/RequestToken.php | Adds typing annotations. |
| src/DTO/Authentication/OAuth/IdentityServiceConfiguration.php | Normalizes “supported” arrays to string lists and improves typing. |
| src/DocuWareUrl.php | Applies configurable platform path when generating WebClient integration URL. |
| src/DocuWareSearchRequestBuilder.php | Adds stronger typing and updated filter handling for search/trash builder. |
| src/Connectors/DocuWareConnector.php | Applies configurable platform path to base URL and refactors token retrieval + cache TTL calculation. |
| README.md | Documents platform path, test suites, Saloon fixtures, and Postman parity references. |
| phpunit.xml.dist | Splits PHPUnit suites into default and integration (and updates schema). |
| phpstan.neon.dist | Increases PHPStan level. |
| docs/postman-parity.md | Adds Postman vs package parity matrix documentation. |
| config/laravel-docuware.php | Adds platform_path config and expands tests.* config keys. |
| composer.json | Updates runtime/dev dependencies and introduces test suite scripts (test, test:live, test:manual). |
| .github/workflows/run-tests.yml | Updates CI matrix for newer PHP/Laravel and changes how tests run. |
| .github/workflows/phpstan.yml | Updates PHP version for PHPStan workflow. |
| .github/workflows/fix-php-code-style-issues.yml | Switches Pint workflow to install deps and run vendor/bin/pint. |
| .github/workflows/dependabot-auto-merge.yml | Updates Dependabot metadata action version and sets Node env flag. |
| .github/workflows/composer-audit.yml | Adds scheduled/on-change composer audit workflow. |
| .github/ISSUE_TEMPLATE/bug_report.yml | Updates default PHP/Laravel version placeholders. |
| .env.example | Adds Postman→env mapping and new platform/test env vars. |
Comments suppressed due to low confidence (1)
.github/workflows/run-tests.yml:53
- This workflow runs
vendor/bin/pestwithout selecting a testsuite, which will execute theintegrationsuite too (live DocuWare calls). On PRs from forks,secrets.*env vars are unavailable, so CI will likely fail. Consider runningcomposer test(orvendor/bin/pest --testsuite=default) here, and runtest:liveonly in a separate workflow/job that is restricted to trusted contexts.
- name: Run Pest tests
run: vendor/bin/pest
env:
DOCUWARE_URL: ${{ secrets.DOCUWARE_URL }}
DOCUWARE_USERNAME: ${{ secrets.DOCUWARE_USERNAME }}
DOCUWARE_PASSWORD: ${{ secrets.DOCUWARE_PASSWORD }}
DOCUWARE_COOKIES: ${{ secrets.DOCUWARE_COOKIES }}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public function filterDate(string $name, string $operator, Carbon $date): self | ||
| { | ||
| $date = $this->exactDateTime($date, $operator); | ||
|
|
||
| $this->makeSureFilterDateRangeIsCorrect($name, $operator); | ||
|
|
||
| $this->filters[$name][] = $date; | ||
| $this->filters[$name] = array_values($this->filters[$name]); | ||
|
|
There was a problem hiding this comment.
filterDate can leave $this->filters[$name] with non-sequential numeric keys because makeSureFilterDateRangeIsCorrect may unset a previous entry. When this array is later assigned to condition[].Value, JSON encoding will produce an object instead of a list, which can break the DocuWare API request shape. Re-index the filter array after any unset (e.g., array_values) or avoid unset by overwriting the existing index.
| public function resolveEndpoint(): string | ||
| { | ||
| return '/FileCabinets/'.$this->fileCabinetId.'/Documents'; | ||
| $path = '/FileCabinets/'.$this->fileCabinetId.'/Documents'; | ||
|
|
||
| if ($this->storeDialogId !== null && $this->storeDialogId !== '') { | ||
| $path .= '?StoreDialogId='.rawurlencode($this->storeDialogId); | ||
| } | ||
|
|
||
| return $path; |
There was a problem hiding this comment.
CreateDataRecord::resolveEndpoint appends ?StoreDialogId=... directly to the endpoint string. In Saloon this can make query handling inconsistent (e.g., merging with other query params, consistent encoding, cache keys), since queries are typically provided via defaultQuery()/query() rather than embedded in the path. Prefer moving StoreDialogId into defaultQuery() when set and keep resolveEndpoint() as a pure path.
No description provided.