Skip to content

Commit 5d9baba

Browse files
authored
Merge branch 'master' into patch-95
2 parents 93e81ab + c75cf36 commit 5d9baba

File tree

11 files changed

+100
-47
lines changed

11 files changed

+100
-47
lines 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

src/guides/v2.3/ext-best-practices/tutorials/custom-import-entity.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ Next, register the sample file for our entity.
445445
446446
```xml
447447
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
448-
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/import.xsd">
448+
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
449449
<type name="Magento\ImportExport\Model\Import\SampleFileProvider">
450450
<arguments>
451451
<argument name="samples" xsi:type="array">

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/extension-dev-guide/events-and-observers.md

+3
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ The `observer` [xml](https://glossary.magento.com/xml) element has the following
127127
* `disabled` - Determines whether this observer is active or not. Default value is false.
128128
* `shared` - Determines the [lifestyle]({{ page.baseurl }}/extension-dev-guide/build/di-xml-file.html#object-lifestyle-configuration) of the class. Default is `true`.
129129

130+
{: .bs-callout .bs-callout-warning}
131+
The observer name must be unique, or an override will occur.
132+
130133
Below is an example of how to assign observers to watch certain events:
131134

132135
```xml

src/guides/v2.3/extension-dev-guide/message-queues/refresh-config.md

+74-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,81 @@ functional_areas:
66
- System
77
---
88

9-
When Magento is launched, the store's configuration is loaded and copied into memory. Magento uses that copy in memory for queue message transactions. When the store's configuration is updated in the admin, the copy in memory does not automatically refresh, resulting in an outdated in-memory object state.
9+
When Magento is launched, the store's configuration is loaded into memory. Magento uses the in-memory configuration for queue message transactions. When the store's configuration is updated in the admin, the copy in memory does not refresh automatically, resulting in an outdated in-memory object state.
1010

11-
To ensure the copy in memory is re-instantiated after an update, use the `PoisonPill` interface available in the MessageQueue module. Before a new message is processed, the implementation of the `PoisonPillCompareInterface` compares the version of the in-memory copy to the latest in the database. If the versions are different, the in-memory copy is destroyed and a new copy is created when the next `cron:run` job executes.
11+
To ensure the copy in memory is re-instantiated after an update, use the `PoisonPill` interfaces available in the MessageQueue module.
12+
There are three type of the `PoisonPill` interfaces:
1213

13-
In addition to changes in the configuration, a new store view or a new website also trigger the `PoisonPill` interface.
14+
*. `Magento\Framework\MessageQueue\PoisonPill\PoisonPillPutInterface` - The interface contains the `put` method. An implementation of the method puts a new version of poison pill inside the database.
15+
*. `Magento\Framework\MessageQueue\PoisonPill\PoisonPillReadInterface` - The interface contains the `getLatestVersion` method. An implementation of the method gets and returns get latest version of the poison pill.
16+
*. `Magento\Framework\MessageQueue\PoisonPill\PoisonPillCompareInterface` - The interface contains the `isLatestVersion` method. An implementation of the method checks if the version of current poison pill is the latest.
17+
18+
Before a new message is processed, the `PoisonPillCompareInterface` compares the version of the in-memory copy to the latest in the database. If the versions are different, the in-memory copy is destroyed and a new copy is created when the next `cron:run` job executes.
19+
20+
In addition to changes in the configuration, a new store view or a new website can also trigger the `PoisonPill` interface.
1421

1522
If `PoisonPill` determines the copy of the in-memory state needs to be re-instantiated and you have set up a `consumers_runner` cron job, Magento will automatically restart all consumers on the next run of the job. If you did not set up the cron job, you will need to manually restart any consumers that were terminated by `PoisonPill`.
23+
24+
### How to use `PoisonPill` interfaces in Magento {#how-to-use}
25+
26+
The method `put` of `PoisonPillPutInterface` using in the `Magento\Store\Model\Website`
27+
28+
```php
29+
/**
30+
* Clear configuration cache after creation website
31+
* @return $this
32+
* @since 100.2.0
33+
*/
34+
public function afterSave()
35+
{
36+
...
37+
$this->pillPut->put();
38+
return parent::afterSave();
39+
}
40+
```
41+
42+
The method `getLatestVersion` of `PoisonPillReadInterface` using in the `Magento\Framework\MessageQueue\CallbackInvoker`:
43+
44+
```php
45+
/**
46+
* Run short running process
47+
* @param QueueInterface $queue
48+
* @param int $maxNumberOfMessages
49+
* @param \Closure $callback
50+
* @return void
51+
*/
52+
public function invoke(QueueInterface $queue, $maxNumberOfMessages, $callback)
53+
{
54+
$this->poisonPillVersion = $this->poisonPillRead->getLatestVersion();
55+
...
56+
}
57+
```
58+
59+
The method `isLatestVersion` of `PoisonPillCompareInterface` using in the `Magento\Framework\MessageQueue\CallbackInvoker`:
60+
61+
```php
62+
/**
63+
* Run short running process
64+
*
65+
* @param QueueInterface $queue
66+
* @param int $maxNumberOfMessages
67+
* @param \Closure $callback
68+
* @return void
69+
*/
70+
public function invoke(QueueInterface $queue, $maxNumberOfMessages, $callback)
71+
{
72+
$this->poisonPillVersion = $this->poisonPillRead->getLatestVersion();
73+
for ($i = $maxNumberOfMessages; $i > 0; $i--) {
74+
do {
75+
$message = $queue->dequeue();
76+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
77+
} while ($message === null && (sleep(1) === 0));
78+
if (false === $this->poisonPillCompare->isLatestVersion($this->poisonPillVersion)) {
79+
$queue->reject($message);
80+
// phpcs:ignore Magento2.Security.LanguageConstruct.ExitUsage
81+
exit(0);
82+
}
83+
$callback($message);
84+
}
85+
}
86+
```

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/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:

0 commit comments

Comments
 (0)