Skip to content
Snippets Groups Projects

Update installation instructions to get new users started more easily

Merged Ghost User requested to merge ressa-main-patch-44380 into main
All threads resolved!

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • jurgenhaas
  • Ghost User added 1 commit

    added 1 commit

    • a1109127 - Update drush install command, add Composer tip in Troubleshooting

    Compare with previous version

  • Ghost User resolved all threads

    resolved all threads

  • jurgenhaas resolved all threads

    resolved all threads

  • jurgenhaas added 1 commit

    added 1 commit

    • e02f8d79 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • While it may be an alias, install is intuitively understandable for a person new to Drupal, while the original en is not. While pm:install may be the original command, it has the cryptic pm: at the beginning, for historical reasons. But it doesn't make any sense, or convey any meaning.

    Oh, that's not true at all. Those prefixes before the colon are namespaces and they are important. In case of install, there are actually 2 of them, here is an excerpt from the help screen:

    ...
    pm:                                                                                                                                                             
      pm:install (in, install, en, pm-enable, pm:enable)                         Enable one or more modules.                                                        
      pm:list (pml)                                                              Show a list of available extensions (modules and themes).                          
      pm:uninstall (un, pmu)                                                     Uninstall one or more modules and their dependent modules.                         
    ...
    site:                                                                                                                                                           
      site:alias (sa)                                                            Show site alias details, or a list of available site aliases.                      
      site:install (si, sin)                                                     Install Drupal along with modules/themes/configuration/profile.                    
      site:set (use)                                                             Set a site alias that will persist for the current session.                        
      site:ssh (ssh)                                                             Connect to a webserver via SSH, and optionally run a shell command.                
    ...

    In order to avoid discussions like this, the only unambiguous pattern is to use the main command name. Otherwise, we always have discussions, which of the aliases should be used. In fact, for modules I don't like to use install because it is enabling a module, not installing it. But that's for another day.

    I am a firm believer in always placing parameters at the end

    Hm, not sure what you mean by parameters. We do have arguments and options. The problem with options at the end comes in, when you have a variable number of arguments, how should the tools know if the option isn't just another argument. That can be solved by separating options at the end with an extra -- separator. Something that sometimes works, but not always. With options at the beginning, you never run into that problem.

    Now, there is also a distinction between command specific options and global options. The -y is a global option, so it can be used with any command, and therefore can be set right before the command name. That way, it's easy to recognize that this drush command will run unattended and won't ask the user anything.

  • Author Contributor

    Oh, that's not true at all. Those prefixes before the colon are namespaces and they are important.

    I should have made it clearer that I meant that pm: doesn't convey any meaning to most users, where install would work just fine.

    Yes, I meant the "option" -y when I wrongly used the word "parameter". About placing it at the start and not the end, I hear your argumentation, but it's just not the norm.

    In the end, it's your project, so you have the final say. Feel free to commit.

    Edited by Ghost User
  • Ghost User resolved all threads

    resolved all threads

  • merged

  • jurgenhaas mentioned in commit ee954036

    mentioned in commit ee954036

  • Please register or sign in to reply
    Loading