64156[BUGFIX] Fix PackageManager event binding
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Simon Gilli +1
- Andreas Kienast +1
- Helmut Hummel +1
-
Verified V +2 Done
- Benni Mack +2
- Simon Gilli +1
- TYPO3com +1 CI
Issues 2
Files 3
Review log 1113
-
Benjamin Franzke uploaded patch set 1 04/13/20, 21:37
-
Benjamin Franzke wrote 04/13/20, 21:43
Topic set to di -
TYPO3com voted on patch set 1 V +1 04/13/20, 21:49 Completed build in 11m 57s on Mon, 13 Apr, 09:49 PM Test Summary: 73457 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2463
-
Simon Gilli commented on patch set 1 04/13/20, 22:04
ServiceProvider.php:116beforeInstallationEventListener should also be added here -
Helmut Hummel voted on patch set 1 CR +1 04/14/20, 08:36
-
Benjamin Franzke uploaded patch set 2 04/14/20, 12:44
-
Benjamin Franzke commented on patch set 2 04/14/20, 12:50
ServiceProvider.php:116ReplyAs discussed on Slack, this seems unneeded. I'll post relevant parts of the Slack-Log for future reference in here: Benjamin Franzke 3 hours ago I would/will try to git-blame where that signal was initially introduced. Simon Gilli 3 hours ago Found it https://github.com/TYPO3/TYPO3.CMS/commit/5aa6c3b8e3c5f43ee61a1d0caf414e3c9c0bb199. This was moved by Benni's patch to the PackageManager https://github.com/TYPO3/TYPO3.CMS/commit/c53161caf23e25f8d2c2d277116f73e8f88d98b2 Benjamin Franzke 3 hours ago Ok, the signal ExtensionManagementService::willInstallExtensions (which is now BeforePackageActivationEvent) was introduced in: https://review.typo3.org/c/Packages/TYPO3.CMS/+/24714/ The linked issue is not that descriptive: https://forge.typo3.org/issues/52766 It only states "PackageStates file needs to be updated by the PackageManager to be available for installation. Currently this is not the case" – it really looks like this event hookup got superseded by something else. Benjamin Franzke 3 hours ago This was moved by Benni's patch to the PackageManager Right, it was previously hooked up in extensionmanager/ext_localconf.php ( But you know what I mean? I agree we should resolve that orphan method – but maybe we should better remove the function from PackageManager if it is really unnecessary – or leave it in with a comment that it's unclear whether it is still needed and then remove in v11 Simon Gilli 3 hours ago Yes, agree. Currently trying to find where the event is called to avoid issues... […] Simon Gilli 44 minutes ago This call here triggers the scanAvailablePackages through the event and makes the other event superfluous: https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/extensionmanager/Classes/Service/ExtensionManagementService.php#L125 So we can finally remove the second one, I don't see a need for it, it would trigger scanAvailablePackages another time which is definitively superfluous. Do you like to fix this two things within the same patch or how do we proceed here? Benjamin Franzke 30 minutes ago same patch would be fine. But I'm not entirely sure yet… Ok, I'm trying to track the call to scanAvailablePackages/reloadAvailableExtensions. Braindump (maybe nothing one needs to understand): It is called in markExtensionForInstallation – introduced in https://review.typo3.org/c/Packages/TYPO3.CMS/+/44657/ – the call is triggered by copyDependencies|downloadDependencies while these methods are conditionally called in installExtension. installExtension later calls installDependnecies which emits BeforePackageActivationEvent. That event is now unbound and seems unneeded due to the conditional calls to copyDependencies|downloadDependencies. Now the question is: Is package scanning still required when these two methods are not executed? And why was reloadAvailableExtensions introduced in 2015 in https://review.typo3.org/c/Packages/TYPO3.CMS/+/44657/ Maybe the old signal ExtensionManagementService::willInstallExtensions (which is now BeforePackageActivationEvent) came too late… (edited) Simon Gilli 21 minutes ago Yeah that's what I meant, there are multiple calls to multiple methods where one call should be enough. But imho this should be done in a general refactor of this whole stuff. I stopped digging deeper into this cases, for me the most important question was do we need the second event or not and this question I was able to answer by my step debugging... Most important is to fix the issue and that's already done by your first ps. As said for the rest we should perhaps plan a refactor in v11 as this code is used in the em only and not at normal runtime. -
TYPO3com voted on patch set 2 V +1 04/14/20, 13:04 Completed build in 14m 30s on Tue, 14 Apr, 01:04 PM Test Summary: 73470 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2500
-
Simon Gilli voted on patch set 2 V +1 CR +1 04/14/20, 13:25
-
Helmut Hummel voted on patch set 2 CR +1 04/16/20, 08:52
-
Andreas Kienast voted on patch set 2 CR +1 04/17/20, 05:10
-
Benni Mack voted on patch set 2 V +2 CR +2 04/17/20, 08:10
-
Benni Mack merged patch set 3 04/17/20, 08:10