- Joined
- Jun 23, 2024
- Messages
- 14
- Reaction score
- 1
Hello,
Can you provide support for these two plugins to work together smoothly?
I can send you the Gift Upgrades plugin file for you to try.
Log error records :
Superclass or Interface Signature:
Subclass Signature (Incorrect):
Source of the Problem
array $options Definition is Missing: The array type is not specified in the subclass.
Return Type is Missing: The return type specified as XF\Mvc\Reply\AbstractReply in the superclass is not included in the subclass.
I have told you what I know. I thank you in advance. I wish you good work.
I encountered an issue while using the [Xen-Soluce] User Upgrade Duration add-on. The error is caused by a method signature mismatch, as shown below:
The issue is that the actionGift method in the XenSoluce\UserUpgradeDuration\NF\GiftUpgrades\ControllerPlugin\Gift class is not fully compatible with the method signature in the NF\GiftUpgrades\ControllerPlugin\Gift class.
In the parent class, the method is defined as follows:
However, in your add-on, it is defined as:
To fix the issue, I made the following changes:
Added array type to the $options parameter.
Defined the return type as : AbstractReply.
The corrected code:
With this fix, the issue has been resolved. I believe this adjustment should be included in the next version of your add-on.
Thank you.
But after everything, it wants to select a time period during purchase. It gives an error because we cannot make a selection on that screen.
Sorry for spamming.
Can you provide support for these two plugins to work together smoothly?
I can send you the Gift Upgrades plugin file for you to try.
Log error records :
PHP:
ErrorException: Fatal Error: Declaration of XenSoluce\UserUpgradeDuration\NF\GiftUpgrades\ControllerPlugin\Gift::actionGift(XF\Mvc\Entity\Entity $entity, $options = []) must be compatible with NF\GiftUpgrades\ControllerPlugin\Gift::actionGift(XF\Mvc\Entity\Entity $entity, array $options = []): XF\Mvc\Reply\AbstractReply src/addons/XenSoluce/UserUpgradeDuration/NF/GiftUpgrades/ControllerPlugin/Gift.php:19
Superclass or Interface Signature:
Code:
NF\GiftUpgrades\ControllerPlugin\Gift::actionGift(
XF\Mvc\Entity\Entity $entity,
array $options = []
): XF\Mvc\Reply\AbstractReply
Subclass Signature (Incorrect):
Code:
XenSoluce\UserUpgradeDuration\NF\GiftUpgrades\ControllerPlugin\Gift::actionGift(
XF\Mvc\Entity\Entity $entity,
$options = []
)
Source of the Problem
array $options Definition is Missing: The array type is not specified in the subclass.
Return Type is Missing: The return type specified as XF\Mvc\Reply\AbstractReply in the superclass is not included in the subclass.
I have told you what I know. I thank you in advance. I wish you good work.
I encountered an issue while using the [Xen-Soluce] User Upgrade Duration add-on. The error is caused by a method signature mismatch, as shown below:
Code:
Declaration of XenSoluce\UserUpgradeDuration\NF\GiftUpgrades\ControllerPlugin\Gift::actionGift(XF\Mvc\Entity\Entity $entity, $options = []) must be compatible with NF\GiftUpgrades\ControllerPlugin\Gift::actionGift(XF\Mvc\Entity\Entity $entity, array $options = []): XF\Mvc\Reply\AbstractReply
The issue is that the actionGift method in the XenSoluce\UserUpgradeDuration\NF\GiftUpgrades\ControllerPlugin\Gift class is not fully compatible with the method signature in the NF\GiftUpgrades\ControllerPlugin\Gift class.
In the parent class, the method is defined as follows:
Code:
public function actionGift(Entity $entity, array $options = []): AbstractReply
However, in your add-on, it is defined as:
Code:
public function actionGift(Entity $entity, $options = [])
To fix the issue, I made the following changes:
Added array type to the $options parameter.
Defined the return type as : AbstractReply.
The corrected code:
Code:
public function actionGift(Entity $entity, array $options = []): AbstractReply
With this fix, the issue has been resolved. I believe this adjustment should be included in the next version of your add-on.
Thank you.
But after everything, it wants to select a time period during purchase. It gives an error because we cannot make a selection on that screen.
Sorry for spamming.