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

[EasyActivity] Incorrect subject data for create action #887

Open
itorgov opened this issue Mar 31, 2022 · 4 comments
Open

[EasyActivity] Incorrect subject data for create action #887

itorgov opened this issue Mar 31, 2022 · 4 comments
Assignees

Comments

@itorgov
Copy link
Contributor

itorgov commented Mar 31, 2022

Describe the bug
EasyActivity creates logs with incorrect subject data for created entity while using a transaction.

To Reproduce

class PaymentMethod
{
    public function __construct(
        private string $description,
        private bool $preferred,
    ) {
        // The body is not required
    }

    public function setPreferred(bool $preferred): self
    {
        $this->preferred = $preferred;

        return $this;
    }
}

$paymentMethod = new PaymentMethod(description: 'something', preferred: true);

$this->entityManager->persist($paymentMethod);

$this->entityManager->transactional(function () use ($paymentMethod) {
    $paymentMethod->setPreferred(false);

    $this->entityManager->flush();

    $paymentMethod->setPreferred(true);
});

I'm getting the ['preferred' => true] subject data.

Expected behavior
I'm expecting to get the ['description' => 'something', 'preferred' => true] subject data.

@natepage
Copy link
Member

@itorgov is this issue still actual?

@natepage
Copy link
Member

natepage commented Oct 5, 2023

@itorgov is this still an issue?

@itorgov
Copy link
Contributor Author

itorgov commented Oct 5, 2023

@natepage Yes, it's still actual. I've reproduced it on eonx-com/easy-activity:5.3.2.

@natepage
Copy link
Member

natepage commented Oct 6, 2023

@itorgov thanks for checking, do you need help with this?

@itorgov itorgov self-assigned this Oct 6, 2023
itorgov added a commit that referenced this issue Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants