Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PW-8369] Type mismatch between NotificationEntity and ProcessNotificationHandler::markAsProcessing() #376

Open
timkoopmans50 opened this issue Apr 25, 2023 · 2 comments
Assignees

Comments

@timkoopmans50
Copy link

timkoopmans50 commented Apr 25, 2023

Describe the bug
Type error.

Versions
Shopware version: 6.4.17.2
Plugin version: 3.11.0

To Reproduce
Steps to reproduce the behavior:

  1. Create a situation where the $merchantReference will be null.
  2. Task will now fail on a typerror.

Expected behavior
The merchantReference should either be nullable throughout the whole application or always be a string.

CODE SNIPPETS:

This :
https://github.com/Adyen/adyen-shopware6/blob/3.11.0/src/Entity/Notification/NotificationEntity.php#L51
https://github.com/Adyen/adyen-shopware6/blob/3.11.0/src/Entity/Notification/NotificationEntity.php#L153

Does not match types with this: (NULL would result in type error)
https://github.com/Adyen/adyen-shopware6/blob/3.11.0/src/ScheduledTask/ProcessNotificationsHandler.php#L382

@timkoopmans50
Copy link
Author

Please note that if you encounter this condition your whole task manager will not function anymore, which for big webshops results in major financial damage.

@candemiralp candemiralp changed the title Type mismatch between NotificationEntity and ProcessNotificationHandler::markAsProcessing() [PW-8369] Type mismatch between NotificationEntity and ProcessNotificationHandler::markAsProcessing() Apr 26, 2023
@candemiralp candemiralp self-assigned this Apr 26, 2023
@candemiralp
Copy link
Member

Hello @timkoopmans50,

Thank you for raising this issue. You are right, that TypeError most probably won't be caught. We created an internal ticket to investigate and solve this issue. We will update you when it is done.

Best Regards,
Can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants