Skip to content

Commit b0a8802

Browse files
author
Yevhen Miroshnychenko
authored
Merge pull request magento#755 from magento/MCLOUD-6381
MCLOUD-6381: Update error descriptions
2 parents f784060 + 882621d commit b0a8802

File tree

30 files changed

+50
-44
lines changed

30 files changed

+50
-44
lines changed

config/schema.error.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
step: validate-config
440440
type: warning
441441
!php/const Magento\MagentoCloud\App\Error::WARN_NOT_CORRECT_LOCAL_XML_FILE:
442-
title: 'Invalid file config ./pub/errors/local.xml'
442+
title: 'Invalid configuration in the ./pub/errors/local.xml file.'
443443
stage: deploy
444444
step: validate-config
445445
type: warning
@@ -544,7 +544,7 @@
544544
step: 'install-update:split-db'
545545
type: warning
546546
!php/const Magento\MagentoCloud\App\Error::WARN_NOT_ENOUGH_DATA_SPLIT_DB_VAR:
547-
title: 'The SPLIT_DB variable does not have data which were already split.'
547+
title: 'The SPLIT_DB variable is missing the configuration for split connection types.'
548548
stage: deploy
549549
step: 'install-update:split-db'
550550
type: warning

dist/error-codes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
| 2001 | pre-deploy:cache | Cache is configured for a Redis service that is not available. Configuration will be ignored. | |
122122
| 2002 | validate-config | The configured state is not ideal | |
123123
| 2003 | validate-config | The directory nesting level value for error reporting has not been configured | |
124-
| 2004 | validate-config | Invalid file config ./pub/errors/local.xml | |
124+
| 2004 | validate-config | Invalid configuration in the ./pub/errors/local.xml file. | |
125125
| 2005 | validate-config | Admin data is used to create an admin user during initial installation only. Any changes to Admin data are ignored during the upgrade process. | After the initial installation, you can remove admin data from the configuration. |
126126
| 2006 | validate-config | Admin user was not created as admin email was not set | After installation, you can create an admin user manually: Use ssh to connect to your environment. Then, run the `bin/magento admin:user:create` command. |
127127
| 2007 | validate-config | Update php version to recommended version | |
@@ -141,7 +141,7 @@
141141
| 2021 | install-update:db-connection | For split databases used custom connections | |
142142
| 2022 | install-update:db-connection | You have changed to a database configuration that is not compatible with the slave connection. | |
143143
| 2023 | install-update:split-db | Enabling a split database will be skipped. | |
144-
| 2024 | install-update:split-db | The SPLIT_DB variable does not have data which were already split. | |
144+
| 2024 | install-update:split-db | The SPLIT_DB variable is missing the configuration for split connection types. | |
145145
| 2025 | install-update:split-db | Slave connection not set. | |
146146

147147
### Post-deploy stage

src/Command/ErrorShow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8787
} else {
8888
$errors = $this->reader->read();
8989
if (empty($errors)) {
90-
$output->writeln('The error log is empty or doesn\'t exist');
90+
$output->writeln('The error log is empty or does not exist');
9191

9292
return 1;
9393
}

src/Config/Schema/Validator/SplitDb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function validate(string $key, $value): ResultInterface
3737
if (array_diff($value, DeployInterface::SPLIT_DB_VALUES)) {
3838
return $this->resultFactory->error(sprintf(
3939
'The %s variable contains the invalid value. '
40-
. 'It should be array with next available values: [%s].',
40+
. 'It should be an array with following values: [%s].',
4141
$key,
4242
implode(', ', DeployInterface::SPLIT_DB_VALUES)
4343
));

src/Config/Validator/Deploy/DebugLogging.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ public function validate(): ResultInterface
6666

6767
return $this->resultFactory->error(
6868
'Debug logging is enabled in Magento',
69-
'To save space in Magento Cloud, '
70-
. 'debug logging should not be enabled for your production environments.',
69+
'To save space in Magento Cloud, disable debug logging for your production environments.',
7170
Error::WARN_DEBUG_LOG_ENABLED
7271
);
7372
}

src/Config/Validator/Deploy/ElasticSearchUsage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function validate(): Validator\ResultInterface
7474

7575
return $this->resultFactory->error(
7676
'Elasticsearch service is installed at infrastructure layer but is not used as a search engine.',
77-
'Consider removing elasticsearch service from infrastructure layer for optimized resource usage.',
77+
'Consider removing the Elasticsearch service from the infrastructure layer for optimized resource usage.',
7878
Error::WARN_ES_INSTALLED_BUT_NOT_USED
7979
);
8080
}

src/Config/Validator/Deploy/PhpVersion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function validate(): Validator\ResultInterface
102102
$currentPhpConstraint->getPrettyString()
103103
),
104104
"Change the version of PHP to the version that satisfies the restriction conditions.\n"
105-
. 'Change the PHP version in the .magento.app.yaml file or create a support ticket',
105+
. 'Change the PHP version in the .magento.app.yaml file, or create a support ticket',
106106
Error::WARN_UPDATE_PHP_VERSION
107107
);
108108
}

src/Config/Validator/Deploy/ReportDirNestingLevel.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,19 @@ public function validate(): Validator\ResultInterface
8585

8686
return $this->resultFactory->error(
8787
'The directory nesting level value for error reporting has not been configured.',
88-
'You can configure the setting using the `config.report.dir_nesting_level`'
88+
'You can configure the setting using the `config.report.dir_nesting_level` variable'
8989
. ' in the file ' . $reportConfigFile,
9090
Error::WARN_DIR_NESTING_LEVEL_NOT_CONFIGURED
9191
);
9292
} catch (FileSystemException $exception) {
9393
return $this->resultFactory->error($exception->getMessage());
9494
} catch (NotEncodableValueException $exception) {
95-
$message = sprintf('Config of the file %s is invalid. ', $reportConfigFile);
96-
$message .= $exception->getMessage();
95+
$message = sprintf(
96+
'Invalid configuration in the %s file. %s',
97+
$reportConfigFile,
98+
$exception->getMessage()
99+
);
100+
97101
return $this->resultFactory->error(
98102
$message,
99103
'Fix the directory nesting level configuration for error reporting in the file '

src/Config/Validator/Deploy/SolrIntegrity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function validate(): ResultInterface
6363

6464
if ($this->magentoVersion->satisfies('2.1.*')) {
6565
$args['suggestion'] = 'Solr support has been deprecated in Magento 2.1. ' .
66-
'Update your search engine to Elasticsearch and remove this relationship.';
66+
'Remove this relationship and use Elasticsearch.';
6767
$args['errorCode'] = Error::WARN_SOLR_DEPRECATED;
6868
}
6969

src/DB/Data/ConnectionFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function create(string $connectionType): ConnectionInterface
6868
return $this->getConnectionData(DbConfig::CONNECTION_SALES, false);
6969
default:
7070
throw new RuntimeException(
71-
sprintf('Connection with type %s doesn\'t exist', $connectionType)
71+
sprintf('Connection with type %s does not exist', $connectionType)
7272
);
7373
}
7474
}

0 commit comments

Comments
 (0)