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

Fixing MD046 errors part 3 #6634

Merged
merged 1 commit into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/guides/v2.3/comp-mgr/cli/cli-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,18 @@ If the Magento updater is installed, remove and recreate it. It is located in th

_{{ ce }} version {{ page.guide_version }}.3:_

```bash
composer create-project --repository=https://repo.magento.com magento/project-community-edition={{ page.guide_version }}.3 temp_dir --no-install
```
```bash
composer create-project --repository=https://repo.magento.com magento/project-community-edition={{ page.guide_version }}.3 temp_dir --no-install
```

_{{ ee }} version {{ page.guide_version }}.3:_
_{{ ee }} version {{ page.guide_version }}.3:_

```bash
composer create-project --repository=https://repo.magento.com magento/project-enterprise-edition={{ page.guide_version }}.3 temp_dir --no-install
```
```bash
composer create-project --repository=https://repo.magento.com magento/project-enterprise-edition={{ page.guide_version }}.3 temp_dir --no-install
```

{:.bs-callout-info}
If you need to use a repository that contains non-public packages, such as internal sandboxes, change the URL in `--repository` accordingly.
{:.bs-callout-info}
If you need to use a repository that contains non-public packages, such as internal sandboxes, change the URL in `--repository` accordingly.

1. Remove the old `update/` directory and move `temp_dir/update/` to the `update/` directory:

Expand All @@ -167,7 +167,7 @@ If the Magento updater is installed, remove and recreate it. It is located in th

1. Update the `"name"`, `"version"`, and `"description"` fields in the `composer.json` file as needed.

{:.bs-callout-info}
{:.bs-callout-info}
Updating the metadata in `composer.json` file is entirely superficial, not functional.

1. Apply updates.
Expand Down Expand Up @@ -200,7 +200,7 @@ Manually clear caches and generated content.
rm -rf generated/code/*
```

{:.bs-callout-info}
{:.bs-callout-info}
If you use a cache storage other than the filesystem, such as Redis or Memcached, you must manually clear the cache there too.

1. Update the database schema and data.
Expand Down
28 changes: 14 additions & 14 deletions src/guides/v2.3/comp-mgr/trouble/cman/maint-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,20 @@ To redirect traffic to a custom maintenance page:
* Redirect all traffic to the maintenance page
* Whitelist certain IPs so an administrator can run the System Upgrade utility to upgrade the Magento software.

The following example whitelists 192.0.2.110.

Add the following at the end of your Apache configuration file:

```terminal
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^192\.0\.2\.110
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /maintenance.html [R=503,L]
ErrorDocument 503 /maintenance.html
Header Set Cache-Control "max-age=0, no-store"
```
The following example whitelists 192.0.2.110.

Add the following at the end of your Apache configuration file:

```terminal
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^192\.0\.2\.110
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /maintenance.html [R=503,L]
ErrorDocument 503 /maintenance.html
Header Set Cache-Control "max-age=0, no-store"
```

1. Restart Apache:

Expand Down
22 changes: 11 additions & 11 deletions src/guides/v2.3/config-guide/cli/config-cli-subcommands-compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,22 @@ In some cases, you might want to compile code before you install the Magento app

1. Enable the modules.

```bash
bin/magento module:enable --all [-c|--clear-static-content]
```
```bash
bin/magento module:enable --all [-c|--clear-static-content]
```

Use the `[-c|--clear-static-content]` option to clear [static content](https://glossary.magento.com/static-content). This is necessary if you previously enabled or disabled modules and you must clear the static content previously generated for them.
Use the `[-c|--clear-static-content]` option to clear [static content](https://glossary.magento.com/static-content). This is necessary if you previously enabled or disabled modules and you must clear the static content previously generated for them.

See [Enable modules]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-enable.html).
See [Enable modules]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-enable.html).

1. Compile the code.

```bash
bin/magento setup:di:compile
```
```bash
bin/magento setup:di:compile
```

```terminal
Generated code and dependency injection configuration successfully.
```
```terminal
Generated code and dependency injection configuration successfully.
```

To compile code without a database, see [Deploy static view files without installing Magento]({{ page.baseurl }}/config-guide/cli/config-cli-subcommands-static-view.html#deploy_without_db).
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,21 @@ The `bin/magento app:config:import` command does not process configuration store

On your production system, run the following command to import data from the configuration files (`config.php` and `env.php`) to the database:

bin/magento app:config:import [-n, --no-interaction]
```bash
bin/magento app:config:import [-n, --no-interaction]
```

Use the optional `[-n, --no-interaction]` flag to import data without any interaction.

If you enter `bin/magento app:config:import` without the optional flag, you're required to confirm the changes.

For example, if configuration file contains one new [website](https://glossary.magento.com/website) and one new store, the following message is displayed:

These Websites will be created: New Website
These Groups will be created: New Store
Do you want to continue [yes/no]?
```terminal
These Websites will be created: New Website
These Groups will be created: New Store
Do you want to continue [yes/no]?
```

To continue the import, enter `yes`.

Expand Down
14 changes: 9 additions & 5 deletions src/guides/v2.3/config-guide/cli/config-cli-subcommands-cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ To remove the Magento crontab:
1. Change to the Magento installation directory.
1. Enter the following command:

```bash
bin/magento cron:remove
```
```bash
bin/magento cron:remove
```

{:.bs-callout-info}
This command has no effect on cron jobs outside the `#~ MAGENTO START` and `#~ MAGENTO END` comments in your crontab.
Expand All @@ -49,11 +49,15 @@ where `--group` specifies the cron group to run (omit this option to run cron fo

To run the indexing cron job, enter:

`bin/magento cron:run --group index`
```bash
bin/magento cron:run --group index
```

To run the default cron job, enter:

`bin/magento cron:run --group default`
```bash
bin/magento cron:run --group default
```

To set up custom cron jobs and groups, see [Configure custom cron jobs and cron groups]({{ page.baseurl }}/config-guide/cron/custom-cron.html).

Expand Down
104 changes: 53 additions & 51 deletions src/guides/v2.3/config-guide/cli/config-cli-subcommands-i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ The translation cannot contain placeholder values not present in the original va

An example of translating a phrase:

"Buy %1 for %2 (%3 incl. tax) each","Compre %1 por %2 (%3 incl. imposto) cada"
```text
"Buy %1 for %2 (%3 incl. tax) each","Compre %1 por %2 (%3 incl. imposto) cada"
```

## Create a language package {#config-cli-subcommands-xlate-pack}

Expand Down Expand Up @@ -263,56 +265,56 @@ Similar to the preceding example, generate a `.csv` file, but instead of specify
- `registration.php` (sample following)
- `language.xml` (sample following)

**Sample `composer.json`:**

```json
{
"name": "examplecorp/language-xx_yy",
"description": "Sample language",
"version": "100.0.2",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"magento/framework": "100.0.*"
},
"type": "magento2-language",
"autoload": {
"files": [
"registration.php"
]
}
}
```

**Sample `registration.php`:**

```php?start_inline=1
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
use \Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register(ComponentRegistrar::LANGUAGE, 'magento_xx_yy', __DIR__);
```

**Sample `language.xml`:**

```xml
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
<code>xx_YY</code>
<vendor>examplecorp</vendor>
<package>xx_yy</package>
</language>
```
**Sample `composer.json`:**

```json
{
"name": "examplecorp/language-xx_yy",
"description": "Sample language",
"version": "100.0.2",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"magento/framework": "100.0.*"
},
"type": "magento2-language",
"autoload": {
"files": [
"registration.php"
]
}
}
```

**Sample `registration.php`:**

```php?start_inline=1
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
use \Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register(ComponentRegistrar::LANGUAGE, 'magento_xx_yy', __DIR__);
```

**Sample `language.xml`:**

```xml
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
<code>xx_YY</code>
<vendor>examplecorp</vendor>
<package>xx_yy</package>
</language>
```

## Additional information

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ Before you run this command, all of the following must be true:

- The `Magento_Developer` [module](https://glossary.magento.com/module) must be enabled. You can enable it as follows:

bin/magento module:enable [--force] Magento_Developer
```bash
bin/magento module:enable [--force] Magento_Developer
```

Use the `--force` option only if it's necessary.
Use the `--force` option only if it's necessary.

- Your system must be set up to run the desired tests.

Expand Down
14 changes: 9 additions & 5 deletions src/guides/v2.3/config-guide/config/config-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ To create a new configuration type, extend the `\Magento\Framework\Config\Reader

For example, to merge the XML files:

array(
'</path/to/node>' => '<identifierAttributeName>',
'</path/to/other/node>' => '<identifierAttributeName>',
}
```php
array(
'</path/to/node>' => '<identifierAttributeName>',
'</path/to/other/node>' => '<identifierAttributeName>',
}
```

* `$defaultScope`. Defines the configuration scope to be read by default. The default value for this parameter is global scope.

Expand All @@ -71,7 +73,9 @@ If you have an `events.xml` file and a first `events.xsd` file, the XSD files fo

To ensure validation of an XML file by appropriate XSD file, you must add the Uniform Resource Name (URN) to the XSD file in the XML file. For example:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager:etc/config.xsd">
```xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager:etc/config.xsd">
```

Your IDE can validate your configuration files at both runtime and during development.

Expand Down
16 changes: 8 additions & 8 deletions src/guides/v2.3/config-guide/deployment/pipeline/build-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ To set up the build system:
1. If you use Git, open `.gitignore` in a text editor.
1. Start each of the following lines with a `#` character to comment them out:

```conf
# app/etc/config.php
# pub/media/*
# generated/*
# pub/media/*.*
# pub/media/wysiwyg/*
# pub/static/*
```
```conf
# app/etc/config.php
# pub/media/*
# generated/*
# pub/media/*.*
# pub/media/wysiwyg/*
# pub/static/*
```

1. Save your changes to `.gitignore` and exit the text editor.
1. If you use Git, use the following commands to commit the change:
Expand Down
30 changes: 15 additions & 15 deletions src/guides/v2.3/config-guide/elasticsearch/es-config-stopwords.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ To change the directory:

1. Change the value of `fileDir` to the desired directory:

```xml
<type name="Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords">
<arguments>
<argument name="stopwordsDirectory" xsi:type="string">app/code/Magento/Elasticsearch/etc/stopwords</argument>
</arguments>
</type>
```
```xml
<type name="Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords">
<arguments>
<argument name="stopwordsDirectory" xsi:type="string">app/code/Magento/Elasticsearch/etc/stopwords</argument>
</arguments>
</type>
```

Save your changes to `di.xml` and exit the text editor.

Expand All @@ -133,14 +133,14 @@ Save your changes to `di.xml` and exit the text editor.
1. [Create a new module](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/module-file-structure.html){:target="_blank"}
1. In your module `etc/di.xml` add instructions:

```xml
<type name="Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords">
<arguments>
<argument name="stopwordsModule" xsi:type="string">Your_Module</argument>
<argument name="stopwordsDirectory" xsi:type="string">stopwords</argument>
</arguments>
</type>
```
```xml
<type name="Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords">
<arguments>
<argument name="stopwordsModule" xsi:type="string">Your_Module</argument>
<argument name="stopwordsDirectory" xsi:type="string">stopwords</argument>
</arguments>
</type>
```

1. In your module, create the directory `etc/stopwords`, with the corresponding `.csv`.

Expand Down
Loading