From 6ce82420bc4f0ee247c4a865baec8f934bcd922f Mon Sep 17 00:00:00 2001 From: Tom Klingenberg Date: Wed, 29 Mar 2017 11:32:11 +0200 Subject: [PATCH] Remove superfluous character in class The solidusbackslash character ("\") was put more than once in the same regex character class across some XSD files. Per each character class there is no need to specify it twice. I ran over this while looking into an issue with class-name validation which do not allow digits within class names. Refs: - https://www.w3.org/TR/xmlschema11-2/#cces - #4470 - #5420 - #8307 --- .../_files/invalidProductOptionsXmlArray.php | 2 +- .../Config/_files/invalidProductTypesXmlArray.php | 8 ++++---- app/code/Magento/Catalog/etc/product_options.xsd | 4 ++-- .../Magento/Catalog/etc/product_types_base.xsd | 4 ++-- .../Model/Config/_files/invalidSystemXmlArray.php | 4 ++-- app/code/Magento/Config/etc/system.xsd | 14 +++++++------- app/code/Magento/Config/etc/system_file.xsd | 2 +- .../Export/Config/_files/invalidExportXmlArray.php | 4 ++-- .../Config/_files/invalidImportMergedXmlArray.php | 4 ++-- .../Import/Config/_files/invalidImportXmlArray.php | 6 +++--- app/code/Magento/ImportExport/etc/export.xsd | 4 ++-- app/code/Magento/ImportExport/etc/import.xsd | 4 ++-- 12 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php index d5dcb3cd01054..aea8166c0ae0e 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php @@ -33,7 +33,7 @@ '', [ "Element 'option', attribute 'renderer': [facet 'pattern'] The value 'true12' is not accepted by the " . - "pattern '[a-zA-Z_\\\\\\\\]+'.\nLine: 1\n", + "pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n", "Element 'option', attribute 'renderer': 'true12' is not a valid value of the atomic" . " type 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php index dbc40e1ac5f24..3da56e9a1481b 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php @@ -23,7 +23,7 @@ '', [ "Element 'type', attribute 'modelInstance': [facet 'pattern'] The value '123' is not accepted by the" . - " pattern '[a-zA-Z_\\\\\\\\]+'.\nLine: 1\n", + " pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n", "Element 'type', attribute 'modelInstance': '123' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -57,7 +57,7 @@ '', [ "Element 'priceModel', attribute 'instance': [facet 'pattern'] The value '123123' is not accepted " . - "by the pattern '[a-zA-Z_\\\\\\\\]+'.\nLine: 1\n", + "by the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n", "Element 'priceModel', attribute 'instance': '123123' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -66,7 +66,7 @@ '', [ "Element 'indexerModel', attribute 'instance': [facet 'pattern'] The value '123' is not accepted by " . - "the pattern '[a-zA-Z_\\\\\\\\]+'.\nLine: 1\n", + "the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n", "Element 'indexerModel', attribute 'instance': '123' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -83,7 +83,7 @@ '', [ "Element 'stockIndexerModel', attribute 'instance': [facet 'pattern'] The value '1234' is not " . - "accepted by the pattern '[a-zA-Z_\\\\\\\\]+'.\nLine: 1\n", + "accepted by the pattern '[a-zA-Z_\\\\]+'.\nLine: 1\n", "Element 'stockIndexerModel', attribute 'instance': '1234' is not a valid value of the atomic " . "type 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/Catalog/etc/product_options.xsd b/app/code/Magento/Catalog/etc/product_options.xsd index 18b5934c1410f..2076309e5eb25 100644 --- a/app/code/Magento/Catalog/etc/product_options.xsd +++ b/app/code/Magento/Catalog/etc/product_options.xsd @@ -61,11 +61,11 @@ - Model name can contain only [a-zA-Z_\\\\]. + Model name can contain only [a-zA-Z_\\]. - + diff --git a/app/code/Magento/Catalog/etc/product_types_base.xsd b/app/code/Magento/Catalog/etc/product_types_base.xsd index eddd7a6845488..955b08b94c3b2 100644 --- a/app/code/Magento/Catalog/etc/product_types_base.xsd +++ b/app/code/Magento/Catalog/etc/product_types_base.xsd @@ -92,11 +92,11 @@ - Model name can contain only [a-zA-Z_\\\\]. + Model name can contain only [a-zA-Z_\\]. - + diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/_files/invalidSystemXmlArray.php b/app/code/Magento/Config/Test/Unit/Model/Config/_files/invalidSystemXmlArray.php index 5dbc216da9d06..418b809e3188d 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/_files/invalidSystemXmlArray.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/_files/invalidSystemXmlArray.php @@ -63,7 +63,7 @@ "Element 'config_path': [facet 'minLength'] The value has a length of '2'; this underruns " . "the allowed minimum length of '5'.\nLine: 1\n", "Element 'config_path': [facet 'pattern'] The value 'co' is not " . - "accepted by the pattern '[a-zA-Z0-9_\\\\\\\\]+/[a-zA-Z0-9_\\\\\\\\]+/[a-zA-Z0-9_\\\\\\\\]+'.\nLine: 1\n", + "accepted by the pattern '[a-zA-Z0-9_\\\\]+/[a-zA-Z0-9_\\\\]+/[a-zA-Z0-9_\\\\]+'.\nLine: 1\n", "Element 'config_path': 'co' is " . "not a valid value of the atomic type 'typeConfigPath'.\nLine: 1\n" ], ], @@ -76,7 +76,7 @@ "Element 'if_module_enabled': [facet 'minLength'] The value has a length of '3'; this underruns the " . "allowed minimum length of '5'.\nLine: 1\n", "Element 'if_module_enabled': [facet 'pattern'] The value 'Som' is not " . - "accepted by the pattern '[A-Z]+[a-zA-Z0-9]{1,}[_\\\\\\\\][A-Z]+[A-Z0-9a-z]{1,}'.\nLine: 1\n", + "accepted by the pattern '[A-Z]+[a-zA-Z0-9]{1,}[_\\\\][A-Z]+[A-Z0-9a-z]{1,}'.\nLine: 1\n", "Element 'if_module_enabled': 'Som' " . "is not a valid value of the atomic type 'typeModule'.\nLine: 1\n" ], ], diff --git a/app/code/Magento/Config/etc/system.xsd b/app/code/Magento/Config/etc/system.xsd index 8579d14a9cf31..e6af09904df50 100644 --- a/app/code/Magento/Config/etc/system.xsd +++ b/app/code/Magento/Config/etc/system.xsd @@ -317,7 +317,7 @@ - + @@ -395,7 +395,7 @@ - + @@ -408,7 +408,7 @@ - + @@ -433,7 +433,7 @@ - + @@ -445,7 +445,7 @@ - + @@ -473,14 +473,14 @@ - + - + diff --git a/app/code/Magento/Config/etc/system_file.xsd b/app/code/Magento/Config/etc/system_file.xsd index 0914312c76362..d89fd93b61327 100644 --- a/app/code/Magento/Config/etc/system_file.xsd +++ b/app/code/Magento/Config/etc/system_file.xsd @@ -474,7 +474,7 @@ - + diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php b/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php index 22539bdee423b..f6687ed9b1fd1 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php @@ -25,11 +25,11 @@ . ' ', [ "Element 'entityType', attribute 'model': [facet 'pattern'] The value '1' is not accepted by the " . - "pattern '[A-Za-z_\\\\\\\\]+'.\nLine: 1\n", + "pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'entityType', attribute 'model': '1' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n", "Element 'fileFormat', attribute 'model': [facet 'pattern'] The value 'model1' is not " . - "accepted by the pattern '[A-Za-z_\\\\\\\\]+'.\nLine: 1\n", + "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'fileFormat', attribute 'model': 'model1' is not a valid " . "value of the atomic type 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php index 35c8a8e854712..c17d686ffbd98 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php @@ -30,7 +30,7 @@ 'behaviorModel="test" />', [ "Element 'entity', attribute 'model': [facet 'pattern'] The value 'afwer34' is not " . - "accepted by the pattern '[A-Za-z_\\\\\\\\]+'.\nLine: 1\n", + "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'entity', attribute 'model': 'afwer34' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -40,7 +40,7 @@ '', [ "Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '666' is not accepted by " . - "the pattern '[A-Za-z_\\\\\\\\]+'.\nLine: 1\n", + "the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'entity', attribute 'behaviorModel': '666' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php index 550bab0fbea01..4b17a5aed3444 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php @@ -19,7 +19,7 @@ '', [ "Element 'entity', attribute 'model': [facet 'pattern'] The value '12345' is not accepted by " . - "the pattern '[A-Za-z_\\\\\\\\]+'.\nLine: 1\n", + "the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'entity', attribute 'model': '12345' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -28,7 +28,7 @@ '', [ "Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '=--09' is not " . - "accepted by the pattern '[A-Za-z_\\\\\\\\]+'.\nLine: 1\n", + "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'entity', attribute 'behaviorModel': '=--09' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], @@ -49,7 +49,7 @@ '', [ "Element 'entityType', attribute 'model': [facet 'pattern'] The value 'test1' is not " . - "accepted by the pattern '[A-Za-z_\\\\\\\\]+'.\nLine: 1\n", + "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n", "Element 'entityType', attribute 'model': 'test1' is not a valid value of the atomic type" . " 'modelName'.\nLine: 1\n" ], diff --git a/app/code/Magento/ImportExport/etc/export.xsd b/app/code/Magento/ImportExport/etc/export.xsd index e6d69809d55b9..bd2a12fe71724 100644 --- a/app/code/Magento/ImportExport/etc/export.xsd +++ b/app/code/Magento/ImportExport/etc/export.xsd @@ -71,11 +71,11 @@ - Model name can contain only [A-Za-z_\\\\]. + Model name can contain only [A-Za-z_\\]. - + diff --git a/app/code/Magento/ImportExport/etc/import.xsd b/app/code/Magento/ImportExport/etc/import.xsd index 4aac9792ce741..04c89248add46 100644 --- a/app/code/Magento/ImportExport/etc/import.xsd +++ b/app/code/Magento/ImportExport/etc/import.xsd @@ -61,11 +61,11 @@ - Model name can contain only [A-Za-z_\\\\]. + Model name can contain only [A-Za-z_\\]. - +