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

Fix creation of dynamic property in core/flarum DispatchEventsTrait #87

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

thunder-al
Copy link
Contributor

@thunder-al thunder-al commented Jul 25, 2024

Fixes #84 #85

Changes proposed in this pull request:

Just renamed $user field of this event to $actor, because core/flarum DispatchEventsTrait trying to write ->actor field, which is not exists and php8.1+ fails because of deprecation error

  • Event/WillReactToPost.php

Reviewers should focus on:

seems to WillReactToPost::$actor is not reading or writing outside of the class.
maybe we should prefer getter methods instead of direct field access?

Screenshot

dont have any

Confirmed

  • Frontend changes: tested on a local Flarum installation.

  • Backend changes: tests are green (run composer test).

  • Tested it right on production by applying this path directly to vendor dir and liked a random post :3

Required changes:

Copy link
Member

@imorland imorland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this, and sorry for the extreme delay in looking at your PR!

@imorland imorland merged commit f25e0c7 into FriendsOfFlarum:master Sep 10, 2024
23 checks passed
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

Successfully merging this pull request may close these issues.

Resolve deprecation warnings on PHP 8.2+
2 participants