Skip to content

Commit 1558c20

Browse files
Merge branch 'master' into 2.3-DevdocsPR4
2 parents 5bea446 + 7828cf9 commit 1558c20

File tree

13 files changed

+544
-120
lines changed

13 files changed

+544
-120
lines changed

_includes/config/message-queue-consumers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ Parameter | Value | Required? | Default Value
3131
`--max-messages=<value>` | The maximum number of messages to consume per invocation. If the number of queued messages is less than the specified max, the consumer polls for new messages until it has processed the max. If you don't specify `--max-messages`, the process runs continuously. | No | 50
3232
`--batch-size=<value>` | The number of messages to consume per batch. If specified, messages in a queue are consumed in batches of `<value>` each. This option is applicable for the batch consumer only. If `--batch-size` is not defined, the batch consumer receives all available messages in a queue. | No | 500
3333
`--pid-file-path=<value>` | The file path for saving PID of consumer process. | No | consumer process such as `/var/someConsumer.pid`
34-
`--area-code=<value>` | The area code preferred for consumer process. | No | adminhtml
34+
`--area-code=<value>` | The area code preferred for consumer process. | No | global
3535
`<consumer_name>` | The consumer to start. | Yes | |
3636
{:style="table-layout:auto;"}
3737

3838
After consuming all available messages, the command terminates. You can run the command again manually or with a cron job. You can also run multiple instances of the `magento queue:consumers:start` command to process large message queues. For example, you can append `&` to the command to run it in the background, return to a prompt, and continue running commands:
3939

4040
```bash
4141
bin/magento queue:consumers:start <consumer_name> &
42-
```
42+
```

guides/v2.1/extension-dev-guide/versioning/codebase-changes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The scope of the change determines whether the MAJOR, MINOR, or PATCH number inc
1919
## Public vs private code changes
2020

2121
A Magento module's codebase consists of public and private code.
22+
Public code includes Public {% glossarytooltip 786086f2-622b-4007-97fe-2c19e5283035 %}API{% endglossarytooltip %}(indicated by the `@api` docblock tag) and Public Customization Points.
23+
Private code is not accessible via the API: classes and constants marked as [private][].
2224

2325
Changes in public code always trigger MINOR or MAJOR version increases.
2426

@@ -30,7 +32,7 @@ If this is unavoidable, you must depend on the patch version of the core modules
3032

3133
## API and customization points
3234

33-
Public code includes Public {% glossarytooltip 786086f2-622b-4007-97fe-2c19e5283035 %}API{% endglossarytooltip %}(indicated by the `@api` docblock tag) and Public Customization Points.
35+
3436

3537
Modules call APIs to create new application scenarios.
3638
Modifications that break the API will trigger an increase in a module's MAJOR version.
@@ -163,3 +165,5 @@ Use this table to understand what changes Magento can make and which version num
163165
| | Index added/changed | PATCH |
164166
| | Foreign key added | MAJOR |
165167
| | Temporary tables added/removed/changed | PATCH |
168+
169+
[private]: http://php.net/manual/en/language.oop5.visibility.php

guides/v2.1/install-gde/trouble/php/tshoot_php-set.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,24 @@ functional_areas:
1111
- Setup
1212
---
1313

14-
### always_populate_raw_post_data error {#trouble-php-always}
14+
## always_populate_raw_post_data error {#trouble-php-always}
1515

1616
If you're upgrading the Magento 2 software, the following error can display during the readiness check:
1717

1818
![If all readiness checks pass, click Next and continue with the next step]({{ site.baseurl }}/common/images/upgr_readiness-success.png){:width="700px}
1919

2020
To resolve the error:
2121

22-
1. Locate your `php.ini` using a [`phpinfo.php`]({{ page.baseurl }}/install-gde/prereq/optional.html#install-optional-phpinfo) page.
22+
1. Locate your `php.ini` using a [`phpinfo.php`][] page.
2323

2424
(Sometimes you have a different `php.ini` for the PHP command line and the web server. The `php.ini` you must change displays as **Loaded Configuration File**)
2525

2626
2. As a user with `root` privileges, open `php.ini` in a text editor.
2727
3. Uncomment the following line:
2828

29+
```php?start_inline=1
2930
always_populate_raw_post_data = -1
31+
```
3032
4. Save your changes to `php.ini` and exit the text editor.
3133
5. Wait for all steps in the readiness check to finish.
3234
6. Resolve any other issues displayed by the readiness check.
@@ -39,7 +41,7 @@ To resolve the error:
3941

4042
8. On the readiness check page, click **Try Again**.
4143

42-
### PHP memory limit error {#trouble-php-memory}
44+
## PHP memory limit error {#trouble-php-memory}
4345

4446
The readiness checks makes sure you have at least 1GB of memory set aside for {% glossarytooltip bf703ab1-ca4b-48f9-b2b7-16a81fd46e02 %}PHP{% endglossarytooltip %} processes. This setting should be sufficient for most installations, including installing optional sample data. However, we recommend at least 2GB for debugging.
4547

@@ -62,18 +64,31 @@ To increase your PHP memory limit:
6264
* nginx (both CentOS and Ubuntu): `service nginx restart`
6365
8. Try the installation again.
6466

65-
### xdebug maximum function nesting level error {#trouble-php-xdebug}
67+
68+
## max-input-vars error due to large forms
69+
70+
Configurations with a high number of storeviews, products, attributes, or options can generate forms that exceed the preset PHP limit.
71+
If the number of values sent surpasses the `max-input-vars` limit set within `php.ini` (default is 1000), the remaining data is not transferred and those database values do not get updated.
72+
When this occurs, a warning appears in the PHP log:
73+
74+
```bash
75+
PHP message: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini.
76+
```
77+
There is no 'proper' value for `max-input-vars`; it depends on the size and complexity of your configuration. Modify the value in the `php.ini` file as needed. See [Required PHP settings][].
78+
79+
80+
## xdebug maximum function nesting level error {#trouble-php-xdebug}
6681

6782
See [During installation, xdebug maximum function nesting level error]({{ page.baseurl }}/install-gde/trouble/php/tshoot_xdebug.html).
6883

69-
### Errors display when you access a PHTML template {#trouble-php-asptags}
84+
## Errors display when you access a PHTML template {#trouble-php-asptags}
7085

7186
Error text is typically:
7287

7388
Parse error: syntax error, unexpected 'data' (T_STRING)
7489

75-
#### Solution: Set <code>asp_tags = off</code> in <code>php.ini</code>
76-
Multiple templates have syntax for support abstract level on templates (use different templates engines like Twig) wrapped in `<% %>` tags, like this [template]({{ site.mage2000url }}app/code/Magento/Catalog/view/adminhtml/templates/product/edit/base_image.phtml){:target="_blank"} for displaying a product image:
90+
### Solution: Set <code>asp_tags = off</code> in <code>php.ini</code>
91+
Multiple templates have syntax for support abstract level on templates (use different templates engines like Twig) wrapped in `<% %>` tags, like this [template][]{:target="_blank"} for displaying a product image:
7792

7893
```php?start_inline=1
7994
<img
@@ -83,6 +98,13 @@ Multiple templates have syntax for support abstract level on templates (use diff
8398
alt="<%- data.label %>" />
8499
```
85100

86-
More information about [asp_tags](http://php.net/manual/en/ini.core.php#ini.asp-tags){:target="_blank"}.
101+
More information about [asp_tags][]{:target="_blank"}.
102+
103+
Edit `php.ini` and set `asp_tags = off`. For more information, see [Required PHP settings][].
104+
105+
<!-- Link Reference -->
87106

88-
Edit `php.ini` and set `asp_tags = off`. For more information, see [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html).
107+
[Required PHP settings]: {{ page.baseurl }}/install-gde/prereq/php-settings.html
108+
[asp_tags]: http://php.net/manual/en/ini.core.php#ini.asp-tags
109+
[template]: {{ site.mage2000url }}app/code/Magento/Catalog/view/adminhtml/templates/product/edit/base_image.phtml
110+
[`phpinfo.php`]: {{ page.baseurl }}/install-gde/prereq/optional.html#install-optional-phpinfo

guides/v2.1/mtf/mtf_entities/mtf_scenariotest.md

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ group: functional-testing-framework-guide
33
title: Scenario test
44
---
55

6-
Scenario test is a case of separate test steps where each step is a distinct class. Test steps can be grouped in any order that makes functional testing more agile comparatively with [injectable test].
6+
A scenario test is a case of separate test steps where each step is a distinct class. Test steps can be grouped in any order that makes functional testing more agile comparable to [injectable test].
77

8-
Scenario test has the following advantages:
8+
A scenario test has the following advantages:
99

1010
- Each step in the scenario is a separate {% glossarytooltip bf703ab1-ca4b-48f9-b2b7-16a81fd46e02 %}PHP{% endglossarytooltip %} class that is placed in the {% glossarytooltip c1e4242b-1f1a-44c3-9d72-1d5b1435e142 %}module{% endglossarytooltip %} it belongs to.
11-
- Scenario test reduces code duplication because each step can be used multiple times.
11+
- A scenario test reduces code duplication because each step can be used multiple times.
1212
- Scenario tests are flexible and support Magento modularity.
13-
- New test can be easily created using existing steps.
13+
- A new test can be easily created using existing steps.
1414

15-
Scenario test is split into four logical components:
15+
A scenario test is split into four logical components:
1616

17-
- [test case], which executes tests steps in the order defined in a tests scenario
18-
- [data set], which contains variations of data and constraints for test steps
19-
- [test scenario], which defines order of test steps
20-
- [test step], which contains a test flow
17+
- [test case], which executes tests steps in the order defined in a tests scenario.
18+
- [data set], which contains variations of data and constraints for test steps.
19+
- [test scenario], which defines order of test steps.
20+
- [test step], which contains a test flow.
2121

2222
## Test case class {#test-case}
2323

24-
Test cases are located in `<magento2 root dir>/dev/tests/functional/tests/app/Magento/<module>/Test/TestCase` along with corresponding data sets. Each test case is a PHP class that only runs corresponding scenario, it doesn't contain any other logic than that. In general, the difference between scenario test case and injectable test case is that all test logic is moved to distinct test steps, and their sequence is defined separately in {% glossarytooltip 8c0645c5-aa6b-4a52-8266-5659a8b9d079 %}XML{% endglossarytooltip %} file.
24+
Test cases are located in `<magento2 root dir>/dev/tests/functional/tests/app/Magento/<module>/Test/TestCase` along with the corresponding data sets. Each test case is a PHP class that runs the corresponding scenario. It does not contain any other logic. In general, the difference between a scenario test case and an injectable test case is that all test logic is moved to distinct test steps, and their sequence is defined separately in a {% glossarytooltip 8c0645c5-aa6b-4a52-8266-5659a8b9d079 %}XML{% endglossarytooltip %} file.
2525

2626
Implementation of a scenario test is always the same. You have to change the name of your test case only.
2727

@@ -57,11 +57,11 @@ class FunctionalityYouWantToTest extends Scenario
5757

5858
```
5959

60-
Scenario test case is a PHP class that extends the `\Magento\Mtf\TestCase\Scenario\` class and implements the `test()` method that calls `executeScenario()`. However, the `Scenario` class is not an interface, so the method can have any other name than `test()`.
60+
A scenario test case is a PHP class that extends the `\Magento\Mtf\TestCase\Scenario\` class and implements the `test()` method that calls `executeScenario()`. However, the `Scenario` class is not an interface, so the method can have any name other than `test()`.
6161

6262
## Test scenario {#test-scenario}
6363

64-
Test scenario is a sequence of test steps. Each scenario test case has its own scenario. All scenarios for a module are collected in an XML file located in `<magento2 root dir>dev/tests/functional/tests/app/Magento/<module>/Test/etc/testcase.xml`.
64+
A test scenario is a sequence of test steps. Each scenario test case has its own scenario. All scenarios for a module are collected in an XML file located in `<magento2 root dir>dev/tests/functional/tests/app/Magento/<module>/Test/etc/testcase.xml`.
6565

6666
```xml
6767
<?xml version="1.0"?>
@@ -96,7 +96,7 @@ The example declares a scenario for `TestCase/OnePageCheckoutTest.php` where `<s
9696

9797
### `<step>` element {#step-element}
9898

99-
Each scenario contains test steps as `<step>` child elements. Each `<step>` requires `name` and `module` to define the name of a test step and the module to which it belongs to. All test steps are located in `<module>/Test/TestStep`.
99+
Each scenario contains test steps as `<step>` child elements. Each `<step>` requires `name` and `module` to define the name of a test step and the module to which it belongs. All test steps are located in `<module>/Test/TestStep`.
100100

101101
Example:
102102

@@ -112,9 +112,7 @@ The example defines the following test steps:
112112

113113
#### `next` and `prev` attributes {#next-prev-attributes}
114114

115-
Using `next` and `prev` attributes you can specify previous or next test step as part of the node.
116-
117-
The following examples show tangled structure to demonstrate logic of the attributes.
115+
Use `next` and `prev` attributes to specify previous or next test steps as part of the node.
118116

119117
```xml
120118
<scenario name="OnePageCheckoutTest" firstStep="setupConfiguration">
@@ -140,7 +138,7 @@ Both examples define the following test steps and their sequence:
140138
Sometimes you want to use the same test step more then once in your scenario. In this case, you can use the `alias` attribute to define another name for a step that has been already listed as `<step>`.
141139

142140
{: .bs-callout .bs-callout-info }
143-
Note that you can use `<step>` with the same name in a scenario only once.
141+
You can only use a `<step>` with the same name within a scenario once.
144142

145143
Example:
146144

@@ -160,10 +158,9 @@ The example defines the following test steps and their sequence:
160158

161159
## Test step class {#test-step}
162160

163-
All test steps are located in `<module>/Test/TestStep` as PHP classes in the following format:
161+
The `<module>/Test/TestStep` directory contains each test step as a PHP class with the following format:
164162

165163
```php
166-
167164
<?php
168165

169166
namespace Magento\YourModule\Test\TestStep;
@@ -174,9 +171,9 @@ class YourTestStep implements TestStepInterface
174171
{
175172
public function __construct
176173
(
177-
// data that are required for this step along with other dependencies.
174+
// data and other dependencies required for this step.
178175
) {
179-
// all required classes (fixtures, pages, etc.) have to be assigned here.
176+
// all required classes (fixtures, pages, etc.) are assigned here.
180177
};
181178

182179
public function run()
@@ -190,16 +187,15 @@ class YourTestStep implements TestStepInterface
190187
}
191188

192189
}
193-
194190
```
195191

196-
A tests step must implement `Magento\Mtf\TestStep\TestStepInterface` and define:
192+
A test step must implement `Magento\Mtf\TestStep\TestStepInterface` and define:
197193

198194
- constructor (optional)
199195
- public method `run()` (required)
200196
- public method `cleanup()` (optional)
201197

202-
Let's see a test step on the example with `Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep`.
198+
An example with `Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep`:
203199

204200
{% collapsible Show/hide example %}
205201

@@ -298,32 +294,32 @@ class LoginCustomerOnFrontendStep implements TestStepInterface
298294

299295
### `constructor()` method {#constructor-method}
300296

301-
You can optionally use the `constructor()` method which injects data to be used by `run()`. The data may include classes like pages, variation data, data returned by previous executed steps, etc.
297+
Optionally, you may use the `constructor()` method, which injects data to be used by `run()`. The data may include classes like pages, variation data, data returned by previous executed steps, etc.
302298

303299
On the previous example the `constructor()`:
304300

305-
- injects the `CmsIndex` and `CustomerAccountLogin` pages
306-
- injects the `LogoutCustomerOnFrontendStep` step
307-
- injects the `Customer` fixture data
308-
- assigns arguments to corresponding class properties
301+
- injects the `CmsIndex` and `CustomerAccountLogin` pages.
302+
- injects the `LogoutCustomerOnFrontendStep` step.
303+
- injects the `Customer` fixture data.
304+
- assigns arguments to corresponding class properties.
309305

310306
### `run()` method {#run-method}
311307

312308
The `run()` method is required to perform a test step and contains logic of the step.
313309

314310
On the previous example the `run()` method:
315311

316-
- logs out if the customer was logged in
317-
- clicks 'Sign In' on the `LinksBlock` of the `cmsIndex` page
318-
- waits for requested page loading
319-
- logs in the customer on the `customerAccountLogin` page
320-
- waits for logging in the customer
312+
- logs out if the customer was logged in.
313+
- clicks 'Sign In' on the `LinksBlock` of the `cmsIndex` page.
314+
- waits for requested page loading.
315+
- logs in the customer on the `customerAccountLogin` page.
316+
- waits for logging in the customer.
321317

322318
### `cleanup()` method {#cleanup-method}
323319

324-
The `cleanup()` method is optional. It serves to reset Magento to initial state or execute any other logic after each variation of a test step.
320+
The `cleanup()` method is optional. It serves to reset Magento to an initial state or executes any other logic after each variation of a test step.
325321

326-
On the previous example the `clean()` method:
322+
On the previous example, the `clean()` method:
327323

328324
- logs out the customer
329325

0 commit comments

Comments
 (0)