Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Q3 pre-release Composer install instructions #5189

Merged
merged 13 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions guides/v2.3/cloud/project/project-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ You can upgrade the core {{site.data.var.ee}} code base to version 2.3. It is be

If you use PHP version 7.2, you must remove the `mcrypt` extension from the [`extensions` section of the `.magento.app.yaml` file]({{page.baseurl}}/cloud/project/project-conf-files_magento-app.html#configure-php-options). For Pro projects, you need to create a support ticket to completely disable the `mcrypt` extension.

1. Before completing the upgrade, you must [update the `autoload`]({{page.baseurl}}/comp-mgr/cli/cli-upgrade.html#update-autoload) property of the `composer.json` file.

1. Change to your Magento root directory and set the upgrade version using the [version constraint syntax]({{page.baseurl}}/cloud/project/ece-tools-upgrade-project.html#metapackage).

```bash
Expand Down
196 changes: 102 additions & 94 deletions guides/v2.3/comp-mgr/cli/cli-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,96 +36,103 @@ Complete the following prerequisites to prepare your environment before starting
{: .bs-callout-info }
Optionally, you can create a [custom maintenance mode page].

## Upgrade using the command line {#upgrade-cli-upgr}

Using the more manual process of upgrading via the command line allows you to track and control exactly what is being changed in the upgrade.

### Backup `composer.json`
## Manage packages

Backup the existing `composer.json` file in the Magento installation directory.
{:.bs-callout-info}
See the examples at the end of this section for help specifying different release levels. For example, minor release, quality patch, and security patch. {{site.data.var.ee}} customers can access 2.3.x patches two weeks before the General Availability (GA) date.

### Manage packages
1. Backup the `composer.json` file.

Specify needed packages and remove any unneeded ones before proceeding with the upgrade.
```bash
cp composer.json composer.json.bak
```

#### Deactivate the {{ ce }} update (for edition upgrade only)
1. Add or remove specific packages based on your needs. For example, if you are upgrading from {{ ce }} to {{ ee }}, remove the {{ ce }} package.

_Optional_—If you are upgrading from {{ ce }} to {{ ee }}, deactivate the {{ ce }} update:
```bash
composer remove magento/product-community-edition --no-update
```

```bash
composer remove magento/product-community-edition --no-update
```
1. Indicate the Magento packages, both the edition (`community` or `enterprise`) and the version (`{{ page.guide_version }}.3`), that you want to upgrade to.

#### Specify Magento packages
_{{ ce }}_:

Indicate the Magento packages, both the edition (`community` or `enterprise`) and the version (`{{ page.guide_version }}.3`), that you want to upgrade to.
```bash
composer require magento/product-community-edition={{ page.guide_version }}.3 --no-update
```

_{{ ce }}_:
_{{ ee }}_:

```bash
composer require magento/product-community-edition={{ page.guide_version }}.3 --no-update
```
```bash
composer require magento/product-enterprise-edition={{ page.guide_version }}.3 --no-update
```

_{{ ee }}_:
<div class="bs-callout-tip" markdown="1">
To see the full list of available {{ page.guide_version }} versions:

```bash
composer require magento/product-enterprise-edition={{ page.guide_version }}.3 --no-update
```
_{{site.data.var.ce}}_:

```bash
composer show magento/product-community-edition {{ page.guide_version }}.* --all | grep -m 1 versions
```

<div class="bs-callout-tip" markdown="1">
To see the full list of available {{ page.guide_version }} version:
_{{site.data.var.ce}}_:

_Magento Open Source_:
```bash
composer show magento/product-enterprise-edition {{ page.guide_version }}.* --all | grep -m 1 versions
```

```bash
composer show magento/product-community-edition {{ page.guide_version }}.* --all | grep -m 1 versions
```
</div>

_Magento Commerce_:
1. Specify additional packages.

```bash
composer show magento/product-enterprise-edition {{ page.guide_version }}.* --all | grep -m 1 versions
```
```bash
composer require --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.14.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~3.0.0 magento/magento2-functional-testing-framework:2.4.3 pdepend/pdepend:2.5.2 phpmd/phpmd:@stable phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:~3.4.0 --sort-packages --no-update
```

</div>
1. Remove unused packages.

#### Specify additional packages
If you are upgrading from 2.2.x to 2.3.x, remove unused packages with the following command. It is not needed if you are upgrading from 2.3.x.

```bash
composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update
```

### Example - Minor release

Minor releases contain new features, quality fixes, and security fixes. Use Composer to specify a minor release. For example, to specify the {{site.data.var.ee}} 2.3.0 metapackage:

```bash
composer require --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.14.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~3.0.0 magento/magento2-functional-testing-framework:2.4.3 pdepend/pdepend:2.5.2 phpmd/phpmd:@stable phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:~3.4.0 --sort-packages --no-update
composer require magento/product-community-edition=2.3.0 --no-update
```

#### Remove unused packages
### Example - Quality patch

If you are upgrading from 2.2.x to 2.3.x, remove unused packages with the following command.
It is not needed if you are upgrading from 2.3.x.
Quality patches primarily contain functional _and_ security fixes. However, they can also sometimes contain new, backward-compatible features. Use Composer to download a quality patch. For example, to specify the {{site.data.var.ee}} 2.3.3 metapackage:

```bash
composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update
composer require magento/product-community-edition=2.3.3 --no-update
```

### Update `autoload`
### Example - Security patch

Security patches contain security fixes only. They are designed to make the upgrade process faster and easier.

Open `composer.json` and edit the `"autoload": "psr-4"` section to include `"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"`:
Security patches use the Composer naming convention `2.3.2-px`. Use Composer to specify a patch. For example, to download the {{site.data.var.ee}} 2.3.2-p1 metapackage:

```json
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/",
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
},
//...
}
```bash
composer require magento/product-community-edition=2.3.2-p1 --no-update
```

### Modify the Magento updater
## (_Optional)_ Recreate the Magento updater

_Optional_—If the Magento updater is installed, modify it (it is located in the `update/` directory):
If the Magento updater is installed, remove and recreate it. It is located in the `update/` directory.

1. Backup the `update/` directory.
2. Create a Composer project.

1. Create a Composer project.

_{{ ce }} version {{ page.guide_version }}.3:_

Expand All @@ -141,7 +148,8 @@ _Optional_—If the Magento updater is installed, modify it (it is located in th

{: .bs-callout-info }
If you need to use a repository that contains non-public packages, such as internal sandboxes, change the URL in `--repository` accordingly.
3. Remove the old `update/` directory and move `temp_dir/update/` to the `update/` directory:

1. Remove the old `update/` directory and move `temp_dir/update/` to the `update/` directory:

```bash
rm -rf update
Expand All @@ -155,67 +163,67 @@ _Optional_—If the Magento updater is installed, modify it (it is located in th
rm -rf temp_dir
```

### Update metadata
## Update metadata

Update the `"name"`, `"version"`, and `"description"` fields in the `composer.json` file as needed.
1. Update the `"name"`, `"version"`, and `"description"` fields in the `composer.json` file as needed.

{: .bs-callout-info }
Updating the metadata in `composer.json` file is entirely superficial, not functional.
{: .bs-callout-info }
Updating the metadata in `composer.json` file is entirely superficial, not functional.

### Apply updates
1. Apply updates.

```bash
composer update
```
```bash
composer update
```

### Clean the Magento cache
1. Clean the Magento cache.

After applying an update, you must clean the cache.
```bash
bin/magento cache:clean
```

```bash
bin/magento cache:clean
```
## Clean up

### Manually clear caches and generated content
Manually clear caches and generated content.

Clear the `var/` and `generated/` subdirectories:
1. Clear the `var/` and `generated/` subdirectories:

```bash
rm -rf var/cache/*
```
```bash
rm -rf var/cache/*
```

```bash
rm -rf var/page_cache/*
```
```bash
rm -rf var/page_cache/*
```

```bash
rm -rf generated/code/*
```
```bash
rm -rf generated/code/*
```

{: .bs-callout-info }
If you use a cache storage other than the filesystem, such as Redis or Memcached, you must manually clear the cache there too.
{: .bs-callout-info }
If you use a cache storage other than the filesystem, such as Redis or Memcached, you must manually clear the cache there too.

### Update the database schema and data
1. Update the database schema and data.

```bash
bin/magento setup:upgrade
```
```bash
bin/magento setup:upgrade
```

### Disable maintenance mode
1. Disable maintenance mode.

```bash
bin/magento maintenance:disable
```
```bash
bin/magento maintenance:disable
```

### Restart Varnish
1. _(Optional)_ Restart Varnish.

_Optional_—If you use Varnish for page caching, restart it:
If you use Varnish for page caching, restart it:

```bash
service varnish restart
```
```bash
service varnish restart
```

### Check your work
## Check your work

Open your storefront URL in a web browser to check whether the upgrade was successful. If your upgrade was unsuccessful, your storefront will not load properly.

Expand Down
29 changes: 29 additions & 0 deletions guides/v2.3/install-gde/composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,35 @@ To get the Magento metapackage:

See [troubleshooting][] for help with more errors.

{:.bs-callout-info}
{{site.data.var.ee}} customers can access 2.3.x patches two weeks before the General Availability (GA) date.

### Example - Minor release

Minor releases contain new features, quality fixes, and security fixes. Use Composer to specify a minor release. For example, to specify the {{site.data.var.ee}} 2.3.0 metapackage:

```bash
composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition=2.3.0 <install-directory-name>
```

### Example - Quality patch

Quality patches primarily contain functional _and_ security fixes. However, they can also sometimes contain new, backward-compatible features. Use Composer to download a quality patch. For example, to specify the {{site.data.var.ee}} 2.3.3 metapackage:

```bash
composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition=2.3.3 <install-directory-name>
```

### Example - Security patch

Security patches contain security fixes only. They are designed to make the upgrade process faster and easier.

Security patches use the Composer naming convention `2.3.2-px`. Use Composer to specify a patch. For example, to download the {{site.data.var.ee}} 2.3.2-p1 metapackage:

```bash
composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition=2.3.2-p1 <install-directory-name>
```

## Set file permissions

You must set read-write permissions for the web server group before you install the Magento software. This is necessary so that the Setup Wizard and command line can write files to the Magento file system.
Expand Down