Review main Merged

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

Nicole Hummel CR +2 V +2 Normal +213 −19 updated 05/03/14, 20:46

Commit message

This patch extends the extension manager in three different ways. First
all dependencies are checked and error messages are bundled to show all
problems to the user.

Secondly on uploading an extension file the installation process is
started automatically.

The main change of this patch is to introduce a new function to prevent
(system) dependency checks. This means the checks for TYPO3 and PHP
version don't throw an exception anymore. Required extensions are tried
to be fetched from TER but don't stop installation either.

If errors occur on first installation process, a link to force the
installation is added to the notification. Before any installation
can be run, a dialog with a "break warning" is shown and has to be
confirmed by clicking the unfocussed field.

To be able to skip the system dependency check, a new property for
ExtensionManagementService and DependencyUtility is introduced which
controls disabling the system dependency check. All extension
dependencies are still resolved and needed extensions are tried
to be fetched from TER.

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Sascha Wilking +1
  • Verified V +2
    • Wouter Wolters +2
    • Sascha Wilking +1

Issues 1

Files 10

Review log 66

Show 41 earlier messages
  1. Stefan Neufeind commented on patch set 1 03/27/14, 21:42

    ActionController.php:89

    localisation for the link
  2. Mr. Jenkins commented on patch set 1 03/27/14, 21:44

  3. Nicole Hummel commented on patch set 1 03/27/14, 22:24

    ActionController.php:89 Reply

    As the exception is in english as well I don't know if it would be helpful to have a translation here
  4. Sebastian Fischer voted on patch set 1 CR +1 03/28/14, 07:13

  5. Markus Klein commented on patch set 1 03/28/14, 08:35

    locallang.xlf:184

    Be aware that an installation without dependency checking may render your installation unusable. In such a case manual intervention is required. Do you ....
  6. Ernesto Baschny commented on patch set 1 03/28/14, 10:10

    I agree and realised that there is utter demand for this, and I would welcome having that in 6.2.1.
  7. Markus Klein uploaded patch set 2 03/29/14, 09:48

  8. Mr. Jenkins commented on patch set 2 03/29/14, 10:01

  9. Markus Klein commented on patch set 2 CR -1 03/29/14, 10:05

    This has to go much further. I still can't download an extension in "Get Extensions".
  10. Markus Klein uploaded patch set 3 03/29/14, 10:24

  11. Markus Klein updated the commit message in patch set 3 03/29/14, 10:24

  12. Markus Klein commented on patch set 4 CR -1 03/29/14, 10:27

    Made this a WIP patch and added support for dependency checking on uploading extensions. Maybe I'll split this up and move this part into a separate patch. But for the first attempt I kindly ask for reviews here. This patch is still missing a possibility to omit the checks when downloading an extension.
  13. Mr. Jenkins commented on patch set 3 03/29/14, 10:37

  14. Mr. Jenkins commented on patch set 4 03/29/14, 10:37

  15. Nicole Hummel uploaded patch set 5 04/01/14, 00:46

  16. Nicole Hummel commented on patch set 5 04/01/14, 00:54

    I pushed a completely rewritten patch. You can test it with some local extension which you can upload over the form, or get some outdated extension over TER (e.g. powermail and media -> has dependencies which are resolved as well).
  17. Mr. Jenkins commented on patch set 5 04/01/14, 00:59

  18. Stefan Neufeind commented on patch set 5 V +1 04/05/14, 18:55

    Worked fine for me with a simple extension (afaik no dependencies, at least no new) from TER which was marked to be compatible until 6.1.99 only.
  19. Dmitry Dulepov commented on patch set 5 V +2 CR +2 04/09/14, 11:48

    Checked & tested
  20. Markus Klein commented on patch set 5 04/10/14, 13:58

    Will push one more version.

    DependencyUtility.php:125

    @throws missing
  21. Markus Klein uploaded patch set 6 04/10/14, 14:26

  22. Markus Klein commented on patch set 5 04/10/14, 14:30

    DependencyUtility.php:385

    countByExtensionKey() method does NOT exist. Since before 6.0 Fixed with next patch set.
  23. Markus Klein voted on patch set 6 CR +1 04/10/14, 14:30

  24. Mr. Jenkins commented on patch set 6 04/10/14, 14:40

  25. Stefan Neufeind voted on patch set 6 CR +1 04/11/14, 09:43

  26. Markus Klein updated the commit message in patch set 6 04/12/14, 12:10

  27. Markus Klein updated the commit message in patch set 7 04/12/14, 12:10

  28. Markus Klein commented on patch set 8 CR +1 04/12/14, 12:10

    updated commit message to be more precise about the checks being skipped.
  29. Mr. Jenkins commented on patch set 7 CR -1 V -1 04/12/14, 12:33

  30. Mr. Jenkins commented on patch set 8 04/12/14, 12:37

  31. Helmut Hummel commented on patch set 8 04/12/14, 12:57

    Nicole, thanks a lot for your efforts! Most of the comments I have are related to move all cleanup into separate patches (or one cleanup patch). maybe we can also break the functionality then into more pieces, not sure if this is possible though. in general, adding the possibility to skip system dependencies (not all dependencies) is a good thing. Let us get this in.
    To me this looks like it should go into another change request. We can then explain better why it is needed.

    AbstractController.php:107

    can we find a different solution for this? it is view related HTML code in the controller

    ActionController.php:66

    this is a very useful cleanup, but not related to this change. can you extract it and make it another change, so we can immediately merge it?

    ActionController.php:82

    This also is a nice cleanup! also move to a separate change? maybe with additionally cleaning up the htmlspecialchars and nl2br (view related) and handle that in the template properly (not render mode div in template)

    DownloadController.php:74

    I would completely skip this cleanup. In this case Extbase reflection handles this correctly and can resolve the fully qualified class name. In other places (like property annotation) the reflection service can *only* resolve fully qualified class names. To stay consistent, I suggest to always use fully qualified class names.

    DownloadController.php:102

    nl2br is view code. do we need it here? then we would also need htmlspecialchars, but better resolve this in the view

    DownloadController.php:119

    maybe add an optional argument to installFromTerAction instead introducing a new action?

    DownloadController.php:128

    see above

    DownloadController.php:143

    see above

    DownloadController.php:178

    even if this would be fine, I'd suggest to also keep it like it is (see above)

    DownloadController.php:195

    same here

    DownloadController.php:211

    same here

    UploadExtensionFileController.php:109

    cleanup, different change?

    UploadExtensionFileController.php:126

    cleanup. different change?

    UploadExtensionFileController.php:150

    cleanup, different change?

    UploadExtensionFileController.php:156

    cleanup, different change?

    UploadExtensionFileController.php:169

    I do not really understand the need for this. I looks a bit like domain logic is added to the controller. can we move this to the domain layer? can you extract this to another change to make the need more clear?

    UploadExtensionFileController.php:184

    view code

    ExtensionManagementService.php:111

    would not clean this up, see other comments

    ExtensionManagementService.php:122

    would not clean this up, see other comments

    ExtensionManagementService.php:177

    would not clean this up, see other comments

    ExtensionManagementService.php:190

    would not clean this up, see other comments

    ExtensionManagementService.php:204

    such annotation is not supported by extbase. we should stick to the convention here

    ExtensionManagementService.php:242

    same here

    DependencyUtility.php:30

    cleanup in a different change?

    DependencyUtility.php:159

    nice change in general. can you conver that with tests please?

    DependencyUtility.php:240

    nice streamlining here. I suggest to also move this in a separate change, which can be merged quickly
  32. Nicole Hummel commented on patch set 8 04/12/14, 13:25

    Reply

    This was introduced by Markus

    AbstractController.php:107 Reply

    IMHO this is hard to find as it is output directly and should be still readable

    ActionController.php:66 Reply

    This was introduced by Markus

    ActionController.php:82 Reply

    I think this is needed as we have to show all dependencies at once. Otherwise you would lost readability

    DownloadController.php:102 Reply

    There isn't any view if an error is thrown :-(

    UploadExtensionFileController.php:169 Reply

    This is for the installation right after upload I guess.
  33. Markus Klein commented on patch set 8 CR -1 04/12/14, 14:12

    I'll extract the clean ups.
  34. Markus Klein commented on patch set 8 04/12/14, 15:01

    DownloadController.php:74 Reply

    What has Extbase reflection to do with this?? I suggest to use minimum namespaces wherever possible. unfortunately we can't do that for the @inject thing. It makes life with IDEs just harder, if you need to add namespaces manually everywhere. If you type "Exte" and hit ctrl+space + Enter the IDE just adds the use stmt and shortens the namespace on all usages.

    ExtensionManagementService.php:204 Reply

    Extbase does not even parse this
  35. Markus Klein commented on patch set 8 04/12/14, 15:34

    Cleanup patch: https://review.typo3.org/29431 I suggest to wait with the rebase of this patch, until the cleanup is merged.
  36. Stefan Neufeind commented on patch set 8 04/30/14, 10:13

    @Markus: I merged the cleanup over there now. Could you maybe try to redo this patchset here then? Thanks a lot for your work.
  37. Markus Klein commented on patch set 8 04/30/14, 10:20

    Thanks! will do!
  38. Markus Klein uploaded patch set 9 04/30/14, 10:33

  39. Markus Klein commented on patch set 9 CR -1 04/30/14, 10:35

    a cleanup remained. follow up coming.

    DownloadController.php:71

    Unwanted cleanup.
  40. Markus Klein uploaded patch set 10 04/30/14, 10:38

  41. Stefan Neufeind commented on patch set 9 04/30/14, 10:38

    DownloadController.php:71

    Too bad we missed that in the other cleanup-patch. But fine with me to do it here now.

    DependencyUtility.php:116

    missing description
  1. Markus Klein commented on patch set 9 04/30/14, 10:40

    DownloadController.php:71 Reply

    NO! This is an action, we need the full namespace here! This was only a mistake of the rebase.
  2. Mr. Jenkins commented on patch set 9 04/30/14, 10:47

  3. Mr. Jenkins commented on patch set 10 04/30/14, 10:52

  4. Markus Klein uploaded patch set 11 04/30/14, 10:58

  5. Markus Klein commented on patch set 11 04/30/14, 10:58

    Fixed the last remaining glitch from the rebase.
  6. Stefan Neufeind voted on patch set 11 CR +1 04/30/14, 11:03

  7. Mr. Jenkins commented on patch set 11 04/30/14, 11:13

  8. Wouter Wolters commented on patch set 11 04/30/14, 17:34

    AbstractController.php:107

    Shouldn't this message be translated here?

    DownloadController.php:74

    short version can be used here while we are at it

    DependencyUtility.php:156

    !empty

    locallang.xlf:184

    render -> make ?
  9. Markus Klein commented on patch set 11 04/30/14, 21:08

    AbstractController.php:107 Reply

    Good point

    DownloadController.php:74 Reply

    It could. Please see my lengthy discussion with some people on that topic in the cleanup patch. In short: We agreed that any extbase-parsed function or member has to use full namespace for various reasons. (although this requires manual extra work). So this is an action hence the namespace has to stay.

    locallang.xlf:184 Reply

    To my ears render sounds better here. And translations to German also seem better than using make. But I'm not a native.
  10. Nicole Hummel commented on patch set 11 V -1 05/02/14, 22:28

    This doesn't work due to javascript errors. I push a new commit
  11. Nicole Hummel uploaded patch set 12 05/02/14, 22:50

  12. Nicole Hummel commented on patch set 12 05/02/14, 22:55

    I slightly changed the dialog box behavior. To prevent undesired installations, the event is now triggered by the unfocused "No" button which means you have to read the warning more carefully.

    AbstractController.php:107

    As the exceptions are all not translated but in English, I would recommend to not translate this additional link.
  13. Mr. Jenkins commented on patch set 12 05/02/14, 23:15

  14. Nicole Hummel uploaded patch set 13 05/03/14, 08:32

  15. Mr. Jenkins commented on patch set 13 05/03/14, 08:46

  16. Nicole Hummel uploaded patch set 14 05/03/14, 09:01

  17. Mr. Jenkins commented on patch set 14 05/03/14, 09:16

  18. Sascha Wilking voted on patch set 14 V +1 CR +1 05/03/14, 09:19

  19. Nadir S. commented on patch set 14 05/03/14, 09:48

    Hi Nicole, dependency check does not work as expected if you upload an extension locally, which is depended on another extension. (test case: media,vidi) greetings Nadir
  20. Nicole Hummel commented on patch set 14 05/03/14, 11:23

    @Nadir: This is not a patch issue, because the dependency gets lost when installing the extension locally. It seems that there is an error while packing the tx3 on the server.
  21. Wouter Wolters voted on patch set 14 V +2 CR +2 05/03/14, 12:38

  22. Wouter Wolters merged patch set 15 05/03/14, 12:38

  23. Anja Leichsenring commented on patch set 15 05/03/14, 13:56

    Reverted This patchset was reverted in change: I8194801b6be9d4c3b4f57d14d26df42df36f4b09
  24. Anja Leichsenring commented on patch set 15 05/03/14, 13:58

    Reverted by https://review.typo3.org/#/c/29813 The patch was considered 'not ready yet' post merge and needs some more work.
  25. Stefan Neufeind commented on patch set 15 05/03/14, 20:46

    *sigh* I hope that won't another neverending story. I'd really appreciate if we could have that feature. *thumbs up*