diff --git a/composer.json b/composer.json index 94f5b545d2..e04604d85d 100644 --- a/composer.json +++ b/composer.json @@ -37,8 +37,8 @@ "vlucas/phpdotenv": "^2.4.0", "umpirsky/twig-gettext-extractor": "1.1.*", "kint-php/kint": "^2.2", - "squizlabs/php_codesniffer": "^2.8.1", - "wimg/php-compatibility": "^7.1.2", + "squizlabs/php_codesniffer": "^3.3", + "phpcompatibility/php-compatibility": "^9.0", "coenjacobs/mozart": "^0.2.2" }, "autoload": { @@ -48,8 +48,8 @@ } }, "scripts": { - "post-update-cmd": "\"vendor/bin/mozart\" compose; rm -rf vendor/monolog; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility", - "post-install-cmd": "\"vendor/bin/mozart\" compose; rm -rf vendor/monolog; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility" + "post-update-cmd": "\"vendor/bin/mozart\" compose; rm -rf vendor/monolog", + "post-install-cmd": "\"vendor/bin/mozart\" compose; rm -rf vendor/monolog" }, "extra": { "mozart": { diff --git a/composer.lock b/composer.lock index a6c6748707..9957898903 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": "1b1dc65d1395527fdd6c951aa43f8cb9", + "content-hash": "cb44256ac266ac704c6dd361cb3ea816", "packages": [ { "name": "cerdic/css-tidy", @@ -4066,6 +4066,64 @@ ], "time": "2018-07-04T16:31:37+00:00" }, + { + "name": "phpcompatibility/php-compatibility", + "version": "9.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", + "reference": "e9f4047e5edf53c88f36f1dafc0d49454ce13e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/e9f4047e5edf53c88f36f1dafc0d49454ce13e25", + "reference": "e9f4047e5edf53c88f36f1dafc0d49454ce13e25", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" + }, + "conflict": { + "squizlabs/php_codesniffer": "2.6.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" + }, + { + "name": "Wim Godden", + "homepage": "https://github.com/wimg", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + } + ], + "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", + "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", + "keywords": [ + "compatibility", + "phpcs", + "standards" + ], + "time": "2018-10-07T17:38:02+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", @@ -5466,64 +5524,37 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e", + "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.1.2" + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ - "scripts/phpcs", - "scripts/phpcbf" + "bin/phpcs", + "bin/phpcbf" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -5540,7 +5571,7 @@ "phpcs", "standards" ], - "time": "2017-05-22T02:43:20+00:00" + "time": "2018-09-23T23:08:17+00:00" }, { "name": "symfony/browser-kit", @@ -6792,50 +6823,6 @@ ], "time": "2018-01-29T19:49:41+00:00" }, - { - "name": "wimg/php-compatibility", - "version": "7.1.5", - "source": { - "type": "git", - "url": "https://github.com/wimg/PHPCompatibility.git", - "reference": "1649732fb1a2115608dfe805a644e4405fb6444b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wimg/PHPCompatibility/zipball/1649732fb1a2115608dfe805a644e4405fb6444b", - "reference": "1649732fb1a2115608dfe805a644e4405fb6444b", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.1.2", - "squizlabs/php_codesniffer": "^2.0" - }, - "type": "phpcodesniffer-standard", - "autoload": { - "psr-4": { - "PHPCompatibility\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "authors": [ - { - "name": "Wim Godden", - "role": "lead" - } - ], - "description": "This is a set of sniffs for PHP_CodeSniffer that checks for PHP version compatibility.", - "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", - "keywords": [ - "compatibility", - "phpcs", - "standards" - ], - "time": "2017-07-15T23:03:53+00:00" - }, { "name": "wp-cli/autoload-splitter", "version": "v0.1.5", diff --git a/lib/Form/Widget.php b/lib/Form/Widget.php index ab499159e6..8e3f5b47f6 100644 --- a/lib/Form/Widget.php +++ b/lib/Form/Widget.php @@ -209,7 +209,7 @@ EOL; + ?> diff --git a/tasks/code_sniffer/MailPoet/Sniffs/ControlStructures/ControlSignatureSniff.php b/tasks/code_sniffer/MailPoet/Sniffs/ControlStructures/ControlSignatureSniff.php index 80ebe23b9b..fc4b5673bd 100644 --- a/tasks/code_sniffer/MailPoet/Sniffs/ControlStructures/ControlSignatureSniff.php +++ b/tasks/code_sniffer/MailPoet/Sniffs/ControlStructures/ControlSignatureSniff.php @@ -13,8 +13,8 @@ * @link http://pear.php.net/package/PHP_CodeSniffer */ -if (class_exists('PHP_CodeSniffer_Standards_AbstractPatternSniff', true) === false) { - throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer_Standards_AbstractPatternSniff not found'); +if (class_exists('PHP_CodeSniffer\Sniffs\AbstractPatternSniff', true) === false) { + throw new PHP_CodeSniffer_Exception('Class PHP_CodeSniffer\Sniffs\AbstractPatternSniff not found'); } /** @@ -29,7 +29,7 @@ if (class_exists('PHP_CodeSniffer_Standards_AbstractPatternSniff', true) === fal * @version Release: @package_version@ * @link http://pear.php.net/package/PHP_CodeSniffer */ -class MailPoet_Sniffs_ControlStructures_ControlSignatureSniff extends PHP_CodeSniffer_Standards_AbstractPatternSniff { +class MailPoet_Sniffs_ControlStructures_ControlSignatureSniff extends PHP_CodeSniffer\Sniffs\AbstractPatternSniff { /** * If true, comments will be ignored if they are found in the code. diff --git a/tasks/code_sniffer/MailPoet/ruleset.xml b/tasks/code_sniffer/MailPoet/ruleset.xml index 3bc4198bd1..5b94f33acd 100644 --- a/tasks/code_sniffer/MailPoet/ruleset.xml +++ b/tasks/code_sniffer/MailPoet/ruleset.xml @@ -1,5 +1,6 @@ + MailPoet specific rule set @@ -118,7 +119,7 @@ - +