Automattic / wordpress-activitypub

ActivityPub for WordPress
https://wordpress.org/plugins/activitypub/
MIT License
496 stars 76 forks source link

Use version constant directly #985

Closed obenland closed 1 week ago

obenland commented 1 week ago

Since ACTIVITYPUB_PLUGIN_VERSION gets defined at the top of activitypub.php, get_plugin_version() will always return that and never fall back to the plugin meta information.

Not sure if 4.2.0 is the right version number in the deprecation documentation. Not sure even if deprecating function is something this plugin does, or if it breaks back compat.

Proposed changes:

obenland commented 1 week ago

@pfefferle Do you have any guidance on this?

Not sure if 4.2.0 is the right version number in the deprecation documentation. Not sure even if deprecating function is something this plugin does, or if it breaks back compat.

pfefferle commented 1 week ago

@obenland Oh, haven't seen that, sorry!

We follow semantic versioning, so fully removing the functions would have required a 5.0.0 release due to the breaking change. Since you retained the functions and added a deprecation warning, opting for the next possible minor version makes total sense.

obenland commented 1 week ago

Do you have a preference one way or the other?

pfefferle commented 1 week ago

Exactly like you've done it: https://github.com/Automattic/wordpress-activitypub/pull/968/files#diff-2fb16a1f775688a0027ff486df52ce4bb27d1c754b878990408219982d3205b4 ☺️

Keeping the old files/classes/functions for a while, add deprecation message and remove them with the next major version.