Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.3] Add a CLI installation for Joomla #38325

Merged
merged 79 commits into from
Oct 21, 2022

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Jul 25, 2022

This PR adds a method to install Joomla via command line to simplify API tests and installations with one-click-setups. The new installation method can be triggered by running php installation/joomla.php install in the root of the Joomla folder. The different options are documented by running php installation/joomla.php help install.

All options can be given either by option directly on the command line or when running the install command interactively. If a default value is given for an option and that option is not defined, that default value is taken.

Summary of Changes

This adds a new CLI entry file, similar to cli/joomla.php to the installation with all necessary steps to run the installation. The code uses as much of the current installation as possible and validates the options from the setup.xml file.

joomla-cli-options

Testing Instructions

  1. Run php installation/joomla.php install in your installation and check that afterwards Joomla is properly installed.
  2. Run php installation/joomla.php install with all necessary CLI options

If you are using a dev version (checked out the GIT version) the installation folder is preserved, otherwise the folder is deleted.

Documentation Changes Required

The CLI installation is documented here: https://docs.joomla.org/J4.x:Joomla_CLI_Installation as well as in installation/INSTALL.

Acknowledgement

I'd like to thank Mittwald for supporting this improvement.

@brianteeman
Copy link
Contributor

excited to try this. would it not make more sense for it to be in the cli folder?

@Hackwar
Copy link
Member Author

Hackwar commented Jul 25, 2022

Unfortunately the application in the /cli folder does only work when Joomla is already installed. Since the installer should also be removed when the installation is done, it needs to be part of the /installation folder.

@brianteeman
Copy link
Contributor

Unfortunately the application in the /cli folder does only work when Joomla is already installed. Since the installer should also be removed when the installation is done, it needs to be part of the /installation folder.

Fair enough

Co-authored-by: Brian Teeman <brian@teeman.net>
@Hackwar
Copy link
Member Author

Hackwar commented Oct 17, 2022

I removed the double error string. I just want to point out, that that is the error you get in the web installer when the credentials are wrong. So you are requesting different, stricter standards for the CLI installer than for the normal web installer. But whatever. Here you go, there is your fixed translation string. I also sorted the translation strings for the CLI file alphanumerically. Can we please merge this now?

BTW: Dieter Ziller was so kind to help with the documentation. See the link added to the first post in this PR.

@obuisard
Copy link
Contributor

@Hackwar thank you for documenting the CLI installation process. Great job.

Copy link
Member

@HLeithner HLeithner left a comment

Choose a reason for hiding this comment

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

tested on php 7.2.16 with manual input and console parameter.

@HLeithner HLeithner merged commit f340734 into joomla:4.3-dev Oct 21, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Oct 21, 2022
@HLeithner
Copy link
Member

Thanks

@Hackwar
Copy link
Member Author

Hackwar commented Oct 21, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.