This commit adds the token value to the NotificationFailed $data parameter.
Context:
In our use case, we need to remove the token from our database when a notification fails due to a token being either expired or invalid.
Having this value passed in the event is safer than trying to retrieve said token from database as retrieving it could be subject to race conditions at scale (example: while notification is attempted, token is updated in database by user, notification fails then deletes the new token instead of the one that actually failed)
This commit adds the token value to the NotificationFailed $data parameter.
Context: In our use case, we need to remove the token from our database when a notification fails due to a token being either expired or invalid. Having this value passed in the event is safer than trying to retrieve said token from database as retrieving it could be subject to race conditions at scale (example: while notification is attempted, token is updated in database by user, notification fails then deletes the new token instead of the one that actually failed)