Skip to content

[stable32] refactor: extract status services#6186

Merged
vitormattos merged 9 commits intostable32from
backport/6184/stable32
Dec 14, 2025
Merged

[stable32] refactor: extract status services#6186
vitormattos merged 9 commits intostable32from
backport/6184/stable32

Conversation

@backportbot-libresign
Copy link
Copy Markdown

Backport of PR #6184

Created dedicated service to handle file status management.
Includes updateFileStatusIfUpgrade to upgrade file status and
canNotifySigners to validate if file status allows notifications.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Created dedicated service to manage sign request status determination
and validation. Implements shouldNotifySignRequest, canNotifySignRequest,
updateStatusIfAllowed, determineInitialStatus, and private helper methods
for status calculation based on file status, signer status, signing order,
and flow type (parallel/sequential).

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Injected FileStatusService and SignRequestStatusService to delegate
all status-related operations. Removed status determination methods
and notification validation logic, delegating to specialized services.
Updated method calls to use appropriate service methods.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Created test suite with 23 tests covering all file status upgrade
scenarios and notification validation. Uses PHP 8 DataProvider
attributes for parameterized testing.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Created test suite with 53 tests validating business rules for sign
request status determination. Covers notification scenarios, status
updates, and initial status calculation based on file status, signer
status, signing order, and flow type. Uses PHP 8 DataProvider
attributes for parameterized testing.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Updated tests to inject FileStatusService and SignRequestStatusService
mocks. Added specific tests validating parallel and ordered flow
behavior with correct parameter ordering for determineInitialStatus.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…ervice

IAppConfig was injected but never used in any method.
Removed dependency to clean up constructor.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Removed IAppConfig mock from test setup to match updated
service constructor signature.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Dec 14, 2025
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (32) milestone Dec 14, 2025
@vitormattos vitormattos merged commit b06402b into stable32 Dec 14, 2025
60 checks passed
@vitormattos vitormattos deleted the backport/6184/stable32 branch December 14, 2025 17:14
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant