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

Deprecation notice: $firedFromAggregateRoot is deprecated #435

Closed
ahoiroman opened this issue Aug 25, 2023 · 2 comments · Fixed by #459
Closed

Deprecation notice: $firedFromAggregateRoot is deprecated #435

ahoiroman opened this issue Aug 25, 2023 · 2 comments · Fixed by #459
Labels
bug Something isn't working

Comments

@ahoiroman
Copy link

Using PHP 8.2, I am getting this deprecation notice, if I set 'dispatch_events_from_aggregate_roots' => true,:

DEPRECATED Creation of dynamic property ... $firedFromAggregateRoot is deprecated in vendor/spatie/laravel-event-sourcing/src/StoredEvents/StoredEvent.php on line 68.

Should be possible to allow dynamic props or define them?

@sebastiandedeyne
Copy link
Member

Hmm I'm not sure we can do this without a breaking change, so might have to live with it until our next major version… The warning is annoying but everything still works until PHP 9 when dynamic properties will be removed entirely.

If anyone has an idea how we can work around this in a non-breaking way, ideas welcome!

@sebastiandedeyne sebastiandedeyne added the bug Something isn't working label Jan 25, 2024
@inmanturbo
Copy link
Sponsor Contributor

@sebastiandedeyne can this not be solved using an #[\AllowDynamicProperties] attribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants