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

Commit a181214

Browse files
authored
Merge branch 'master' into graphql-custom-filters
2 parents f7caa30 + 04b55d8 commit a181214

File tree

115 files changed

+1861
-824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1861
-824
lines changed

src/_data/toc/contributor-guide.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ pages:
1414
url: /contributor-guide/backward-compatible-development/
1515
versionless: true
1616

17+
- label: Pull Request Tests
18+
url: /contributor-guide/pull-request-tests.html
19+
versionless: true
20+
1721
- label: Docs Contributions
1822
children:
1923
- label: Contribution Guidelines

src/_data/toc/software-update-guide.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,28 @@ pages:
2121
- label: Update and upgrade checklist
2222
url: /comp-mgr/prereq/prereq_compman-checklist.html
2323

24+
- label: Safe Upgrade Tool
25+
url: /safe-upgrade-tool/introduction.html
26+
versionless: true
27+
edition: ee-only
28+
children:
29+
30+
- label: Prerequisites
31+
url: /safe-upgrade-tool/prerequisites.html
32+
versionless: true
33+
34+
- label: Install
35+
url: /safe-upgrade-tool/install.html
36+
versionless: true
37+
38+
- label: Run the tool
39+
url: /safe-upgrade-tool/run.html
40+
versionless: true
41+
42+
- label: Developer information
43+
url: /safe-upgrade-tool/developer.html
44+
versionless: true
45+
2446
- label: Magento Marketplace example
2547
url: /comp-mgr/marketplace/marketplace.html
2648
include_versions: ["2.3"]

src/_data/var.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ mcp-package: magento/magento-cloud-patches
3131
mcp-release: 1.0.8
3232
mcd-package: magento/magento-cloud-docker
3333
mcd-prod: Magento Cloud Docker
34-
mcd-release: 1.2.0
34+
mcd-release: 1.2.1
3535
mcc-prod: Magento Cloud Components
3636
mcc-package: magento/magento-cloud-components
3737
mcc-release: 1.0.7

src/_data/whats-new.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,47 @@ description: This page contains recent changes that we think you'd like to know
44
We exclude from this list proofreading, spelling checks, and all minor updates.
55
link: "/whats-new.html"
66
thread: "/whatsnew-feed.xml"
7-
updated: Wed Dec 16 16:19:47 2020
7+
updated: Mon Jan 18 15:45:43 2021
88
entries:
9+
- description: SendGrid DKIM signatures are available only on Magento Commerce Cloud
10+
Pro projects. For more information on SendGrid, see https://devdocs.magento.com/cloud/project/sendgrid.html.
11+
versions: 2.4.x
12+
type: Major Update
13+
date: January 14, 2021
14+
link: https://github.com/magento/devdocs/pull/8440
15+
contributor: bdenham
16+
profile: https://github.com/bdenham
17+
- description: New Relic Alerts now include Redis and MariaDB. See https://devdocs.magento.com/cloud/project/new-relic.html#monitor-performance-with-managed-alerts.
18+
versions: 2.4.x
19+
type: Major Update
20+
date: January 12, 2021
21+
link: https://github.com/magento/devdocs/pull/8503
22+
contributor: bdenham
23+
profile: https://github.com/bdenham
24+
- description: Added a [legal disclaimer](https://devdocs.magento.com/compliance/privacy/pi-data-reference-m2.html#customer-data)
25+
to references of the `date_of_birth` attribute of the `customer` database entity.
26+
versions: 2.3.x, 2.4.x
27+
type: Major Update
28+
date: January 8, 2021
29+
link: https://github.com/magento/devdocs/pull/8488
30+
contributor: jeff-matthews
31+
profile: https://github.com/jeff-matthews
32+
- description: Published release notes for [Cloud Docker 1.2.1](https://devdocs.magento.com/cloud/release-notes/mcd-release-notes.html#v121).
33+
versions: 2.4.x
34+
type: Major Update
35+
date: December 22, 2020
36+
link: https://github.com/magento/devdocs/pull/8429
37+
contributor: bdenham
38+
profile: https://github.com/bdenham
39+
- description: Added a new topic with instructions for [reverting from a split database
40+
to a single database](https://devdocs.magento.com/guides/v2.4/config-guide/revert-split-database.html)
41+
implementation.
42+
versions: 2.3.x, 2.4.x
43+
type: New Topic
44+
date: December 21, 2020
45+
link: https://github.com/magento/devdocs/pull/8422
46+
contributor: jeff-matthews
47+
profile: https://github.com/jeff-matthews
948
- description: Added an [example](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/requirejs.html)
1049
of overwriting a Knockout JS .html template file in the `requirejs-config.js`
1150
file.
@@ -1620,7 +1659,7 @@ entries:
16201659
type: Technical
16211660
date: April 9, 2020
16221661
link: https://github.com/magento/devdocs/pull/7016
1623-
- description: Fixed a config entry in the the [Custom import entity](https://devdocs.magento.com/guides/v2.3/ext-best-practices/tutorials/custom-import-entity.html)
1662+
- description: Fixed a config entry in the [Custom import entity](https://devdocs.magento.com/guides/v2.3/ext-best-practices/tutorials/custom-import-entity.html)
16241663
topic.
16251664
versions: 2.3.x
16261665
type: Technical

src/_includes/cloud/enable-ssh.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,23 @@ If the directory does not exist or has no SSH key files, you must generate at le
3838

3939
If you have at least one SSH key in your directory, add the key to your Magento and GitHub accounts:
4040

41-
- [Add an SSH key to your GitHub account](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/)
41+
- [Add an SSH key to your GitHub account](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/) and [test the SSH connection](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/testing-your-ssh-connection).
4242
- [Add your public SSH key to your Magento account](#ssh-add-to-account)
4343

44-
### Test the SSH keys {#test}
45-
46-
After adding the SSH keys, test the SSH connection to GitHub:
47-
48-
1. In the terminal, enter the following command:
49-
50-
```bash
51-
52-
```
53-
54-
1. You may see a warning that the authenticity of the host can't be established followed by an RSA fingerprint. Enter `yes` to continue.
55-
56-
1. If successful, you should receive a success message. If you receive a permission denied error, see [Error: Permission denied (publickey)](https://help.github.com/articles/error-permission-denied-publickey) troubleshooting on GitHub.
57-
5844
## Add a public SSH key to your Magento account {#ssh-add-to-account}
5945

6046
You can add SSH keys to your account in any of the following ways:
6147

6248
- Using the [{{site.data.var.ece}} CLI](#add-key-cli)
6349
- Using the [{{site.data.var.ece}} Web Interface](#add-key-web)
50+
- Using the [{{site.data.var.ece}} Cloud account Dashboard](#add-key-cloud)
51+
52+
After you add a key, you must [redeploy active Cloud environments](#update-cloud-environments-with-a-new-ssh-key) to upload the key.
6453

6554
### Add your SSH key using the CLI {#add-key-cli}
6655

6756
{:.procedure}
68-
To add an SSH key using the CLI:
57+
To add an SSH key using the [Magento Cloud CLI]({{site.baseurl}}/cloud/reference/cli-ref-topic.html):
6958

7059
1. Open a terminal application on your local workstation.
7160

@@ -118,8 +107,23 @@ To add an SSH key using the Project Web interface:
118107

119108
- Follow the prompts on your screen to complete the task.
120109

121-
{:.bs-callout-tip}
122-
You can view and manage the SSH keys on your account in _Account settings_. In the upper right corner of the Project Web interface, click **your-user-name** > **Account Settings**.
110+
### Add a key from the Cloud Account dashboard {#add-key-cloud}
111+
112+
You can add your SSH public key directly from the Cloud _Account Settings_ page.
113+
114+
1. Open your [Cloud account page](https://accounts.magento.cloud) and log in if required.
115+
1. On the Cloud account dashboard, click the **Account Settings** tab.
116+
1. Under _SSH keys_, click **Add a public key**.
117+
118+
## Update Cloud environments with a new SSH key
119+
120+
After you add an SSH key, redeploy each active Cloud environment to upload the new key.
121+
122+
Use the [Magento Cloud CLI]({{site.baseurl}}/cloud/reference/cli-ref-topic.html) to redeploy the environment:
123+
124+
```bash
125+
magento-cloud redeploy --project <project-name> --host <host-name> --environment <environment-name>
126+
```
123127

124128
## Set global Git variables
125129

src/_includes/cloud/error-codes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Critical errors indicate a problem with the {{ site.data.var.ece }} project conf
4848
| 106 | | Unable to read the `.schema.yaml` file | |
4949
| 107 | pre-deploy: clean-redis-cache | Failed to clean the Redis cache | Failed to clean the Redis cache. Check that the Redis cache configuration is correct and that the Redis service is available. See [Setup Redis service](https://devdocs.magento.com/cloud/project/services-redis.html). |
5050
| 108 | pre-deploy: set-production-mode | Command `/bin/magento maintenance:enable` failed | Check the `cloud.log` for more information. For more detailed command output, add the `VERBOSE_COMMANDS: '-vvv'` option to the `.magento.env.yaml` file. |
51-
| 109 | validate-config | Incorrect database configuration | Check that the the `DATABASE_CONFIGURATION` environment variable is configured correctly. |
51+
| 109 | validate-config | Incorrect database configuration | Check that the `DATABASE_CONFIGURATION` environment variable is configured correctly. |
5252
| 110 | validate-config | Incorrect session configuration | Check that the `SESSION_CONFIGURATION` environment variable is configured correctly. The configuration must contain at least the `save` parameter. |
5353
| 111 | validate-config | Incorrect search configuration | Check that the `SEARCH_CONFIGURATION` environment variable is configured correctly. The configuration must contain at least the `engine` parameter. |
5454
| 112 | validate-config | Incorrect resource configuration | Check that the `RESOURCE_CONFIGURATION` environment variable is configured correctly. The configuration must contain at least `connection` parameter. |

src/_includes/graphql/create-customer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Attribute | Data Type | Description
22
--- | --- | ---
3-
`date_of_birth` | String | The customer’s date of birth
3+
`date_of_birth` | String | The customer’s date of birth. In keeping with current security and privacy best practices, be sure you are aware of any potential legal and security risks associated with the storage of customers’ full date of birth (month, day, year) along with other personal identifiers, such as full name, before collecting or processing such data.
44
`dob` | String | Deprecated. Use `date_of_birth` instead. The customer’s date of birth
55
`email` | String | The customer’s email address. Required to create a customer
66
`firstname` | String | The customer’s first name. Required to create a customer

src/_includes/graphql/customer-input-24.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Attribute | Data Type | Description
22
--- | --- | ---
33
`addresses` | [CustomerAddress](#customerAddressInput) | An array containing the customer's shipping and billing addresses
44
`created_at` | String | Timestamp indicating when the account was created
5-
`date_of_birth` | String | The customer's date of birth
5+
`date_of_birth` | String | The customer's date of birth. In keeping with current security and privacy best practices, be sure you are aware of any potential legal and security risks associated with the storage of customers’ full date of birth (month, day, year) along with other personal identifiers, such as full name, before collecting or processing such data.
66
`default_billing` | String | The ID assigned to the billing address
77
`default_shipping` | String | The ID assigned to the shipping address
88
`dob` | String | Deprecated. Use `date_of_birth` instead. The customer's date of birth

src/_includes/graphql/customer-input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Attribute | Data Type | Description
22
--- | --- | ---
33
`addresses` | [CustomerAddress](#customerAddressInput) | An array containing the customer's shipping and billing addresses
44
`created_at` | String | Timestamp indicating when the account was created
5-
`date_of_birth` | String | The customer's date of birth
5+
`date_of_birth` | String | The customer's date of birth. In keeping with current security and privacy best practices, be sure you are aware of any potential legal and security risks associated with the storage of customers’ full date of birth (month, day, year) along with other personal identifiers, such as full name, before collecting or processing such data.
66
`default_billing` | String | The ID assigned to the billing address
77
`default_shipping` | String | The ID assigned to the shipping address
88
`dob` | String | Deprecated. Use `date_of_birth` instead. The customer's date of birth

src/_includes/graphql/customer-output-24.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Attribute | Data Type | Description
1818
--- | --- | ---
1919
`addresses` | {{ customeraddress_text }} | An array containing the customer's shipping and billing addresses
2020
`created_at` | String | Timestamp indicating when the account was created
21-
`date_of_birth` | String | The customer's date of birth
21+
`date_of_birth` | String | The customer's date of birth. In keeping with current security and privacy best practices, be sure you are aware of any potential legal and security risks associated with the storage of customers’ full date of birth (month, day, year) along with other personal identifiers, such as full name, before collecting or processing such data.
2222
`default_billing` | String | The ID assigned to the billing address
2323
`default_shipping` | String | The ID assigned to the shipping address
2424
`dob` | String | Deprecated. Use `date_of_birth` instead. The customer's date of birth

src/_includes/graphql/customer-output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Attribute | Data Type | Description
22
--- | --- | ---
33
`addresses` | [CustomerAddress](#customerAddressOutput) | An array containing the customer's shipping and billing addresses
44
`created_at` | String | Timestamp indicating when the account was created
5-
`date_of_birth` | String | The customer's date of birth
5+
`date_of_birth` | String | The customer's date of birth. In keeping with current security and privacy best practices, be sure you are aware of any potential legal and security risks associated with the storage of customers’ full date of birth (month, day, year) along with other personal identifiers, such as full name, before collecting or processing such data.
66
`default_billing` | String | The ID assigned to the billing address
77
`default_shipping` | String | The ID assigned to the shipping address
88
`dob` | String | Deprecated. Use `date_of_birth` instead. The customer's date of birth

src/_includes/install/sampledata/sample-data-clone-24.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ To clone the Magento sample data GitHub repository using the SSH protocol:
8787

8888
1. See [Set file system permissions and ownership](#samp-data-perms).
8989

90+
1. Run the following command:
91+
92+
```bash
93+
bin/magento setup:upgrade
94+
```
95+
9096
### Clone with HTTPS {#instgde-prereq-compose-clone-https}
9197

9298
To clone the Magento sample data GitHub repository using the HTTPS protocol:

src/_includes/install/sampledata/sample-data-clone.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ To clone the Magento sample data GitHub repository using the SSH protocol:
8787

8888
1. See [Set file system permissions and ownership](#samp-data-perms).
8989

90+
1. Run the following command:
91+
92+
```bash
93+
bin/magento setup:upgrade
94+
```
95+
9096
### Clone with HTTPS {#instgde-prereq-compose-clone-https}
9197

9298
To clone the Magento sample data GitHub repository using the HTTPS protocol:

src/_includes/install/sampledata/sample-data_list-of-modules.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
* magento/module-theme-sample-data
2222
* magento/module-widget-sample-data
2323
* magento/module-wishlist-sample-data
24-
* magento/sample-data
2524
* magento/sample-data-media
2625

2726
{{site.data.var.ee}} only:

src/_includes/layout/page-header.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,10 @@ <h2 class="page-subtitle no_toc">{{ page.subtitle }}</h2>
4242
</div>
4343
{% endif %}
4444

45+
{% if page.url contains "safe-upgrade-tool/" %}
46+
<div class="message-banner">
47+
This tool is an ALPHA version with limited scope, available for all Magento Commerce merchants, and only validating PHP Magento APIs and GraphQL schema. If you are a Magento Commerce user you can download it at the <a href="https://repo.magento.com/">Magento repo</a>.
48+
</div>
49+
{% endif %}
50+
4551
</section>

src/_videos/fundamentals/add-new-product-attribute.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
8787

8888
{% endcollapsible %}
8989

90-
## Step 2 Create an InstallData script
90+
## Step 2 Create an InstallData script {#CreateProductAttributeByUpgradeScript}
9191

9292
Next, we need to create the InstallData script.
9393
Because adding an attribute technically adds records into several tables, such as `eav_attribute` and `catalog_eav_attribute,` this is data manipulation, not a schema change.
@@ -196,7 +196,7 @@ For now, we’ll just quickly go through most important ones:
196196
* **visible_on_front:** A flag that defines whether an attribute should be shown on the “More Information” tab on the frontend
197197
* **is_html_allowed_on_front:** Defines whether an attribute value may contain HTML
198198

199-
## Step 3: Add a source model
199+
## Step 3: Add a source model {#AddSourceModel}
200200

201201
Next, we need to create the source model:
202202

@@ -337,3 +337,54 @@ backend model has executed successfully, so now we’ll set it to Wool and save
337337

338338
Having saved the product, we’ll now move to the frontend.
339339
It should be visible and in bold text.
340+
341+
## Product Attribute Option Creation
342+
343+
A product attribute of type multiselect or select will present selectable options to the user. These options may be added manually through the admin panel or by upgrade script. The script process is slightly different depending on whether the options are being added at the moment of attribute creation or whether the options are being added at a later time to an existing attribute.
344+
345+
### Add options to a new prouduct attribute {#AddOptionsAlongNewProductAttribute}
346+
347+
Basic instructions for creating a product attribute by setup or upgrade script can be found [above](#CreateProductAttributeByUpgradeScript). Before scripting the attribute creation, pick one of these two use cases for your options:
348+
349+
1. You want a set of options which cannot be modified by a user through the admin panel and which can only be changed through a future code push.
350+
1. You want a set of options which can be modified, added or deleted through the admin panel.
351+
352+
For use case `1` (an 'immutable' set of options), follow the above instructions ["Add a source model"](#AddSourceModel). You will create a model that contains and dynamically returns the attribute's selectable options to the client.
353+
354+
For use case `2` (a 'mutable' set of options), see ["EAV and extension attributes"]({{ site.baseurl }}/guides/v2.4/extension-dev-guide/attributes.html). Make sure to declare 'Magento\Eav\Model\Entity\Attribute\Source\Table' as the value for the 'source' attribute option. This ensures that Magento will store options in the appropriate database table.
355+
356+
With `\Magento\Eav\Setup\EavSetup.php::addAttribute()` and `\Magento\Eav\Setup\EavSetup.php::addAttributeOptions()` you can add a series of options with the following array:
357+
358+
```php
359+
'option' => ['values' => ['Option 1', 'Option 2', 'Option 3', etc.]];
360+
```
361+
362+
Alternatively, you may designate a specific option sorting order as follows:
363+
364+
```php
365+
'option' => ['values' => [8 => 'Option 1', 3 => 'Option 2', 11 => 'Option 3', etc.]]
366+
```
367+
368+
### Add options to an existing product attribute
369+
370+
* To add options to an 'immutable' set of options, modify the custom source model with the additional options you wish to provide.
371+
372+
* Adding options to a 'mutable' set of options leverages the same `EavSetup` object as you use when creating an attribute with options, but requires an additional step because `EavSetup` needs to know to which attribute you want to assign new options.
373+
374+
1. Assign an array of new options to a variable:
375+
376+
```php
377+
$options = ['attribute_id' => null, 'values' => 'Option 1', 'Option 2', etc]];
378+
```
379+
380+
1. Update your array with the attribute ID from the database:
381+
382+
```php
383+
$options['attribute_id'] = $eavSetup->getAttributeId($eavSetup->getEntityTypeId('catalog_product'), 'your_attribute_code');
384+
```
385+
386+
1. Add your options:
387+
388+
```php
389+
$eavSetup->addAttributeOption($options);
390+
```

src/cloud/docker/docker-containers-service.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ The default Magento Cloud Docker configuration includes the MailHog service as a
163163
By default, MailHog listens on port 1025 for SMTP and port 8025 for the frontend dashboard and API (HTTP). You can change the default ports using the `--mailhog-http-port` and `--mailhog-smtp-port` options. When you build the Docker compose configuration, you can change the default ports:
164164

165165
```bash
166-
./vendor/bin/ece-docker build:compose --mailhog-smtp-port=1026 --mailhog-http-port=8026
166+
./vendor/bin/ece-docker build:compose --mailhog-smtp-port=1025 --mailhog-http-port=8025
167167
```
168168

169-
After updating the configuration and restarting the Docker environment, you can connect to the MailHog service from `http://magento2.docker:8026`, and use port 1026 for SMTP communication.
169+
After updating the configuration and restarting the Docker environment, you can connect to the MailHog service from `http://magento2.docker:8025`, and use port 1025 for SMTP communication.
170170

171171
If needed, you can disable the MailHog service when you generate the Docker compose configuration:
172172

0 commit comments

Comments
 (0)