Review main Merged

29845[TASK] EM: Add possibility to bypass system dependency checks

Nicole Hummel CR +2 V +2 Expert +812 −292 updated 06/11/14, 14:49

Commit message

This patch adds a new action to show all unresolved dependencies and
adds the possibility to bypass all system and version checks. Required
extensions are still tried to be fetched from TER.

Review

  • Code review CR +2
    • Xavier Perseguers +2
    • Markus Klein +1
    • Zbigniew Jacko +1
  • Verified V +2
    • Xavier Perseguers +2
    • Zbigniew Jacko +1

Issues 1

Files 29

Show 9 more files

Review log 81

Show 56 earlier messages
  1. Anja Leichsenring commented on patch set 1 05/04/14, 11:11

    my ExtJS window listing dependency violations and the warning is only 176px wide, so this looks quite strange, but this is the only thing I really found (Chromium Browser on Ubuntu Linux on not full screen mode). I tested: - download an extension with offending dependencies from TER (offending itself and dependencies with offending version dependency, too) - upload a zip extension with offending dependencies, dependencies needed to be downloaded from TER with offending version dependency. - upload zip extension, with dependencies available in the system.
  2. Nicole Hummel uploaded patch set 2 05/04/14, 12:47

  3. Nicole Hummel commented on patch set 2 05/04/14, 12:48

    Rebased with current master
  4. Mr. Jenkins commented on patch set 1 05/04/14, 18:44

  5. Mr. Jenkins commented on patch set 2 05/04/14, 20:59

  6. Nicole Hummel uploaded patch set 3 05/04/14, 22:04

  7. Mr. Jenkins commented on patch set 3 05/05/14, 04:17

  8. Markus Klein updated the commit message in patch set 3 05/05/14, 07:57

  9. Mr. Jenkins commented on patch set 4 05/05/14, 08:15

  10. Markus Klein commented on patch set 4 CR -1 05/05/14, 08:46

    All in all a great change that took me nearly an hour to review. Still some issues remain. Thx for your work Nicole.

    ActionController.php:122

    Why do we statically return '' here?

    ListController.php:80

    bypass dependency checking

    ExtensionManagementService.php:196

    depended - the word does not exist

    DependencyUtility.php:31

    I'd suggest to include: use TYPO3\CMS\Extensionmanager\Exception as EmException So all Exceptions are included and can be used as EmException\Unres...ption

    DependencyUtility.php:161

    !empty() is faster according to Wouter.

    DependencyUtility.php:244

    Does not match the throw below.

    DependencyUtility.php:258

    So you convert any Unresolved*Exception to MissingVersionDep*Exception? Why that?

    UnresolvedDependencies.html:4

    Doesn't string comparison work directly now?

    UnresolvedDependencies.html:13

    ucfirst "required" ;-)

    UnresolvedDependencies.html:31

    "Depended" - word does not exist. "if they not yet exist in the system" => "if they do not exist on the system yet"

    UnresolvedDependencies.html:36

    may? If the system is unusable, manual intervention >will< be required. ;-)

    UnresolvedDependencies.json:1

    Uhm... this file has .json extension. Hence it should be/generate valid json output and not HTML

    ter.js:118

    Is this a translation key or a string to display?

    DownloadQueueTest.php:58

    call to parent function missing

    ExtensionManagementServiceTest.php:131

    Don't think so. EBT is the wrong one here.

    DependencyUtilityTest.php:49

    call to parent missing
  11. Nicole Hummel commented on patch set 4 05/05/14, 09:08

    ActionController.php:122 Reply

    This is an ajax action which doesn't need to return anything at it triggers a page reload. But we do not need to start any fluid rendering.

    ListController.php:80 Reply

    Why?

    ExtensionManagementService.php:196 Reply

    "required extensions" than

    DependencyUtility.php:31 Reply

    Is this done elsewhere in the core?

    DependencyUtility.php:258 Reply

    The thrown exceptions can be either php, typo3 related or extension related, which means in general that the (required) extension will be missing afterwards.

    UnresolvedDependencies.html:4 Reply

    Does it? I haven't heard of it.

    UnresolvedDependencies.json:1 Reply

    It is an partial and turned to json in the template. HTML is need for proper styling within the confirm box.
  12. Markus Klein commented on patch set 4 05/05/14, 14:17

    ActionController.php:122 Reply

    Does an ajax action have a return value?

    ListController.php:80 Reply

    Correct English sentence is either: The possibility to bypass the dependency check. or The possibility to bypass dependency checking.

    ExtensionManagementService.php:196 Reply

    Or: Check dependencies for an extension and its requirements

    DependencyUtility.php:31 Reply

    Yep, but I can't give you a proof atm. This was suggested to me by Oli Klee and others multiple times.

    DependencyUtility.php:258 Reply

    ok got it!

    UnresolvedDependencies.html:4 Reply

    At least I used it in a 6.2 project two days ago. But we can leave it like that of course.

    UnresolvedDependencies.json:1 Reply

    Oh ok. Still this looks a bit weird :-) but fine then.
  13. Nicole Hummel commented on patch set 4 05/05/14, 16:08

    ActionController.php:122 Reply

    Sure. You can return json to the request. But here isn't any return needed, so the empty string is enough.

    ter.js:118 Reply

    It is a string

    DownloadQueueTest.php:58 Reply

    Own tearDown isn't needed at all, as the unset is done with a reflection in parent class. Removed it.

    DependencyUtilityTest.php:49 Reply

    Not needed anymore.
  14. Nicole Hummel uploaded patch set 5 05/05/14, 16:08

  15. Markus Klein commented on patch set 5 05/05/14, 16:24

    ExtensionRepository.php:251

    Why that? ->count() should give us an integer.
  16. Nicole Hummel commented on patch set 5 05/05/14, 16:35

    ExtensionRepository.php:251 Reply

    I didn't see that count(). But then we have a double count() in dependencyUtility.
  17. Nicole Hummel uploaded patch set 6 05/05/14, 16:39

  18. Markus Klein commented on patch set 6 05/05/14, 16:47

    DependencyUtility.php:360

    This bug also needs a fix in 6.1 (and 6.0). I'll push a patch.
  19. Markus Klein commented on patch set 6 05/05/14, 16:52

    DependencyUtility.php:360 Reply

  20. Mr. Jenkins commented on patch set 5 05/05/14, 17:00

  21. Mr. Jenkins commented on patch set 6 05/05/14, 17:44

  22. Nicole Hummel uploaded patch set 7 05/06/14, 07:18

  23. Nicole Hummel commented on patch set 7 05/06/14, 07:19

    Rebased to current master
  24. Mr. Jenkins commented on patch set 7 05/06/14, 07:46

  25. Markus Klein commented on patch set 7 CR +1 05/06/14, 10:06

    Do we have some test extensions for this?
  26. Nicole Hummel commented on patch set 7 05/06/14, 10:34

    You can try news, media and googlequery
  27. Markus Klein commented on patch set 7 05/06/14, 12:44

    UnresolvedDependenciesMessage.html:1

    process -> proceed
  28. Markus Klein uploaded patch set 8 05/06/14, 12:44

  29. Markus Klein voted on patch set 8 V +1 CR +1 05/06/14, 12:44

  30. Mr. Jenkins commented on patch set 8 05/06/14, 12:59

  31. Wouter Wolters commented on patch set 8 05/06/14, 13:03

    UploadExtensionFileController.php:204

    IMO this is hard to read, if I'm correct we do not allow inline assigment in if-statements

    DependencyUtility.php:320

    Wrong @throws There are also some missing here

    UnresolvedDependencies.html:30

    not needed whitespace here
  32. Nicole Hummel uploaded patch set 9 05/06/14, 23:17

  33. Mr. Jenkins commented on patch set 9 05/07/14, 00:46

  34. Markus Klein commented on patch set 9 V +1 CR -1 05/07/14, 11:34

    UnresolvedDependenciesMessage.html:1

    This is NOT an English sentence. Please put that into a translator and check yourself. I suggest: If you continue installing the extension, all dependency checks are turned off.
  35. Nicole Hummel commented on patch set 9 05/07/14, 11:46

    UnresolvedDependenciesMessage.html:1 Reply

    It's fine with me. I wait for other reviews to minimize patch sets
  36. Markus Klein commented on patch set 9 05/07/14, 13:28

    UnresolvedDependenciesMessage.html:1 Reply

    Sure, no need to push an extra set just for the wording here. Forgot to mention that in my comment.
  37. Markus Klein uploaded patch set 10 05/11/14, 23:08

  38. Markus Klein commented on patch set 10 V +1 CR +1 05/11/14, 23:09

    Rebased and fixed the wording.
  39. Markus Klein uploaded patch set 11 05/22/14, 22:23

  40. Markus Klein commented on patch set 11 05/22/14, 22:28

    Rebased

    UploadExtensionFileController.php:149

    removeExtensionAndRestoreFromBackup() was called for any Exception that might have occurred. Now we only call it for ExtensionManagerException. Is that a problem?
  41. Mr. Jenkins commented on patch set 11 05/22/14, 22:43

  42. Xavier Perseguers commented on patch set 11 CR -1 06/10/14, 07:56

    further working on it (testing, ...)

    UnresolvedDependenciesMessage.html:1

    are turned off => will be turned off Basically, why is this part not translatable?

    UnresolvedDependenciesMessage.html:3

    if they not yet exist => if they do not yet exist

    UnresolvedDependencies.html:27

    This is not translatable

    ter.js:118

    not translatable
  43. Nicole Hummel commented on patch set 11 06/10/14, 08:07

    @Xavier: I haven't translated it yet as the exceptions aren't translated even. This would be a todo for a follow up patch!
  44. Nicole Hummel commented on patch set 11 06/10/14, 08:10

    UploadExtensionFileController.php:149 Reply

    I think this is wrong from rebase and should be changed
  45. Xavier Perseguers uploaded patch set 12 06/10/14, 08:38

  46. Xavier Perseguers voted on patch set 12 V +1 CR +1 06/10/14, 08:45

  47. Mr. Jenkins commented on patch set 12 06/10/14, 08:52

  48. Markus Klein commented on patch set 11 06/10/14, 10:28

    UploadExtensionFileController.php:149 Reply

    This was a conflict in the rebase so I had to make a decision. I posted the question because of this decision. What is the correct way?
  49. Steffen Ritter commented on patch set 12 CR +1 06/10/14, 10:42

    maybe the commit message could be improved
  50. Lorenz Ulrich uploaded patch set 13 06/10/14, 13:48

  51. Lorenz Ulrich commented on patch set 13 V +1 06/10/14, 13:50

    I improved the language labels. Otherwise it seems to work.
  52. Xavier Perseguers commented on patch set 13 V -1 CR +1 06/10/14, 13:53

    ListController.php:86

    There are two problems here: 1) It reads info from DB so if you are changing your own extension locally (which is sent to TER so present in DB), you are getting dependencies from latest published version, not the one present locally 2) If you got here because of unmet dependencies for a private extension (not present on TER), you get $extension == NULL and checkDependencies fatals with an invalid arguement. In both cases what we actually need is a dumb $extension variable of type Extension with the serializedDependencies attribute set to what is present in the locally available ext_emconf.php, nothing else, so we could possibly instantiate this class here, or pass an extensionKey to checkDependencies() instead of an object.
  53. Nicole Hummel commented on patch set 13 06/10/14, 13:58

    @Xavier Can you describe your test scenario?
  54. Mr. Jenkins commented on patch set 13 06/10/14, 14:03

  55. Nicole Hummel commented on patch set 13 06/10/14, 14:03

    @lorenz: I would really prefer to have a translation follow up afterwards as all exception messages have to be translated as well!
  1. Xavier Perseguers commented on patch set 13 06/10/14, 14:21

    @Nicole, please see my comment. You can reproduce by having a private extension (not published = not existing on TER) having unmet dependencies such as 'typo3' => '4.5.0-4.5.99' and trying to activate/load it in EM
  2. Nicole Hummel uploaded patch set 14 06/10/14, 21:47

  3. Nicole Hummel uploaded patch set 15 06/10/14, 21:57

  4. Mr. Jenkins commented on patch set 14 06/10/14, 22:01

  5. Mr. Jenkins commented on patch set 15 06/10/14, 22:11

  6. Markus Klein commented on patch set 15 06/11/14, 00:34

    UnresolvedDependenciesMessage.html:1

    Why do we have the non-English sentence here again?? see comments in patchset 9
  7. Xavier Perseguers commented on patch set 15 06/11/14, 06:50

    UnresolvedDependenciesMessage.html:1 Reply

    Because Nicole did not get the patch from Gerrit but changed her own locally.
  8. Xavier Perseguers commented on patch set 15 06/11/14, 06:51

    Working on it, please do not change anything :)
  9. Xavier Perseguers uploaded patch set 16 06/11/14, 07:15

  10. Xavier Perseguers voted on patch set 16 V +1 CR +1 06/11/14, 07:16

  11. Mr. Jenkins commented on patch set 16 06/11/14, 07:29

  12. Markus Klein commented on patch set 16 CR +1 06/11/14, 07:41

    For my knowledge, why do you remove the xml:space thing sometimes? What is this good for in general?
  13. Xavier Perseguers commented on patch set 16 06/11/14, 08:08

    it only makes sense if you really need to ensure whitespaces are kept as this (on Pootle), not sure it is even taken into account in TYPO3 but it should as it's standard XML parser instruction: https://lists.oasis-open.org/archives/xliff/200802/msg00012.html Anyway, we don't need it in 99% of the case and when we would need it, I'd say that chance is much too high that translators won't keep the exact same whitespace structure so we should not rely on it anyway. Writing XLIFF is already described as more complex than ll-XML, let's try to make it as simple as possible by removing what is not actually mandatory :)
  14. Markus Klein commented on patch set 16 06/11/14, 08:14

    Thanks for explaining this to me.
  15. Nicole Hummel commented on patch set 16 06/11/14, 08:48

    @Markus: I checked the comments from patch set 9 and changed the text to Xavier's suggestion. What was wrong with that?
  16. Nicole Hummel commented on patch set 16 V -1 06/11/14, 08:49

    Still installation messages missing after upload an extension. I'm working on that
  17. Steffen Ritter commented on patch set 16 06/11/14, 09:13

    is that really related to this issue or can we split that into another patchset?
  18. Nicole Hummel commented on patch set 16 06/11/14, 09:43

    @Steffen: If you mean the notifications after installation - they were there before and should be there after the patch. So this belongs into it
  19. Nicole Hummel uploaded patch set 17 06/11/14, 10:40

  20. Mr. Jenkins commented on patch set 17 06/11/14, 10:56

  21. Xavier Perseguers voted on patch set 17 V +1 CR +1 06/11/14, 12:39

  22. Markus Klein commented on patch set 17 CR +1 06/11/14, 13:41

    @Nicole: it was about the first sentence.
  23. Zbigniew Jacko voted on patch set 17 V +1 CR +1 06/11/14, 14:43

  24. Xavier Perseguers voted on patch set 17 V +2 CR +2 06/11/14, 14:49

  25. Xavier Perseguers merged patch set 18 06/11/14, 14:49