Aimeos Context Serialization Issue

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
sergey030
Posts: 6
Joined: 12 Dec 2024, 11:32

Re: Aimeos Context Serialization Issue

Post by sergey030 » 08 Jan 2025, 11:51

Hey, guys!
The problem turned out to be not in getDepositeOrder(), but in the event registration for plugins.
The problem is that in the listeners object there are closures here is an example of the object. How can I remove it from here ?
I have attached screenshots where there are closures in the listeners property.

Code: Select all


public function register(\Aimeos\MW\Observer\Publisher\Iface $p): \Aimeos\MW\Observer\Listener\Iface
{
    $p->attach($this->object(), 'addProduct.after');
    $p->attach($this->object(), 'deleteProduct.after');
    return $this;
}

Attachments
Снимок экрана 2025-01-08 в 13.50.28.png
Снимок экрана 2025-01-08 в 13.50.28.png (38.58 KiB) Viewed 776 times
Снимок экрана 2025-01-08 в 13.49.01.png
Снимок экрана 2025-01-08 в 13.49.01.png (90.61 KiB) Viewed 776 times

User avatar
aimeos
Administrator
Posts: 8447
Joined: 01 Jan 1970, 00:00

Re: Aimeos Context Serialization Issue

Post by aimeos » 11 Jan 2025, 15:40

Use this to remove all listeners:

Code: Select all

$orderItem->off()
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply