Skip to content

Conversation

@LEDfan
Copy link
Member

@LEDfan LEDfan commented Jul 22, 2017

Fixes #5832

Maybe it's a good idea to mark \OC_app::disable as deprecated?

@mention-bot
Copy link

@LEDfan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bartv2, @icewind1991 and @blizzz to be potential reviewers.

@LEDfan LEDfan force-pushed the fix_uninstall_rep_step branch from 023c01b to d1fcdc7 Compare July 22, 2017 11:40
@LEDfan
Copy link
Member Author

LEDfan commented Jul 22, 2017

BTW it looks like the \OC_app::enable method actually also installs and downloads the app, maybe it's a good idea to move this code a downloadAndInstallApp method inside the appmanager and then call this method inside the enable method command? (

$appClass = new \OC_App();
)

And another interesting thing is that the installApp method of OC_App is not used according to PHPstorm and grep.

@LEDfan LEDfan force-pushed the fix_uninstall_rep_step branch from d1fcdc7 to f694c6c Compare July 23, 2017 09:48
@codecov
Copy link

codecov bot commented Jul 23, 2017

Codecov Report

Merging #5833 into master will increase coverage by 0.07%.
The diff coverage is 50%.

@@             Coverage Diff              @@
##             master    #5833      +/-   ##
============================================
+ Coverage     51.81%   51.88%   +0.07%     
+ Complexity    25354    25352       -2     
============================================
  Files          1606     1606              
  Lines         95077    95070       -7     
  Branches       1378     1378              
============================================
+ Hits          49260    49325      +65     
+ Misses        45817    45745      -72
Impacted Files Coverage Δ Complexity Δ
lib/base.php 2.15% <0%> (ø) 168 <0> (ø) ⬇️
lib/private/Updater.php 5.11% <0%> (ø) 117 <0> (ø) ⬇️
lib/private/legacy/app.php 58.87% <0%> (+0.98%) 195 <0> (-3) ⬇️
settings/ajax/disableapp.php 0% <0%> (ø) 0 <0> (ø) ⬇️
lib/private/App/AppManager.php 96.2% <100%> (+0.09%) 60 <0> (+1) ⬆️
apps/files_trashbin/lib/Trashbin.php 72.46% <0%> (-0.25%) 136% <0%> (ø)
lib/private/Files/ObjectStore/SwiftFactory.php 52.87% <0%> (+52.87%) 35% <0%> (ø) ⬇️
lib/private/Files/ObjectStore/Swift.php 75% <0%> (+75%) 8% <0%> (ø) ⬇️

@rullzer rullzer added this to the Nextcloud 13 milestone Aug 25, 2017
@MorrisJobke MorrisJobke added the 3. to review Waiting for reviews label Nov 15, 2017
@juliusknorr
Copy link
Member

Maybe it's a good idea to mark \OC_app::disable as deprecated?

Yes, let's get rid of that. Can you add that and check for other usages in the server code?

BTW it looks like the \OC_app::enable method actually also installs and downloads the app, maybe it's a good idea to move this code a downloadAndInstallApp method inside the appmanager and then call this method inside the enable method command?

Maybe that is more something for the Installer class. We should keep the install code separated from the app management.

And another interesting thing is that the installApp method of OC_App is not used according to PHPstorm and grep.

Good catch, although it has already been removed by a68895e 😉

@LEDfan LEDfan force-pushed the fix_uninstall_rep_step branch from f694c6c to 82ddfa1 Compare February 13, 2018 07:04
@LEDfan
Copy link
Member Author

LEDfan commented Feb 13, 2018

Yes, let's get rid of that. Can you add that and check for other usages in the server code?

Done, I removed the method because it's a private API.

I also removed the $enableAppsCache because it wasn't used anymore.

@MorrisJobke
Copy link
Member

I also removed the $enableAppsCache because it wasn't used anymore.

👍

Yes, let's get rid of that. Can you add that and check for other usages in the server code?

Looks good and I also didn't found any other apps using it.

@MorrisJobke
Copy link
Member

Let me rebase and review this one here.

LEDfan added 3 commits March 6, 2018 10:41
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
@MorrisJobke MorrisJobke force-pushed the fix_uninstall_rep_step branch from 82ddfa1 to 96a5752 Compare March 6, 2018 09:47
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@MorrisJobke
Copy link
Member

@nickvergessen @rullzer Please review as this is some crucial cleanup.

}

// emit disable hook - needed anymore ?
\OC_Hook::emit('OC_App', 'pre_disable', array('app' => $appId));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also fine with removing this, because I couldn't find any reference to this in any app or in the server itself. Also there is a new proper event dispatched just two lines below.

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't see any issues and +1 for removing the trap (calling appmanager directly skips uninstall repair steps)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke MorrisJobke merged commit 846b0d6 into master Mar 6, 2018
@MorrisJobke MorrisJobke deleted the fix_uninstall_rep_step branch March 6, 2018 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants