Problem/Motivation

Invalid APNs tokens should be able to be deleted.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ptmkenny created an issue. See original summary.

ptmkenny’s picture

Summary of implementation by Opus 4.8:

  dev/push_notifications_registration_tokens — deletion primitive

  - Added deleteTokensByValues(array): int to ProcessTokensInterface + ProcessTokens, reusing the existing
  condition('token', …, 'IN') query; returns the count deleted.

  dev/.../apns_php_integration — post-send pruner

  - New ApnsResponsePruner::pruneInvalidTokens(array $responses): int: classifies each response via validateToken, collects
  definitively-invalid device tokens, keeps tokens on any ApnsPhpException (logging $e::class so the category is
  recorded), then deletes via ProcessTokens.
  - New apns_php_integration.services.yml (logger channel + autowired pruner) and a kernel test (ApnsResponsePrunerTest)
  proving only the unregistered/bad tokens are deleted and transient/valid ones are kept.
  condition('token', …, 'IN') query; returns the count deleted.

  dev/.../apns_php_integration — post-send pruner

  - New ApnsResponsePruner::pruneInvalidTokens(array $responses): int: classifies each response via validateToken,
  collects definitively-invalid device tokens, keeps tokens on any ApnsPhpException (logging $e::class so the category
  is recorded), then deletes via ProcessTokens.
  - New apns_php_integration.services.yml (logger channel + autowired pruner) and a kernel test (ApnsResponsePrunerTest)
  proving only the unregistered/bad tokens are deleted and transient/valid ones are kept.

  • ptmkenny committed dd59f6b0 on 1.0.x
    feat: #3600679 APNs integration: add invalid token deletion
    
    By:...
ptmkenny’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.