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

Update ModuleCustomTrait.php #3661

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

magicsunday
Copy link
Contributor

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.

@magicsunday
Copy link
Contributor Author

Do you got some time to look at this?

@ric2016
Copy link
Contributor

ric2016 commented Feb 20, 2021

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.)

@magicsunday
Copy link
Contributor Author

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.

Base automatically changed from master to main March 11, 2021 07:40
@arbor95
Copy link
Contributor

arbor95 commented Feb 25, 2024

Seems: will not be implemented->close

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.
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 35.31%. Comparing base (95621db) to head (f8cdec5).

Files with missing lines Patch % Lines
app/Module/ModuleCustomTrait.php 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3661      +/-   ##
============================================
- Coverage     35.31%   35.31%   -0.01%     
- Complexity    11406    11407       +1     
============================================
  Files          1179     1179              
  Lines         47865    47867       +2     
============================================
  Hits          16905    16905              
- Misses        30960    30962       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ekdahl
Copy link
Contributor

ekdahl commented Oct 31, 2024

Adding this would be great.

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.

5 participants