Skip to content

chore(ad-hoc): clean up deprecation warnings - #550

Merged
andrii-vysotskyi-cko merged 9 commits into
masterfrom
chore/silence-typed-representation-deprecations
Nov 9, 2026
Merged

andrii-vysotskyi-cko merged 9 commits into
masterfrom
chore/silence-typed-representation-deprecations

Conversation

@andrii-vysotskyi-cko

@andrii-vysotskyi-cko andrii-vysotskyi-cko commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Clean up build warnings. Deprecating POTypedRepresentation.wrappedValue only warned on property declarations, never on access.

Solution

  • Deprecate @POTypedRepresentation properties instead, pointing to $<name>.typed; migrate internal reads.
  • Silence DeprecatedDeclaration in backward-compatible delegate defaults with @diagnose, guarded by #if hasAttribute(diagnose).
  • Remove redundant AuthenticationError: Sendable conformance (Error already refines Sendable).
  • Add @unknown default to two native APM switches and replace a scoped UIKit import (library evolution warnings).
  • Raise test targets to iOS 17 to fix linker warnings.
  • README: require Xcode 26.2+ and list ProcessOutCoreUI.

Notes

  • Apps that read these properties as strings will now see deprecation warnings, as originally intended.

Deprecating POTypedRepresentation.wrappedValue never warned on property
access, only on wrapped property declarations. Deprecate the wrapped
properties themselves so that reading the raw value warns and points
to the typed projection, and migrate internal usages to it.
…rnings

Default implementations of new delegate methods forward to their
deprecated counterparts to keep existing integrations working. Ignore
DeprecatedDeclaration on those bridges instead of deprecating them,
which would warn every conformer relying on optional defaults.
AuthenticationError conforms to Error, which already refines Sendable,
so the retroactive conformance is redundant and triggers a warning.
Testing and XCTest frameworks shipped with Xcode are built for iOS 17,
which made the linker warn for test bundles targeting iOS 16.
…ent switches

With library evolution enabled, PONativeAlternativePaymentElementV2 and
PONativeAlternativePaymentFormV2.Parameter may gain cases, so switching
over them needs @unknown default.
Scoped imports are not supported in module interfaces.
Require Xcode 26.2, the version pinned by CI, and list ProcessOutCoreUI
alongside other published modules.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The migration hint incorrectly treats typed as a property; the enum-backed wrapper requires $scheme.typed() to retrieve a POCardScheme?.

1 open issue
What changed in this PR

This PR cleans up warnings across the ProcessOut SDK, moving deprecation notices onto legacy properties so callers receive migration guidance when accessing them.

Changes:

  • Deprecate legacy wrapped properties and migrate internal reads to typed representations.
  • Suppress warnings in compatibility delegates and address library-evolution and redundant-conformance warnings.
  • Raise test deployment targets to iOS 17 and update development requirements and module documentation.
File Description
Tests/​ProcessOutTests/​Sources/​Integration/​CardsServiceTests.swift Compare typed preferred schemes.
Sources/​ProcessOutUI/​Sources/​Modules/​NativeAlternativePayment/​Interactor/​NativeAlternativePaymentDefaultInteractor.swift Add unknown-case switch fallbacks.
Sources/​ProcessOutUI/​Sources/​Modules/​CardUpdate/​Delegate/​POCardUpdateInformation.swift Deprecate legacy scheme properties.
Sources/​ProcessOutUI/​Sources/​Modules/​CardTokenization/​Delegate/​POCardTokenizationDelegate.swift Suppress compatibility warnings and use typed scheme access.
Sources/​ProcessOutUI/​Sources/​Modules/​CardScanner/​Interactor/​DefaultCardScannerInteractor.swift Replace the scoped UIKit import.
Sources/​ProcessOutCheckout3DS/​Sources/​Service/​POCheckout3DSServiceDelegate.swift Suppress deprecation warnings in compatibility defaults.
Sources/​ProcessOutCheckout3DS/​Sources/​Extensions/​Checkout3DS+Sendable.swift Remove redundant error conformance.
Sources/​ProcessOut/​Sources/​UI/​Modules/​NativeAlternativePaymentMethod/​Interactor/​PONativeAlternativePaymentMethodDelegate.swift Suppress deprecation warnings in compatibility defaults.
Sources/​ProcessOut/​Sources/​Services/​CustomerTokens/​DefaultCustomerTokensService.swift Read preferred scheme through its typed representation.
Sources/​ProcessOut/​Sources/​Services/​CustomerActions/​Requests/​PO3DS2Configuration.swift Deprecate the legacy scheme property.
Sources/​ProcessOut/​Sources/​Repositories/​Invoices/​Requests/​POInvoiceAuthorizationRequest.swift Deprecate the legacy preferred-scheme property.
Sources/​ProcessOut/​Sources/​Repositories/​CustomerTokens/​Responses/​POCustomerToken.swift Deprecate the string-backed token type property.
Sources/​ProcessOut/​Sources/​Repositories/​CustomerTokens/​Requests/​POAssignCustomerTokenRequest.swift Deprecate the legacy preferred-scheme property.
Sources/​ProcessOut/​Sources/​Repositories/​Cards/​Responses/​POCardIssuerInformation.swift Deprecate legacy scheme properties.
Sources/​ProcessOut/​Sources/​Repositories/​Cards/​Responses/​POCard.swift Deprecate legacy scheme and CVC-check properties.
Sources/​ProcessOut/​Sources/​Repositories/​Cards/​Requests/​POCardUpdateRequest.swift Deprecate the legacy preferred-scheme property.
Sources/​ProcessOut/​Sources/​Repositories/​Cards/​Requests/​POCardTokenizationRequest.swift Deprecate the legacy preferred-scheme property.
Sources/​ProcessOut/​Sources/​Core/​Utils/​POTypedRepresentation.swift Remove deprecation from the wrapper’s wrappedValue.
README.md Document ProcessOutCoreUI and require Xcode 26.2+.
project.yml Raise four test targets to iOS 17.
Example/​README.md Require Xcode 26.2+ for the example.

Review effort: Balanced

The enum-backed wrapper exposes typed() as a method.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the build-warning cleanup and migration to typed property access.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@andrii-vysotskyi-cko
andrii-vysotskyi-cko merged commit 73b6e4a into master Nov 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants