Skip to content

Commit 6ab3448

Browse files
committed
Merge branch 'v1-develop' into v1
2 parents 0cc21c6 + 23d4c14 commit 6ab3448

File tree

17 files changed

+1397
-1535
lines changed

17 files changed

+1397
-1535
lines changed

.php-cs-fixer.php

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,17 @@
99
$config = new PhpCsFixer\Config();
1010
return $config
1111
->setRules([
12-
'@Symfony' => true,
13-
'@PSR12' => true,
14-
'binary_operator_spaces' => ['default' => null, 'operators' => ['=>' => 'align']],
15-
'concat_space' => ['spacing' => 'one'],
16-
'declare_strict_types' => true,
17-
'no_alias_functions' => true,
18-
'no_useless_sprintf' => true,
19-
'ordered_imports' => [
20-
'imports_order' => [
21-
'class',
22-
'function',
23-
'const',
24-
],
25-
'sort_algorithm' => 'alpha'
26-
],
27-
'phpdoc_align' => ['align' => 'left'],
28-
'phpdoc_summary' => false,
29-
'self_accessor' => true,
30-
'single_line_throw' => false,
31-
'visibility_required' => ['elements' => ['property', 'method']], // removed 'const' since we still support PHP 7.0 for now
32-
'yoda_style' => false,
12+
'@PER-CS' => true,
13+
'binary_operator_spaces' => ['default' => 'at_least_single_space', 'operators' => ['=>' => 'align']],
14+
'declare_strict_types' => true,
15+
'no_alias_functions' => true,
16+
'no_useless_sprintf' => true,
17+
'nullable_type_declaration_for_default_null_value' => false, // should be 'true' when we drop support for PHP 7.0 which didn't support nullable types yet
18+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
19+
'phpdoc_align' => ['align' => 'vertical'],
20+
'phpdoc_separation' => ['skip_unlisted_annotations' => true],
21+
'self_accessor' => true,
22+
'visibility_required' => ['elements' => ['property', 'method']], // removed 'const' since we still support PHP 7.0 for now
3323
])
3424
->setFinder($finder)
3525
;

Checker/Catalog/Category/UrlKey/DuplicateUrlKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class DuplicateUrlKey
1212
{
1313
const DUPLICATED_PROBLEM_DESCRIPTION =
14-
'%s categories were found which have a duplicated url_key value: "%s" within the same parent.'
14+
'%s categories were found which have a duplicated url_key value: "%s" within the same parent.'
1515
. ' Please fix because this will cause problems.';
1616

1717
private $storesUtil;

Checker/Catalog/Category/UrlPath.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class UrlPath
1818
const URL_PATH_ATTRIBUTE = 'url_path';
1919
const URL_PATH_SEPARATOR = '/';
2020
const PROBLEM_DESCRIPTION =
21-
'Category has an incorrect url_path value "%s". It should be "%s".'
21+
'Category has an incorrect url_path value "%s". It should be "%s".'
2222
. ' Unfortunately this is not easily fixable using the backend of Magento.';
2323
const STORAGE_IDENTIFIER = 'category-url-path';
2424

Checker/Catalog/Product/UrlKey/DuplicateUrlKey.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class DuplicateUrlKey
2020
{
2121
const DUPLICATED_PROBLEM_DESCRIPTION =
22-
'Product has a duplicated url_key value (%s). It\'s the same as another product (ID: %s, Store: %s).'
22+
'Product has a duplicated url_key value (%s). It\'s the same as another product (ID: %s, Store: %s).'
2323
. ' Please fix because this will cause problems.';
2424

2525
private $storesUtil;
@@ -214,9 +214,10 @@ function ($urlKey) use ($urlKeysWhichExistMoreThanOnce) {
214214
$conflictingStoreId
215215
),
216216
];
217-
// if same product id, we don't care,
218-
// since it wouldn't be a conflict if they exist in another storeview
219217
} elseif ($productId !== $conflictingProductId) {
218+
// ^^^ if same product id, we don't care,
219+
// since it wouldn't be a conflict if they exist in another storeview
220+
220221
if (array_key_exists("$conflictingStoreId-$productId", $inheritedProductUrlKeyData)
221222
&& $inheritedProductUrlKeyData["$conflictingStoreId-$productId"] === $urlKey
222223
) {

Checker/Catalog/Product/UrlPath.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class UrlPath
1818
{
1919
const URL_PATH_ATTRIBUTE = 'url_path';
2020
const PROBLEM_DESCRIPTION =
21-
'Product has a non-null url_path attribute, this is known to cause problems with url rewrites in Magento.'
21+
'Product has a non-null url_path attribute, this is known to cause problems with url rewrites in Magento.'
2222
. ' It\'s advised to remove this value from the database.';
2323
const STORAGE_IDENTIFIER = 'product-url-path';
2424

Exception/AlreadyRefreshingException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66

77
use Magento\Framework\Exception\LocalizedException;
88

9-
class AlreadyRefreshingException extends LocalizedException
10-
{
11-
}
9+
class AlreadyRefreshingException extends LocalizedException {}

Exception/MissingConfigurationException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66

77
use Magento\Framework\Exception\LocalizedException;
88

9-
class MissingConfigurationException extends LocalizedException
10-
{
11-
}
9+
class MissingConfigurationException extends LocalizedException {}

Exception/SerializationException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66

77
use Magento\Framework\Exception\LocalizedException;
88

9-
class SerializationException extends LocalizedException
10-
{
11-
}
9+
class SerializationException extends LocalizedException {}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ check: checkstyle checkquality test
1111
.PHONY: checkstyle
1212
checkstyle:
1313
vendor-bin/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff --stop-on-violation --allow-risky=yes
14-
vendor-bin/phpcs/vendor/bin/phpcs -s --standard=Magento2 --exclude=Magento2.Security.InsecureFunction,Magento2.Commenting.ClassPropertyPHPDocFormatting,Magento2.Annotation.MethodAnnotationStructure,Magento2.Annotation.MethodArguments,PSR12.Properties.ConstantVisibility --ignore=./vendor/,./vendor-bin/ .
14+
vendor-bin/phpcs/vendor/bin/phpcs -s --standard=Magento2 --exclude=Magento2.Security.InsecureFunction,Magento2.Commenting.ClassPropertyPHPDocFormatting,Magento2.Annotation.MethodAnnotationStructure,Magento2.Annotation.MethodArguments,PSR12.Properties.ConstantVisibility,PSR2.Classes.ClassDeclaration,Squiz.WhiteSpace.ScopeClosingBrace,Magento2.Legacy.EscapeMethodsOnBlockClass --ignore=./vendor/,./vendor-bin/ .
1515
vendor-bin/phpcs/vendor/bin/phpcs -s --standard=PHPCompatibility --runtime-set testVersion 7.0- --ignore=./vendor/,./vendor-bin/,./Test/ .
1616
vendor-bin/phpcs/vendor/bin/phpcs -s --standard=PHPCompatibility --runtime-set testVersion 7.1- ./Test/
1717
vendor/bin/composer normalize --dry-run

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ It should be up to the store owner to figure out how he/she wants to fix these p
2929
This module should be compatible with Magento 2.1.x, 2.2.x, 2.3.x and 2.4.x versions.
3030
Some code in this module is using old ways of doing things. It could have been written in a more modern way (using message queues instead of cronjobs, use newer syntax for UI components, ...). But we wanted this module to be compatible with older versions of Magento, so we've chosen this route for now.
3131

32-
The module should be compatible with PHP 7.0, 7.1, 7.2, 7.3, 7.4, 8.1 and 8.2
32+
The module should be compatible with PHP 7.0, 7.1, 7.2, 7.3, 7.4, 8.1, 8.2 and 8.3
3333

3434
## Installation
3535

0 commit comments

Comments
 (0)