#26971 closed enhancement (wontfix)
Plugin version string "0.9.8+git" shouldn't compare to less than "0.9.8" and trigger update notifications
Reported by: | lkraav | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8 |
Component: | Plugins | Keywords: | |
Focuses: | Cc: |
Description
Quite often I have had to clone plugin repos to patch errors or add features. This creates a problem where plugin header needs to be modified to differentiate instances in Plugins list. Conceptually, it feels like a sensible thing to modify the version string to something like "0.9.8+git", compared to modifying the plugin name. After all, we're not changing the name.
As summary states, we get an update notification unless a workaround such as "0.9.8.9999+git" is used. Feels clumsy and unnecessary.
Does this make sense to have for anybody else but me? If I come up with a simplistic patch, are there some big hidden version string comparison dragons to consider off the top?
Btw Trac doesn't seem to have a 3.8.1 version string registered yet. Ping @nacin
Change History (3)
#2
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
Changing version_compare()
behavior, e.g. with a custom function, is not feasible, as plugins might be relying on PHP's version_compare()
behavior internally, e.g. to update DB options or whatever (although that's of course better done with an integer DB version variable). Those would still cause trouble for you, even if core's plugin version string comparision would change.
You should use that pl
/p
approach in your version numbers of modified plugins.
Added a 3.8.1 version, thanks. Though this goes back forever.
I don't think we should change http://php.net/version_compare behavior. In fact, we don't need to: You can use a fairly esoteric feature of version_compare(), "pl" or "p", which stands for "patch". On how you'd use it: http://stackoverflow.com/a/18492111.