Ticket #44366: 44366-50branch.diff
File 44366-50branch.diff, 14.0 KB (added by , 6 years ago) |
---|
-
.gitignore
7 7 8 8 # Files and folders related to build/test tools 9 9 /phpunit.xml 10 /.phpcs.xml 11 /phpcs.xml 10 12 /tests/phpunit/data/plugins/wordpress-importer 11 13 /tests/phpunit/data/.trac-ticket-cache* 12 14 /tests/qunit/compiled.html -
composer.json
1 { 2 "name": "wordpress/wordpress", 3 "license": "GPL-2.0-or-later", 4 "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", 5 "homepage": "https://wordpress.org", 6 "keywords": [ 7 "blog", "cms", "wordpress", "wp" 8 ], 9 "support": { 10 "issues": "https://core.trac.wordpress.org/" 11 }, 12 "require-dev": { 13 "dealerdirect/phpcodesniffer-composer-installer": "~0.4.4", 14 "wp-coding-standards/wpcs": "~1.0.0" 15 }, 16 "scripts": { 17 "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source", 18 "lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source" 19 } 20 } -
composer.lock
1 { 2 "_readme": [ 3 "This file locks the dependencies of your project to a known state", 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 "This file is @generated automatically" 6 ], 7 "content-hash": "525cadb533bc92cc922d79144b33b14a", 8 "packages": [], 9 "packages-dev": [ 10 { 11 "name": "dealerdirect/phpcodesniffer-composer-installer", 12 "version": "v0.4.4", 13 "source": { 14 "type": "git", 15 "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", 16 "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08" 17 }, 18 "dist": { 19 "type": "zip", 20 "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/2e41850d5f7797cbb1af7b030d245b3b24e63a08", 21 "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08", 22 "shasum": "" 23 }, 24 "require": { 25 "composer-plugin-api": "^1.0", 26 "php": "^5.3|^7", 27 "squizlabs/php_codesniffer": "*" 28 }, 29 "require-dev": { 30 "composer/composer": "*", 31 "wimg/php-compatibility": "^8.0" 32 }, 33 "suggest": { 34 "dealerdirect/qa-tools": "All the PHP QA tools you'll need" 35 }, 36 "type": "composer-plugin", 37 "extra": { 38 "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" 39 }, 40 "autoload": { 41 "psr-4": { 42 "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" 43 } 44 }, 45 "notification-url": "https://packagist.org/downloads/", 46 "license": [ 47 "MIT" 48 ], 49 "authors": [ 50 { 51 "name": "Franck Nijhof", 52 "email": "f.nijhof@dealerdirect.nl", 53 "homepage": "http://workingatdealerdirect.eu", 54 "role": "Developer" 55 } 56 ], 57 "description": "PHP_CodeSniffer Standards Composer Installer Plugin", 58 "homepage": "http://workingatdealerdirect.eu", 59 "keywords": [ 60 "PHPCodeSniffer", 61 "PHP_CodeSniffer", 62 "code quality", 63 "codesniffer", 64 "composer", 65 "installer", 66 "phpcs", 67 "plugin", 68 "qa", 69 "quality", 70 "standard", 71 "standards", 72 "style guide", 73 "stylecheck", 74 "tests" 75 ], 76 "time": "2017-12-06T16:27:17+00:00" 77 }, 78 { 79 "name": "squizlabs/php_codesniffer", 80 "version": "3.3.2", 81 "source": { 82 "type": "git", 83 "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", 84 "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e" 85 }, 86 "dist": { 87 "type": "zip", 88 "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e", 89 "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e", 90 "shasum": "" 91 }, 92 "require": { 93 "ext-simplexml": "*", 94 "ext-tokenizer": "*", 95 "ext-xmlwriter": "*", 96 "php": ">=5.4.0" 97 }, 98 "require-dev": { 99 "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" 100 }, 101 "bin": [ 102 "bin/phpcs", 103 "bin/phpcbf" 104 ], 105 "type": "library", 106 "extra": { 107 "branch-alias": { 108 "dev-master": "3.x-dev" 109 } 110 }, 111 "notification-url": "https://packagist.org/downloads/", 112 "license": [ 113 "BSD-3-Clause" 114 ], 115 "authors": [ 116 { 117 "name": "Greg Sherwood", 118 "role": "lead" 119 } 120 ], 121 "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", 122 "homepage": "http://www.squizlabs.com/php-codesniffer", 123 "keywords": [ 124 "phpcs", 125 "standards" 126 ], 127 "time": "2018-09-23T23:08:17+00:00" 128 }, 129 { 130 "name": "wp-coding-standards/wpcs", 131 "version": "1.0.0", 132 "source": { 133 "type": "git", 134 "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git", 135 "reference": "539c6d74e6207daa22b7ea754d6f103e9abb2755" 136 }, 137 "dist": { 138 "type": "zip", 139 "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/539c6d74e6207daa22b7ea754d6f103e9abb2755", 140 "reference": "539c6d74e6207daa22b7ea754d6f103e9abb2755", 141 "shasum": "" 142 }, 143 "require": { 144 "php": ">=5.3", 145 "squizlabs/php_codesniffer": "^2.9.0 || ^3.0.2" 146 }, 147 "require-dev": { 148 "phpcompatibility/php-compatibility": "*" 149 }, 150 "suggest": { 151 "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." 152 }, 153 "type": "phpcodesniffer-standard", 154 "notification-url": "https://packagist.org/downloads/", 155 "license": [ 156 "MIT" 157 ], 158 "authors": [ 159 { 160 "name": "Contributors", 161 "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors" 162 } 163 ], 164 "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", 165 "keywords": [ 166 "phpcs", 167 "standards", 168 "wordpress" 169 ], 170 "time": "2018-07-25T18:10:35+00:00" 171 } 172 ], 173 "aliases": [], 174 "minimum-stability": "stable", 175 "stability-flags": [], 176 "prefer-stable": false, 177 "prefer-lowest": false, 178 "platform": [], 179 "platform-dev": [] 180 } -
phpcs.xml.dist
1 <?xml version="1.0"?> 2 <ruleset name="WordPress Coding Standards"> 3 <description>Apply WordPress Coding Standards to all Core files</description> 4 5 <rule ref="WordPress-Core"/> 6 <rule ref="WordPress.CodeAnalysis.EmptyStatement"/> 7 8 <rule ref="PEAR.Functions.FunctionCallSignature"> 9 <properties> 10 <property name="allowMultipleArguments" value="false"/> 11 </properties> 12 </rule> 13 14 <arg name="extensions" value="php"/> 15 16 <!-- Strip the filepaths down to the relevant bit. --> 17 <arg name="basepath" value="./"/> 18 19 <!-- Check up to 20 files simultanously. --> 20 <arg name="parallel" value="20"/> 21 22 <!-- Show sniff codes in all reports --> 23 <arg value="ps"/> 24 25 <file>.</file> 26 27 <!-- Exclude the build folder in the current directory, as Travis puts the checkout in a build directory. --> 28 <exclude-pattern type="relative">^build/*</exclude-pattern> 29 30 <!-- Directories and third party library exclusions --> 31 <exclude-pattern>/node_modules/*</exclude-pattern> 32 <exclude-pattern>/vendor/*</exclude-pattern> 33 34 <exclude-pattern>/src/wp-admin/includes/class-ftp*</exclude-pattern> 35 <exclude-pattern>/src/wp-admin/includes/class-pclzip\.php</exclude-pattern> 36 <exclude-pattern>/src/wp-admin/includes/deprecated\.php</exclude-pattern> 37 <exclude-pattern>/src/wp-admin/includes/ms-deprecated\.php</exclude-pattern> 38 39 <exclude-pattern>/src/wp-includes/atomlib\.php</exclude-pattern> 40 <exclude-pattern>/src/wp-includes/class-IXR\.php</exclude-pattern> 41 <exclude-pattern>/src/wp-includes/class-json\.php</exclude-pattern> 42 <exclude-pattern>/src/wp-includes/class-phpass\.php</exclude-pattern> 43 <exclude-pattern>/src/wp-includes/class-phpmailer\.php</exclude-pattern> 44 <exclude-pattern>/src/wp-includes/class-pop3\.php</exclude-pattern> 45 <exclude-pattern>/src/wp-includes/class-requests\.php</exclude-pattern> 46 <exclude-pattern>/src/wp-includes/class-simplepie\.php</exclude-pattern> 47 <exclude-pattern>/src/wp-includes/class-smtp\.php</exclude-pattern> 48 <exclude-pattern>/src/wp-includes/class-snoopy\.php</exclude-pattern> 49 <exclude-pattern>/src/wp-includes/deprecated\.php</exclude-pattern> 50 <exclude-pattern>/src/wp-includes/ms-deprecated\.php</exclude-pattern> 51 <exclude-pattern>/src/wp-includes/pluggable-deprecated\.php</exclude-pattern> 52 <exclude-pattern>/src/wp-includes/rss\.php</exclude-pattern> 53 54 <exclude-pattern>/src/wp-includes/ID3/*</exclude-pattern> 55 <exclude-pattern>/src/wp-includes/IXR/*</exclude-pattern> 56 <exclude-pattern>/src/wp-includes/random_compat/*</exclude-pattern> 57 <exclude-pattern>/src/wp-includes/Requests/*</exclude-pattern> 58 <exclude-pattern>/src/wp-includes/SimplePie/*</exclude-pattern> 59 <exclude-pattern>/src/wp-includes/Text/*</exclude-pattern> 60 61 <!-- Test data and fixtures --> 62 <exclude-pattern>/tests/phpunit/build*</exclude-pattern> 63 <exclude-pattern>/tests/phpunit/data/*</exclude-pattern> 64 65 <exclude-pattern>/tools/*</exclude-pattern> 66 67 <!-- Whitelist the WP DB Class and related tests for usage of direct database access functions. --> 68 <rule ref="WordPress.DB.RestrictedFunctions"> 69 <exclude-pattern>/src/wp-includes/wp-db\.php</exclude-pattern> 70 <exclude-pattern>/tests/phpunit/tests/db/charset\.php</exclude-pattern> 71 </rule> 72 73 <!-- Whitelist the WP DB related tests for issues with prepared SQL placeholders 74 (as the handling of those are being tested). --> 75 <rule ref="WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare"> 76 <exclude-pattern>/tests/phpunit/tests/db\.php</exclude-pattern> 77 </rule> 78 <rule ref="WordPress.DB.PreparedSQLPlaceholders.UnsupportedPlaceholder"> 79 <exclude-pattern>/tests/phpunit/tests/db\.php</exclude-pattern> 80 </rule> 81 <rule ref="WordPress.DB.PreparedSQLPlaceholders.UnescapedLiteral"> 82 <exclude-pattern>/tests/phpunit/tests/db\.php</exclude-pattern> 83 </rule> 84 <rule ref="WordPress.DB.PreparedSQL.NotPrepared"> 85 <exclude-pattern>/tests/phpunit/tests/admin/includesSchema\.php</exclude-pattern> 86 <exclude-pattern>/tests/phpunit/tests/multisite/site\.php</exclude-pattern> 87 </rule> 88 89 <!-- Whitelist the I18n functions file from issues identified by the I18n sniff 90 (such as calling the low-level translate() function). --> 91 <rule ref="WordPress.WP.I18n"> 92 <exclude-pattern>/src/wp-includes/l10n\.php</exclude-pattern> 93 </rule> 94 95 <rule ref="Generic.Functions.FunctionCallArgumentSpacing"> 96 <exclude-pattern>/wp-config\.php</exclude-pattern> 97 <exclude-pattern>/wp-config-sample\.php</exclude-pattern> 98 <exclude-pattern>/wp-tests-config\.php</exclude-pattern> 99 <exclude-pattern>/wp-tests-config-sample\.php</exclude-pattern> 100 </rule> 101 102 <rule ref="Generic.Files.LineEndings"> 103 <exclude-pattern>/wp-config\.php</exclude-pattern> 104 <exclude-pattern>/wp-config-sample\.php</exclude-pattern> 105 </rule> 106 107 <!-- Whitelist test classes for select sniffs. --> 108 <rule ref="WordPress.Files.FileName"> 109 <properties> 110 <property name="custom_test_class_whitelist" type="array" value="WP_UnitTestCase,WP_Ajax_UnitTestCase,WP_Canonical_UnitTestCase,WP_Test_REST_TestCase,WP_Test_REST_Controller_Testcase,WP_Test_REST_Post_Type_Controller_Testcase,WP_XMLRPC_UnitTestCase"/> 111 </properties> 112 </rule> 113 114 <!-- Exclude the unit tests from select sniffs. --> 115 <rule ref="WordPress.Files.FileName.NotHyphenatedLowercase"> 116 <exclude-pattern>/tests/phpunit/tests/*</exclude-pattern> 117 </rule> 118 <rule ref="PEAR.NamingConventions.ValidClassName.Invalid"> 119 <exclude-pattern>/tests/phpunit/tests/*</exclude-pattern> 120 </rule> 121 122 </ruleset> -
.