webtrees
webtrees copied to clipboard
Update ModuleCustomTrait.php
Adding an additional method call to allow the processing of the response from the get latest version request. With this it would be possible for me to query the version information directly from githubs release json without the need for an exta latest-release.txt file. Using the method I could easily parse the JSON response and extract the version information.
Do you got some time to look at this?
I don't think this is necessary - why don't you just adjust customModuleLatestVersion()
in your custom module, according to your specific needs? (Adjustments of that method are required anyway in case of a different versioning scheme, and/or a different cache expiration period, or should we have separate methods for these as well? I don't think so.)
Because of duplicate code. You should avoid it where ever it is possible. As "customModuleLatestVersion" is a method from the core there is always a possibility of change. Maybe it contains a bug, so it would require me to fix this in my module too but my module shouldn't know about the core. So intercepting the core code using a callback or hook would be the better solution instead of duplicating it. Currently the method only accepts a single solution of querying module information without greatly modifying it.
Seems: will not be implemented->close