diff --git a/Magento2Framework/Sniffs/Header/CopyrightAnotherExtensionsFilesSniff.php b/Magento2Framework/Sniffs/Header/CopyrightAnotherExtensionsFilesSniff.php index 3bafbb1f..3310e667 100644 --- a/Magento2Framework/Sniffs/Header/CopyrightAnotherExtensionsFilesSniff.php +++ b/Magento2Framework/Sniffs/Header/CopyrightAnotherExtensionsFilesSniff.php @@ -16,6 +16,7 @@ class CopyrightAnotherExtensionsFilesSniff implements Sniff private const COPYRIGHT_MAGENTO_TEXT = 'Copyright © Magento, Inc. All rights reserved.'; private const COPYRIGHT_ADOBE = '/Copyright \d+ Adobe/'; + private const COPYRIGHT_ADOBE_TEXT = 'ADOBE CONFIDENTIAL'; /** * Defines the tokenizers that this sniff is using. @@ -48,6 +49,7 @@ public function process(File $phpcsFile, $stackPtr) if (strpos($fileText, self::COPYRIGHT_MAGENTO_TEXT) !== false || preg_match(self::COPYRIGHT_ADOBE, $fileText) + || strpos($fileText, self::COPYRIGHT_ADOBE_TEXT) !== false ) { return; } diff --git a/Magento2Framework/Sniffs/Header/CopyrightGraphQLSniff.php b/Magento2Framework/Sniffs/Header/CopyrightGraphQLSniff.php index 1e488e69..5eae2b5e 100644 --- a/Magento2Framework/Sniffs/Header/CopyrightGraphQLSniff.php +++ b/Magento2Framework/Sniffs/Header/CopyrightGraphQLSniff.php @@ -16,6 +16,7 @@ class CopyrightGraphQLSniff implements Sniff private const COPYRIGHT_MAGENTO_TEXT = 'Copyright © Magento, Inc. All rights reserved.'; private const COPYRIGHT_ADOBE = '/Copyright \d+ Adobe/'; + private const COPYRIGHT_ADOBE_TEXT = 'ADOBE CONFIDENTIAL'; private const FILE_EXTENSION = 'graphqls'; @@ -44,7 +45,9 @@ public function process(File $phpcsFile, $stackPtr) // @phpcs:ignore Magento2.Functions.DiscouragedFunction.Discouraged $content = file_get_contents($phpcsFile->getFilename()); - if (strpos($content, self::COPYRIGHT_MAGENTO_TEXT) !== false || preg_match(self::COPYRIGHT_ADOBE, $content)) { + if (strpos($content, self::COPYRIGHT_MAGENTO_TEXT) !== false + || preg_match(self::COPYRIGHT_ADOBE, $content) + || strpos($content, self::COPYRIGHT_ADOBE_TEXT) !== false) { return; } diff --git a/Magento2Framework/Sniffs/Header/CopyrightSniff.php b/Magento2Framework/Sniffs/Header/CopyrightSniff.php index 81442207..e23aaba4 100644 --- a/Magento2Framework/Sniffs/Header/CopyrightSniff.php +++ b/Magento2Framework/Sniffs/Header/CopyrightSniff.php @@ -16,6 +16,7 @@ class CopyrightSniff implements Sniff private const COPYRIGHT_MAGENTO_TEXT = 'Copyright © Magento, Inc. All rights reserved.'; private const COPYRIGHT_ADOBE = '/Copyright \d+ Adobe/'; + private const COPYRIGHT_ADOBE_TEXT = 'ADOBE CONFIDENTIAL'; /** * @inheritdoc @@ -48,7 +49,9 @@ public function process(File $phpcsFile, $stackPtr) $content = $phpcsFile->getTokens()[$positionComment]['content']; $adobeCopyrightFound = preg_match(self::COPYRIGHT_ADOBE, $content); - if (strpos($content, self::COPYRIGHT_MAGENTO_TEXT) !== false || $adobeCopyrightFound) { + if (strpos($content, self::COPYRIGHT_MAGENTO_TEXT) !== false || + $adobeCopyrightFound || + strpos($content, self::COPYRIGHT_ADOBE_TEXT) !== false) { return; } diff --git a/composer.json b/composer.json index 1cd04624..d243195e 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "AFL-3.0" ], "type": "phpcodesniffer-standard", - "version": "31", + "version": "32", "require": { "php": "~8.1.0 || ~8.2.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2 || ^1.0", @@ -15,7 +15,7 @@ "ext-dom": "*", "phpcompatibility/php-compatibility": "^9.3", "squizlabs/php_codesniffer": "^3.6.1", - "rector/rector": "^0.15.10", + "rector/rector": "0.17.12", "symfony/polyfill": "^1.16", "phpcsstandards/phpcsutils": "^1.0.5" }, diff --git a/composer.lock b/composer.lock index fee1a314..17053d7a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b8ebf7765c0833542769beee7a9c7a0f", + "content-hash": "cfda54ef822b634185fa82d103971fd9", "packages": [ { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -222,16 +222,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.14", + "version": "1.10.30", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e5fcc96289cf737304286a9b505fbed091f02e58" + "reference": "2910afdd3fe33e5afd71c09f3fb0d0845b48c410" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5fcc96289cf737304286a9b505fbed091f02e58", - "reference": "e5fcc96289cf737304286a9b505fbed091f02e58", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2910afdd3fe33e5afd71c09f3fb0d0845b48c410", + "reference": "2910afdd3fe33e5afd71c09f3fb0d0845b48c410", "shasum": "" }, "require": { @@ -260,8 +260,11 @@ "static analysis" ], "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.14" + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, "funding": [ { @@ -277,30 +280,29 @@ "type": "tidelift" } ], - "time": "2023-01-19T10:47:09+00:00" + "time": "2023-08-22T13:48:25+00:00" }, { "name": "rector/rector", - "version": "0.15.10", + "version": "0.17.12", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "000bfb6f7974449399f39e1a210458395b75c887" + "reference": "af3a14a8a9fffa3100b730571c356f6c658d5e09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/000bfb6f7974449399f39e1a210458395b75c887", - "reference": "000bfb6f7974449399f39e1a210458395b75c887", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/af3a14a8a9fffa3100b730571c356f6c658d5e09", + "reference": "af3a14a8a9fffa3100b730571c356f6c658d5e09", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.9.7" + "phpstan/phpstan": "^1.10.26" }, "conflict": { "rector/rector-doctrine": "*", "rector/rector-downgrade-php": "*", - "rector/rector-php-parser": "*", "rector/rector-phpunit": "*", "rector/rector-symfony": "*" }, @@ -308,11 +310,6 @@ "bin/rector" ], "type": "library", - "extra": { - "branch-alias": { - "dev-main": "0.14-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -323,9 +320,15 @@ "MIT" ], "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "keywords": [ + "automation", + "dev", + "migration", + "refactoring" + ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.15.10" + "source": "https://github.com/rectorphp/rector/tree/0.17.12" }, "funding": [ { @@ -333,7 +336,7 @@ "type": "github" } ], - "time": "2023-01-21T14:30:16+00:00" + "time": "2023-08-10T15:22:02+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -2382,5 +2385,5 @@ "ext-dom": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" }