You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _includes/config/message-queue-consumers.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,12 +31,12 @@ Parameter | Value | Required? | Default Value
31
31
`--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
32
32
`--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
33
33
`--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
35
35
`<consumer_name>` | The consumer to start. | Yes | |
36
36
{:style="table-layout:auto;"}
37
37
38
38
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:
Copy file name to clipboardExpand all lines: guides/v2.1/extension-dev-guide/versioning/codebase-changes.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ The scope of the change determines whether the MAJOR, MINOR, or PATCH number inc
19
19
## Public vs private code changes
20
20
21
21
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][].
22
24
23
25
Changes in public code always trigger MINOR or MAJOR version increases.
24
26
@@ -30,7 +32,7 @@ If this is unavoidable, you must depend on the patch version of the core modules
30
32
31
33
## API and customization points
32
34
33
-
Public code includes Public {% glossarytooltip 786086f2-622b-4007-97fe-2c19e5283035 %}API{% endglossarytooltip %}(indicated by the `@api` docblock tag) and Public Customization Points.
35
+
34
36
35
37
Modules call APIs to create new application scenarios.
36
38
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
If you're upgrading the Magento 2 software, the following error can display during the readiness check:
17
17
18
18
{:width="700px}
19
19
20
20
To resolve the error:
21
21
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.
23
23
24
24
(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**)
25
25
26
26
2. As a user with `root` privileges, open `php.ini` in a text editor.
27
27
3. Uncomment the following line:
28
28
29
+
```php?start_inline=1
29
30
always_populate_raw_post_data = -1
31
+
```
30
32
4. Save your changes to `php.ini` and exit the text editor.
31
33
5. Wait for all steps in the readiness check to finish.
32
34
6. Resolve any other issues displayed by the readiness check.
@@ -39,7 +41,7 @@ To resolve the error:
39
41
40
42
8. On the readiness check page, click **Try Again**.
41
43
42
-
###PHP memory limit error {#trouble-php-memory}
44
+
## PHP memory limit error {#trouble-php-memory}
43
45
44
46
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.
45
47
@@ -62,18 +64,31 @@ To increase your PHP memory limit:
62
64
* nginx (both CentOS and Ubuntu): `service nginx restart`
63
65
8. Try the installation again.
64
66
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}
66
81
67
82
See [During installation, xdebug maximum function nesting level error]({{ page.baseurl }}/install-gde/trouble/php/tshoot_xdebug.html).
68
83
69
-
###Errors display when you access a PHTML template {#trouble-php-asptags}
84
+
## Errors display when you access a PHTML template {#trouble-php-asptags}
####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:
77
92
78
93
```php?start_inline=1
79
94
<img
@@ -83,6 +98,13 @@ Multiple templates have syntax for support abstract level on templates (use diff
83
98
alt="<%- data.label %>" />
84
99
```
85
100
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 -->
87
106
88
-
Edit `php.ini` and set `asp_tags = off`. For more information, see [Required PHP settings]({{ page.baseurl }}/install-gde/prereq/php-settings.html).
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].
7
7
8
-
Scenario test has the following advantages:
8
+
A scenario test has the following advantages:
9
9
10
10
- 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.
12
12
- 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.
14
14
15
-
Scenario test is split into four logical components:
15
+
A scenario test is split into four logical components:
16
16
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.
21
21
22
22
## Test case class {#test-case}
23
23
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.
25
25
26
26
Implementation of a scenario test is always the same. You have to change the name of your test case only.
27
27
@@ -57,11 +57,11 @@ class FunctionalityYouWantToTest extends Scenario
57
57
58
58
```
59
59
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()`.
61
61
62
62
## Test scenario {#test-scenario}
63
63
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`.
65
65
66
66
```xml
67
67
<?xml version="1.0"?>
@@ -96,7 +96,7 @@ The example declares a scenario for `TestCase/OnePageCheckoutTest.php` where `<s
96
96
97
97
### `<step>` element {#step-element}
98
98
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`.
100
100
101
101
Example:
102
102
@@ -112,9 +112,7 @@ The example defines the following test steps:
112
112
113
113
#### `next` and `prev` attributes {#next-prev-attributes}
114
114
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.
@@ -140,7 +138,7 @@ Both examples define the following test steps and their sequence:
140
138
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>`.
141
139
142
140
{: .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.
144
142
145
143
Example:
146
144
@@ -160,10 +158,9 @@ The example defines the following test steps and their sequence:
160
158
161
159
## Test step class {#test-step}
162
160
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:
164
162
165
163
```php
166
-
167
164
<?php
168
165
169
166
namespace Magento\YourModule\Test\TestStep;
@@ -174,9 +171,9 @@ class YourTestStep implements TestStepInterface
174
171
{
175
172
public function __construct
176
173
(
177
-
// data that are required for this step along with other dependencies.
174
+
// data and other dependencies required for this step.
178
175
) {
179
-
// all required classes (fixtures, pages, etc.) have to be assigned here.
176
+
// all required classes (fixtures, pages, etc.) are assigned here.
180
177
};
181
178
182
179
public function run()
@@ -190,16 +187,15 @@ class YourTestStep implements TestStepInterface
190
187
}
191
188
192
189
}
193
-
194
190
```
195
191
196
-
A tests step must implement `Magento\Mtf\TestStep\TestStepInterface` and define:
192
+
A test step must implement `Magento\Mtf\TestStep\TestStepInterface` and define:
197
193
198
194
- constructor (optional)
199
195
- public method `run()` (required)
200
196
- public method `cleanup()` (optional)
201
197
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`:
203
199
204
200
{% collapsible Show/hide example %}
205
201
@@ -298,32 +294,32 @@ class LoginCustomerOnFrontendStep implements TestStepInterface
298
294
299
295
### `constructor()` method {#constructor-method}
300
296
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.
302
298
303
299
On the previous example the `constructor()`:
304
300
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.
309
305
310
306
### `run()` method {#run-method}
311
307
312
308
The `run()` method is required to perform a test step and contains logic of the step.
313
309
314
310
On the previous example the `run()` method:
315
311
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.
321
317
322
318
### `cleanup()` method {#cleanup-method}
323
319
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.
0 commit comments