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

Update README install instructions #2981

Merged
merged 5 commits into from
Jan 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 49 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ level of backwards compatibility to the official releases.
- [Requirements](#requirements)
- [Optional](#optional)
- [Installation](#installation)
- [Manual Install](#manual-install)
- [Composer](#composer)
- [Git](#git)
- [Secure your installation](#secure-your-installation)
Expand Down Expand Up @@ -61,21 +62,64 @@ __Please be aware that although OpenMage is compatible that one or more extensio

## Installation

### Manual Install

Download the latest [release archive](https://github.com/OpenMage/magento-lts/releases) and extract it over your existing install. **Important:** you must download the ZIP file from a tagged version on the releases page, otherwise there will be missing dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

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

did we have this part before like this? because extracting it over an existing install is only updating/adding files. But files which got deleted or moved will stay in their place, which in some cases might be a security issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Flyingmana I think it's related to the "composer thing". It is true that just overwriting everything can leave orphaned files, maybe we could write it in a better way. It's still a difficult task since, if people installed everything in the same docroot, how will they be able to "remove everything" and reinstall? They'll for sure have css/js and other stuff in various directories that make everything more difficult.

BTW we have a specific section "Since OpenMage 19.5.0 / 20.1.0" in the readme with a "rm" command, check it out ;-)

Copy link
Contributor

Choose a reason for hiding this comment

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

what we could do is updating the migration project https://github.com/OpenMage/migrate/blob/master/create-patches.sh to create diff based patches as in the old days. Also github offers patch files for release upgrades as for example https://github.com/OpenMage/magento-lts/compare/v20.0.17...v20.0.18.patch although thats not covering the composer dependencies, so the migration project which creates and hosts patches might be a valuable approach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose that this is the "classic" way to install / upgrade Magento. Not the best, but is for people who just use FTP.

I wouldn't personally work on creating diff based patches since simply using composer would be a better approach and we should be encouraging that way intead.


### Composer

Download the latest archive and extract it, clone the repo, or add a composer dependency to your existing project like so:
Step 1: Create a new composer project:

```bash
composer require "openmage/magento-lts":"^19.5.0"
composer init
```

To get the latest changes use:
Step 2: Configure composer. **The below options are required.** You can see all options [here](https://github.com/AydinHassan/magento-core-composer-installer#configuration).

```bash
composer require "openmage/magento-lts":"dev-main"
# Allow composer to apply patches to dependencies of magento-lts
composer config --json extra.enable-patching true

# Configure Magento core composer installer to use magento-lts as the Magento source package
composer config extra.magento-core-package-type magento-source

# Configure the root directory that magento-lts will be installed to, such as "pub", "htdocs", or "www"
composer config extra.magento-root-dir pub
```

Step 3: Require `magento-core-composer-installer`:

``` bash
# PHP 7
composer require "aydin-hassan/magento-core-composer-installer":"~2.0.0"

# PHP 8
composer require "aydin-hassan/magento-core-composer-installer":"^2.1.0"
```

<small>Note: `dev-main` is just an alias for current `1.9.4.x` branch and may change</small>
<small>Note: be sure to select `y` if composer asks you to trust `aydin-hassan/magento-core-composer-installer`.</small>

Step 4: Require `magento-lts`:

```bash
# OpenMage v19
composer require "openmage/magento-lts":"^19.4.0"

# OpenMage v20
composer require "openmage/magento-lts":"^20.0.0"
```

<small>Note: be sure to select `y` if composer asks you to trust `magento-hackathon/magento-composer-installer` or `cweagans/composer-patches`.</small>

To install the latest development version (may be unstable):

```bash
# OpenMage v19
composer require "openmage/magento-lts":"1.9.4.x-dev"

# OpenMage v20
composer require "openmage/magento-lts":"20.0.x-dev"
```

### Git

Expand Down