This module is simply about exposing available updates in a consumable format by other clients (JSON).

The result of this module can be explored for a display in a fontend that exposes for example a dashborad displaying a set of Drupal projects.

Project link

https://www.drupal.org/project/available_updates

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/available_updates.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-available_upda...

Comments

nassaz created an issue. See original summary.

nassaz’s picture

Issue summary: View changes
apaderno’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +PAreview: single application approval

Thank you for applying! I added the Git instructions for non-maintainer users. Users will review the project and report what needs to be changed.

8.x-1.x-dev is a wrong branch name, which needs to be deleted and replaced by 8.x-1.x.

nassaz’s picture

Issue summary: View changes
nassaz’s picture

Status: Needs work » Needs review

Branch deleted. Thank you.

Rahulmon Johnson’s picture

Status: Needs review » Needs work

Thank you for the contribution.

Please look into the following errors too.

------ ----------------------------------------------------------------------------------------------------------------- 
  Line   /available_updates/src/Controller/AvailableUpdatesController.php  
 ------ ----------------------------------------------------------------------------------------------------------------- 
  51     Function update_calculate_project_data not found.                                                                
 ------ ----------------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------------------- 
  Line   /available_updates/tests/src/Functional/AvailableUpdatesTest.php  
 ------ ----------------------------------------------------------------------------------------------------------------- 
  43     Call to deprecated method getUsername() of class Drupal\user\Entity\User:                                        
         in Drupal 8.0.0, will be removed before Drupal 9.0.0.                                                            
         Use \Drupal\Core\Session\AccountInterface::getAccountName() or                                                   
         \Drupal\user\UserInterface::getDisplayName() instead.                                                            
 ------ ----------------------------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 2 errors       
nassaz’s picture

Status: Needs work » Needs review

Thank you @Rahulmon Johnson for your review, i don't understand the first error because the function exists in the dependency core module (update), the second error has been corrected, i use getAccountName instead.

I don't understand why drupal-check give this result !!

I opened an issue : https://github.com/mglaman/drupal-check/issues/101

Update Manager is a dependency of my module.

apaderno’s picture

update_calculate_project_data() is defined in core/modules/update/update.compare.inc. Having the module as dependecy doesn't mean that file is automatically loaded. You need to load it with $this->moduleHandler->loadInclude('update', 'inc', 'update.manager'), when using DI, or \Drupal::moduleHandler()->loadInclude('update', 'inc', 'update.manager').

nassaz’s picture

Thank you @kiamlaluno, code has been updated.

KuldeepM’s picture

Thank you for the contribution!

Please look into the following message(issue).
{"message":"The used authentication method is not allowed on this route."}

nassaz’s picture

I have a dependency module : - drupal:basic_auth, which is used to ensure this method. Please use 8.x-1.x branch.

Vernit’s picture

While reviewing the module and found Readme file is missing.
According to Drupal standards, modules should include a useful README.file.
https://www.drupal.org/docs/develop/documenting-your-project/module-docu...

Vernit’s picture

Status: Needs review » Needs work
nassaz’s picture

Status: Needs work » Needs review

Thank you @Vernit for your review, please use dev branch don't use release branch.

composer require 'drupal/available_updates:1.x-dev'

8.x-1.1 version is not up to date.

KuldeepM’s picture

hook_help() is missing.

nassaz’s picture

Thank @KuldeepM for your review, personally i don't like procedural code, it's important in your view hook_help() ?

apaderno’s picture

Issue summary: View changes
phthlaap’s picture

This issue still happen. Can anyone suggest a solution to fix it or we can by pass?

------ ----------------------------------------------------------------------------------------------------------------- 
  Line   /available_updates/src/Controller/AvailableUpdatesController.php  
 ------ ----------------------------------------------------------------------------------------------------------------- 
  51     Function update_calculate_project_data not found.                                                                
 ------ ----------------------------------------------------------------------------------------------------------------- 
nassaz’s picture

Thank you @phthlaap, i have the same error in drupal module core "Update"

 ------ --------------------------------------------------- 
  Line   src/Controller/UpdateController.php                
 ------ --------------------------------------------------- 
  52     Function update_calculate_project_data not found.  
 ------ --------------------------------------------------- 
vuil’s picture

Status: Needs review » Reviewed & tested by the community

Thank you for the contribution!

I have not found any security related issue into the code. Clever implementation!

nassaz’s picture

Thank you @ilchovuchkov for your review.

apaderno’s picture

Assigned: Unassigned » apaderno
Status: Reviewed & tested by the community » Fixed

Thank you for your contribution! I am going to update the project.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

vuil’s picture