Skip to content

Commit 63a3c4a

Browse files
authored
Merge branch 'master' into event-observers-warning-about-unique-name
2 parents 35293fb + f887fc7 commit 63a3c4a

File tree

20 files changed

+131
-142
lines changed

20 files changed

+131
-142
lines changed

src/_includes/config/install-java8.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,12 @@ Java version 8 might not be available for all operating systems. For example, yo
3030

3131
To install JDK 1.8 on Ubuntu, enter the following commands as a user with `root` privileges:
3232

33-
```bash
34-
add-apt-repository -y ppa:webupd8team/java
35-
```
36-
3733
```bash
3834
apt-get -y update
3935
```
4036

4137
```bash
42-
apt-get install -y oracle-java8-installer
38+
apt-get install -y openjdk-8-jdk
4339
```
4440

4541
For other options, see [Oracle documentation](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html).

src/cloud/docker/docker-config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ You can run composer using the `docker` command before you create the container
9797
When you run composer with Docker commands, you must use the [Docker Hub PHP Image Tag] that matches the Magento application version. The following example uses PHP 7.3. You run this command from the project root directory.
9898

9999
```bash
100-
docker run -it -v $(pwd):/app/ -v ~/.composer/:/root/.composer/ magento/magento-cloud-docker-php:7.3-cli-1.1 bash -c "composer install&&chown www. /app/"
100+
docker run -it -v $(pwd):/app/:delegated -v ~/.composer/:/root/.composer/:delegated magento/magento-cloud-docker-php:7.3-cli-1.1 bash -c "composer install&&chown www. /app/"
101101
```
102102

103103
This command passes in the current working directory as `/app/`, includes composer from `~/.composer/`, and runs the `composer install` command in the container. After this set up, the command fixes the permissions on the files that have been added or changed.

src/cloud/project/log-locations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Logs are useful for troubleshooting problems related to {{site.data.var.ece}} [b
1313
Magento-specific logs are in the `<magento-root-dir>/var/` directory. See [Magento Logging][configlog] in the _Configuration guide_.
1414

1515
{:.bs-callout-tip}
16-
You can [set up log-based Slack and email notifications][slacklog] when configuring your Cloud environment.
16+
When you configure your Cloud environment, you can [set up log-based Slack and email notifications][slacklog] for build and deploy actions.
1717

1818
## Viewing logs
1919

src/cloud/project/project-upgrade.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ functional_areas:
66
- Upgrade
77
---
88

9-
You can upgrade the core {{site.data.var.ee}} code base to a newer version. It is best to review the summary of the updated [technology stack] before upgrading your project. If you need to upgrade from a version older than 2.1, you must upgrade to a supported version first. See [Upgrades and patches] for upgrade path details.
9+
You can upgrade the core {{site.data.var.ee}} code base to a newer version. Before upgrading your project, review the [{{site.data.var.ece}} service versions][version compatibility matrix] information for the latest software version requirements. If you need to upgrade from a version older than 2.1, you must upgrade to a supported version first. See [Upgrades and patches] for upgrade path details.
1010

1111
{% include cloud/note-upgrade.md %}
1212

1313
{% include cloud/note-ece-tools-package.md %}
1414

15-
## Upgrading from older versions of the Magento application
15+
## Upgrade from older versions of the Magento application
1616

17-
If you are upgrading from 2.1.4 or later to 2.2.x or later, review the [Magento technology stack requirements]. Your upgrade tasks may include the following:
17+
If you are upgrading from 2.1.4 or later to 2.2.x or later, review the [{{site.data.var.ece}} service versions][version compatibility matrix] information for the latest software version requirements. Your upgrade tasks may include the following:
1818

1919
- Upgrade your PHP version
2020
- Convert an older configuration management file
2121
- Update the `.magento.app.yaml` file with new settings for hooks and environment variables
22-
- Upgrade to the latest supported version of Fastly
22+
- Upgrade third-party extensions to the latest supported version
2323
- Update the `.gitignore` file
2424

2525
### Configuration management
2626

27-
If you are upgrading from 2.1.4 or later to 2.2.x or later and use [Configuration Management], you need to migrate the `config.local.php` file. Older versions used a `config.local.php` file for Configuration Management, but version 2.2.0 and later use the `config.php` file. This file works exactly as the `config.local.php` file, with additional settings that include a list of your enabled modules, additional configurations, and a different name.
27+
If you are upgrading from 2.1.4 or later to 2.2.x or later and use [Configuration Management], you need to migrate the `config.local.php` file. Older versions used a `config.local.php` file for Configuration Management, but version 2.2.0 and later use the `config.php` file. This file works exactly like the `config.local.php` file, but it has different configuration settings that include a list of your enabled modules and additional configuration options.
2828

2929
{:.procedure}
3030
To create a temporary `config.php` file:
@@ -86,9 +86,9 @@ To update the `.magento.app.yaml` file:
8686

8787
1. Continue with the upgrade process.
8888

89-
## Upgrading the Magento application
89+
## Upgrade the Magento application
9090

91-
Review the [Magento technology stack requirements] before upgrading your Magento application.
91+
Review the [service versions][version compatibility matrix] information for the latest software version requirements before upgrading your Magento application.
9292

9393
### Back up the database
9494

@@ -173,7 +173,7 @@ To create a system-specific configuration file:
173173
{:.bs-callout-warning}
174174
For an upgrade, you delete the `config.php` file. Once this file is added to your code, you should **not** delete it. If you need to remove or edit settings, you must edit the file manually.
175175

176-
### Upgrading extensions
176+
### Upgrade extensions
177177

178178
Review your third-party extension and module pages in Marketplace or other company sites to verify support for {{site.data.var.ee}} and {{site.data.var.ece}}. If you need to upgrade any third-party extensions and modules, we recommend working in a new Integration branch with your extensions disabled.
179179

@@ -197,7 +197,9 @@ To verify and upgrade your extensions:
197197
1. Push to the Staging environment to test in a pre-production environment.
198198

199199
We strongly recommend upgrading your Production environment _before_ including the upgraded extensions in your go-live process.
200-
We also recommend upgrading to the latest version of the Fastly CDN module for Magento 2.
200+
201+
{:.bs-callout-info}
202+
When you upgrade your Magento version, the upgrade process updates to the latest version of the [Fastly CDN module for Magento 2] automatically.
201203

202204
## Troubleshoot upgrade
203205

@@ -222,11 +224,11 @@ To resolve the error:
222224
git add -A && git commit -m "Fixed deployment failure" && git push magento <branch-name>
223225
```
224226

225-
[technology stack]: {{site.baseurl}}/guides/v2.3/install-gde/system-requirements-tech.html
227+
[version compatibility matrix]: {{site.baseurl}}/cloud/project/project-conf-files_services.html#service-versions
226228
[Upgrades and patches]: {{site.baseurl}}/cloud/project/project-upgrade-parent.html
227-
[Magento technology stack requirements]: {{site.baseurl}}/guides/v2.3/install-gde/system-requirements-tech.html
228229
[Configuration Management]: {{site.baseurl}}/cloud/live/sens-data-over.html
229230
[extensions section of the .magento.app.yaml file]: {{site.baseurl}}/cloud/project/project-conf-files_magento-app.html#configure-php-options
230231
[.magento.app.yaml]: {{site.baseurl}}/cloud/project/project-conf-files_magento-app.html
231232
[version constraint syntax]: {{site.baseurl}}/cloud/project/ece-tools-upgrade-project.html#metapackage
233+
[Fastly CDN module for Magento 2]: {{site.baseurl}}/cloud/cdn/cloud-fastly.html#fastly-cdn-module-for-magento-2
232234
[Examine the logs]: {{site.baseurl}}/cloud/project/log-locations.html

src/cloud/requirements/cloud-requirements.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ You cannot upgrade the software, but you can configure the following services:
6262
* [Elasticsearch]({{ site.baseurl }}/cloud/project/project-conf-files_services-elastic.html)
6363

6464
{:.bs-callout-info}
65-
See [Magento technology stack requirements]({{ site.baseurl }}/guides/v2.3/install-gde/system-requirements-tech.html) for the latest software version requirements.
65+
See the [{{site.data.var.ece}} service versions][version compatibility matrix] information for the latest software version requirements.
6666

6767
For Staging and Production environments, you use the Fastly CDN module for Magento 2 for CDN and caching services. See [Configure Fastly services]({{ site.baseurl }}/cloud/cdn/cloud-fastly.html#fastly-cdn-module-for-magento-2).
6868

@@ -133,3 +133,6 @@ Your {{site.data.var.ee}} account must *authenticate* using any of the following
133133
* Bitbucket
134134
* Google
135135
* Create your own Cloud account
136+
137+
<!--link definitions-->
138+
[version compatibility matrix]: {{site.baseurl}}/cloud/project/project-conf-files_services.html#service-versions
9.66 KB
Loading
Loading
Loading
Loading
Binary file not shown.

src/guides/v2.3/ext-best-practices/tutorials/create-access-control-list-rule.md

+66-13
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ contributor_name: Ziffity
55
contributor_link: https://www.Ziffity.com/
66
---
77

8-
Access Control List (ACL) rules allow an admin to limit the permissions of users in Magento. For example, you can use ACL rules to authorize the users to access menus, controllers, and API endpoints.
8+
Access Control List (ACL) rules allow an admin to limit the permissions of users in Magento. For example, you can use ACL rules to authorize the users to access menus, controllers, API endpoints and conditionally render [layout](https://glossary.magento.com/layout) [blocks](https://glossary.magento.com/block).
99

10-
In this tutorial, we are creating three custom resources (Custom Menu, Create, Delete), then creating a role that has access to these resources, and taking steps to restrict access by three entities (Admin users, controllers, and web APIs).
10+
In this tutorial, we are creating four custom resources (Custom Menu, Create, Delete, View), then creating a role that has access to these resources, and taking steps to restrict access by four entities (Admin users, controllers, web APIs and layout block).
1111

1212
## Step 1. Define the custom resources
1313

@@ -20,8 +20,11 @@ In this tutorial, we are creating three custom resources (Custom Menu, Create, D
2020
<resources>
2121
<resource id="Magento_Backend::admin">
2222
<resource id="Vendor_MyModule::menu" title="Custom Menu" sortOrder="10" >
23-
<resource id="Vendor_MyModule::create" title="Create" sortOrder="0" />
23+
<resource id="Vendor_MyModule::create" title="Create" sortOrder="50" />
2424
<resource id="Vendor_MyModule::delete" title="Delete" sortOrder="100" />
25+
<resource id="Vendor_MyModule::view" title="View" sortOrder="150">
26+
<resource id="Vendor_MyModule::view_additional" title="View Additional Information" sortOrder="10" />
27+
</resource>
2528
</resource>
2629
</resource>
2730
</resources>
@@ -31,9 +34,9 @@ In this tutorial, we are creating three custom resources (Custom Menu, Create, D
3134

3235
| Attribute | Description |
3336
| --------- | ----------- |
34-
| `id` | Unique string and should be in this format: `Vendor_ModuleName::resourceName` |
35-
| `title` | Title which is display on menu bar |
36-
| `sortOrder` | Position in which menu to be disaplay |
37+
| `id` | Unique string. Should be in the format `Vendor_ModuleName::resourceName` |
38+
| `title` | Title which is displayed in the menu bar |
39+
| `sortOrder` | Position in which menu is displayed |
3740

3841
1. Clean the cache by clicking **System** > **Cache Management** > **Flush Magento Cache** or by entering the following command:
3942

@@ -66,19 +69,20 @@ In your module, create the `etc/adminhtml/menu.xml` file. This file defines a me
6669
<add id="Vendor_MyModule::menu" title="Custom Menu" module="Vendor_MyModule" sortOrder="10" resource="Vendor_MyModule::menu"/>
6770
<add id="Vendor_MyModule::create" title="Create" module="Vendor_MyModule" sortOrder="10" parent="Vendor_MyModule::menu" action="custommenu/create/index" resource="Vendor_MyModule::create"/>
6871
<add id="Vendor_MyModule::delete" title="Delete" module="Vendor_MyModule" sortOrder="20" parent="Vendor_MyModule::menu" action="custommenu/delete/index" resource="Vendor_MyModule::delete"/>
72+
<add id="Vendor_MyModule::view" title="View" module="Vendor_MyModule" sortOrder="30" parent="Vendor_MyModule::menu" action="custommenu/view/index" resource="Vendor_MyModule::view"/>
6973
</menu>
7074
</config>
7175
```
7276

7377
| Attribute | Description |
7478
| --------- | ----------- |
75-
| `id` | Unique string and should be in this format: `Vendor_ModuleName::resourceName` |
76-
| `title` | Title which is display on menu bar|
79+
| `id` | Unique string. Should be in the format: `Vendor_ModuleName::resourceName` |
80+
| `title` | Title which is displayed in menu bar|
7781
| `module` | Module which containing the current menu |
78-
| `sortOrder` | Position in which menu to be disaplay |
82+
| `sortOrder` | Position in which menu to be displayed |
7983
| `parent` | The another menu which is parent of current menu |
80-
| `action` | Url of the page which needs to be display after click the menu. It should be in following format: `front_name/controller_path/action` |
81-
| `resource` | To restrict using ACL rule |
84+
| `action` | Url of the page which needs to be displayed after clicking the menu. It should be in following format: `front_name/controller_path/action` |
85+
| `resource` | ACL rule to restrict the access |
8286

8387
Clean the cache by clicking **System** > **Cache Management** > **Flush Magento Cache** or by entering the following command:
8488

@@ -88,7 +92,7 @@ bin/magento cache:clean
8892

8993
The menu displays as follows:
9094

91-
![custom menu]({{ site.baseurl }}/common/images/ext-best-practices/custom_menu.png)
95+
![custom menu]({{ site.baseurl }}/common/images/ext-best-practices/custom_menu.jpg)
9296

9397
### Restrict admin controllers
9498

@@ -112,7 +116,54 @@ protected function _isAllowed()
112116
}
113117
```
114118

115-
If the user doesn't have permission, the action page displays an "Access Denied" message.
119+
If the user does not have permission, the action page displays an "Access Denied" message.
120+
121+
### Content restrictions for admin users
122+
123+
With the ACL it is also possible to [render layout blocks dynamically]({{ page.baseurl }}/frontend-dev-guide/layouts/xml-manage.html#ref_config_block) on the page.
124+
125+
It is enough to set the block's value for `aclResource` attribute:
126+
127+
```xml
128+
<block class="Vendor\MyModule\Block\Adminhtml\Type" name="block.example" aclResource="Vendor_MyModule::view_additional">
129+
<!-- ... -->
130+
</block>
131+
```
132+
133+
The `view/adminhtml/layout/custommenu_view_index.xml` example file below contains two blocks that display information to the end-user, one of which is accessible only to users with ACL `Vendor_MyModule::view_additional` permissions.
134+
135+
```xml
136+
<?xml version="1.0"?>
137+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
138+
<referenceBlock name="page.title">
139+
<action method="setPageTitle">
140+
<argument name="title" xsi:type="string">View</argument>
141+
</action>
142+
</referenceBlock>
143+
<body>
144+
<referenceContainer name="content">
145+
<block class="Magento\Framework\View\Element\Text">
146+
<arguments>
147+
<argument name="text" xsi:type="string">Page Content </argument>
148+
</arguments>
149+
</block>
150+
<block class="Magento\Framework\View\Element\Text" aclResource="Vendor_Module::view_additional">
151+
<arguments>
152+
<argument name="text" xsi:type="string"> - additional</argument>
153+
</arguments>
154+
</block>
155+
</referenceContainer>
156+
</body>
157+
</page>
158+
```
159+
160+
When the ACL resource for `Vendor_ModuleName::view_additional` is enabled, the result is:
161+
162+
![admin page full content]({{ site.baseurl }}/common/images/ext-best-practices/acl-admin-page-content-full-access.jpg)
163+
164+
When the ACL resource is disabled, the content on the page differs:
165+
166+
![admin page content limited]({{ site.baseurl }}/common/images/ext-best-practices/acl-admin-limited-page-content.jpg)
116167

117168
## Step 3. Restrict web API access
118169

@@ -136,3 +187,5 @@ We can restrict users from accessing API endpoints by using the ACL rule. By cre
136187
* [Creating a Magento admin page]({{ page.baseurl }}/ext-best-practices/extension-coding/example-module-adminpage.html)
137188

138189
* [Authentication]({{ page.baseurl }}/get-started/authentication/gs-authentication.html)
190+
191+
* [Layout block dynamic visibility using ACL Resource]({{ page.baseurl }}/frontend-dev-guide/layouts/xml-manage.html#ref_config_block)

src/guides/v2.3/extension-dev-guide/build/module-file-structure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Following are some common module directories:
2323
* `etc`: contains configuration files; in particular, `module.xml`, which is required.
2424
* `Model`: contains PHP model classes as part of MVC vertical implementation of module logic.
2525
* `Setup`: contains classes for module database structure and data setup which are invoked when installing or upgrading.
26-
* `ViewModel`: contains PHP model clasees as part of a model-view-viewmodel (MVVM) implementation. It allows developers to offload features and business logic from block classes into separate classes that are easier to maintain, test, and reuse.
26+
* `ViewModel`: contains PHP model classes as part of a model-view-viewmodel (MVVM) implementation. It allows developers to offload features and business logic from block classes into separate classes that are easier to maintain, test, and reuse.
2727

2828
#### Additional directories
2929
{:.no_toc}

src/guides/v2.3/frontend-dev-guide/css-guide/css_quick_guide_approach.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ To extend a Module's styles in your theme:
109109
│ ├── web/
110110
│ │ ├── css/
111111
│ │ │ ├── source/
112-
├──_extend.less
112+
├──_extend.less
113113
...
114114
```
115115

src/guides/v2.3/frontend-dev-guide/layouts/layout-types.md

+2
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ The following table describes the instructions specific for page configuration f
182182
<li><code>&lt;css&gt;</code></li>
183183
<li><code>&lt;font&gt;</code></li>
184184
<li><code>&lt;script&gt;</code></li>
185+
<li><code>&lt;remove&gt;</code></li>
186+
<li><code>&lt;attribute&gt;</code></li>
185187
</ul>
186188
</td>
187189
<td colspan="1" />

src/guides/v2.3/frontend-dev-guide/layouts/xml-manage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ To set attributes for the HTML `body` tag use the `<attribute>` instruction.
229229
**Example:** Add a new class to the `body` tag.
230230

231231
```xml
232-
<page>
233232
<body>
234233
<attribute name="class" value="my-new-body-class"/>
235234
</body>
236-
</page>
237235
```
238236

237+
![Block Class]({{ site.baseurl }}/common/images/body-class-result.png)
238+
239239
**Example:** Add a custom attribute to the `body` tag.
240240

241241
```xml

src/guides/v2.3/graphql/develop/resolvers.md

-26
Original file line numberDiff line numberDiff line change
@@ -221,32 +221,6 @@ Syntax option | Description
221221
`@doc(description)` | Describes the purpose of the mutation
222222
`@deprecated(reason: "description")` | Use `@deprecated` to mark a query, mutation, or attribute as deprecated
223223

224-
{:.bs-callout-tip}
225-
It is a good practice to define separate types for input and output data. This practice permits additional extension points, so every input and output type can be extended by adding additional fields to the definition.
226-
227-
#### Example
228-
229-
**Wrong approach:**
230-
231-
```text
232-
type Mutation {
233-
mutationQueryName(param1: String, param2: Int, ...): MutationQueryOutput @resolver(class: "Magento\\<module_name>\\Model\\Resolver\\MutationResolverModel") @doc(description:"Mutation query description")
234-
}
235-
```
236-
237-
**Correct approach:**
238-
239-
```text
240-
type Mutation {
241-
mutationQueryName(inputParam: InputParamsType): MutationQueryOutput @resolver(class: "Magento\\<module_name>\\Model\\Resolver\\MutationResolverModel") @doc(description:"Mutation query description")
242-
}
243-
244-
type InputParamsType {
245-
param1: String
246-
param2: Int
247-
}
248-
```
249-
250224
### Resolver class
251225

252226
Use the following sample code as a template for the GraphQL resolver mutation class:

src/guides/v2.3/graphql/mutations/add-configurable-products.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The `AddConfigurableProductsToCartInput` object contains the following attribute
8989

9090
Attribute | Type | Description
9191
--- | --- | ---
92-
`cart_id` | String | The unique ID that identifies the customer's cart
92+
`cart_id` | String! | The unique ID that identifies the customer's cart
9393
`cart_items` | [[ConfigurableProductCartItemInput]](#configProdCartItemInput) | An array of configurable items to add to the cart
9494

9595
### ConfigurableProductCartItemInput object {#configProdCartItemInput}

0 commit comments

Comments
 (0)