Changeset 46290
- Timestamp:
- 09/25/2019 01:46:55 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.travis.yml
r46114 r46290 30 30 - env: WP_TRAVISCI=travis:js WP_INSTALL=false 31 31 name: JS Tests 32 - env: WP_TRAVISCI=test:compat COMPOSER_INSTALL=true NPM_INSTALL=false WP_INSTALL=false 33 name: "PHP Compatibility Check" 32 34 - env: LOCAL_PHP=7.3-fpm WP_TRAVISCI=test:php 33 35 name: "PHPUnit Tests: PHP 7.3" … … 47 49 name: "PHPUnit Tests: PHP 8.0" 48 50 allow_failures: 51 - env: WP_TRAVISCI=test:compat COMPOSER_INSTALL=true NPM_INSTALL=false WP_INSTALL=false 49 52 - env: LOCAL_PHP=7.4-fpm WP_TRAVISCI=test:php 50 53 - env: LOCAL_PHP=8.0-fpm WP_TRAVISCI=test:php … … 121 124 docker-compose run --rm php composer lint:errors && 122 125 docker-compose run --rm php composer lint tests 126 elif [[ "$WP_TRAVISCI" == "test:compat" ]]; then 127 docker-compose run --rm php composer compat 123 128 else 124 129 npm run grunt $WP_TRAVISCI -
trunk/composer.json
r46200 r46290 15 15 "require-dev": { 16 16 "dealerdirect/phpcodesniffer-composer-installer": "~0.5.0", 17 "wp-coding-standards/wpcs": "~2.1.0" 17 "wp-coding-standards/wpcs": "~2.1.0", 18 "phpcompatibility/phpcompatibility-wp": "^2.1.0" 18 19 }, 19 20 "scripts": { 21 "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source", 20 22 "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source --cache -d memory_limit=256M", 21 23 "lint": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --report=summary,source --cache -d memory_limit=256M", -
trunk/composer.lock
r46200 r46290 5 5 "This file is @generated automatically" 6 6 ], 7 "content-hash": " 56c797c5309702adf0f49bd274a364f3",7 "content-hash": "ca8f46e0b3cba61c076c033cc7143d3a", 8 8 "packages": [], 9 9 "packages-dev": [ … … 73 73 ], 74 74 "time": "2018-10-26T13:21:45+00:00" 75 }, 76 { 77 "name": "phpcompatibility/php-compatibility", 78 "version": "9.3.1", 79 "source": { 80 "type": "git", 81 "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", 82 "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196" 83 }, 84 "dist": { 85 "type": "zip", 86 "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9999344e47e7af6b00e1a898eacc4e4368fb7196", 87 "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196", 88 "shasum": "" 89 }, 90 "require": { 91 "php": ">=5.3", 92 "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" 93 }, 94 "conflict": { 95 "squizlabs/php_codesniffer": "2.6.2" 96 }, 97 "require-dev": { 98 "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" 99 }, 100 "suggest": { 101 "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", 102 "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 103 }, 104 "type": "phpcodesniffer-standard", 105 "notification-url": "https://packagist.org/downloads/", 106 "license": [ 107 "LGPL-3.0-or-later" 108 ], 109 "authors": [ 110 { 111 "name": "Wim Godden", 112 "homepage": "https://github.com/wimg", 113 "role": "lead" 114 }, 115 { 116 "name": "Juliette Reinders Folmer", 117 "homepage": "https://github.com/jrfnl", 118 "role": "lead" 119 }, 120 { 121 "name": "Contributors", 122 "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" 123 } 124 ], 125 "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", 126 "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", 127 "keywords": [ 128 "compatibility", 129 "phpcs", 130 "standards" 131 ], 132 "time": "2019-09-05T18:36:49+00:00" 133 }, 134 { 135 "name": "phpcompatibility/phpcompatibility-paragonie", 136 "version": "1.1.0", 137 "source": { 138 "type": "git", 139 "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", 140 "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936" 141 }, 142 "dist": { 143 "type": "zip", 144 "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936", 145 "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936", 146 "shasum": "" 147 }, 148 "require": { 149 "phpcompatibility/php-compatibility": "^9.0" 150 }, 151 "require-dev": { 152 "dealerdirect/phpcodesniffer-composer-installer": "^0.5", 153 "paragonie/random_compat": "dev-master", 154 "paragonie/sodium_compat": "dev-master" 155 }, 156 "suggest": { 157 "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 158 "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 159 }, 160 "type": "phpcodesniffer-standard", 161 "notification-url": "https://packagist.org/downloads/", 162 "license": [ 163 "LGPL-3.0-or-later" 164 ], 165 "authors": [ 166 { 167 "name": "Wim Godden", 168 "role": "lead" 169 }, 170 { 171 "name": "Juliette Reinders Folmer", 172 "role": "lead" 173 } 174 ], 175 "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", 176 "homepage": "http://phpcompatibility.com/", 177 "keywords": [ 178 "compatibility", 179 "paragonie", 180 "phpcs", 181 "polyfill", 182 "standards" 183 ], 184 "time": "2019-08-28T15:58:19+00:00" 185 }, 186 { 187 "name": "phpcompatibility/phpcompatibility-wp", 188 "version": "2.1.0", 189 "source": { 190 "type": "git", 191 "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", 192 "reference": "41bef18ba688af638b7310666db28e1ea9158b2f" 193 }, 194 "dist": { 195 "type": "zip", 196 "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f", 197 "reference": "41bef18ba688af638b7310666db28e1ea9158b2f", 198 "shasum": "" 199 }, 200 "require": { 201 "phpcompatibility/php-compatibility": "^9.0", 202 "phpcompatibility/phpcompatibility-paragonie": "^1.0" 203 }, 204 "require-dev": { 205 "dealerdirect/phpcodesniffer-composer-installer": "^0.5" 206 }, 207 "suggest": { 208 "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 209 "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 210 }, 211 "type": "phpcodesniffer-standard", 212 "notification-url": "https://packagist.org/downloads/", 213 "license": [ 214 "LGPL-3.0-or-later" 215 ], 216 "authors": [ 217 { 218 "name": "Wim Godden", 219 "role": "lead" 220 }, 221 { 222 "name": "Juliette Reinders Folmer", 223 "role": "lead" 224 } 225 ], 226 "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", 227 "homepage": "http://phpcompatibility.com/", 228 "keywords": [ 229 "compatibility", 230 "phpcs", 231 "standards", 232 "wordpress" 233 ], 234 "time": "2019-08-28T14:22:28+00:00" 75 235 }, 76 236 { … … 177 337 "prefer-lowest": false, 178 338 "platform": { 179 "php": ">=5.6"339 "php": ">=5.6" 180 340 }, 181 341 "platform-dev": [] -
trunk/src/wp-admin/includes/class-wp-debug-data.php
r46228 r46290 729 729 $client_version = $wpdb->dbh->client_info; 730 730 } else { 731 // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_client_info 731 // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_client_info,PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved 732 732 if ( preg_match( '|[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}|', mysql_get_client_info(), $matches ) ) { 733 733 $client_version = $matches[0]; -
trunk/src/wp-admin/includes/class-wp-site-health.php
r46269 r46290 159 159 $mysql_server_type = mysqli_get_server_info( $wpdb->dbh ); 160 160 } else { 161 // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_server_info 161 // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_server_info,PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved 162 162 $mysql_server_type = mysql_get_server_info( $wpdb->dbh ); 163 163 } … … 1172 1172 $mysql_client_version = mysqli_get_client_info(); 1173 1173 } else { 1174 // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_client_info 1174 // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_client_info,PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved 1175 1175 $mysql_client_version = mysql_get_client_info(); 1176 1176 } -
trunk/src/wp-admin/includes/file.php
r46232 r46290 1281 1281 array( 1282 1282 'php' => phpversion(), 1283 // phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound 1283 1284 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), 1284 1285 ) … … 1314 1315 array( 1315 1316 'php' => phpversion(), 1317 // phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound 1316 1318 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), 1317 1319 'polyfill_is_fast' => false, … … 1387 1389 'skipped_sig' => $skipped_signature, 1388 1390 'php' => phpversion(), 1391 // phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound 1389 1392 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), 1390 1393 ) -
trunk/src/wp-admin/includes/upgrade.php
r46284 r46290 2476 2476 * @return mixed 2477 2477 */ 2478 function __get_option( $setting ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore 2478 function __get_option( $setting ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 2479 2479 global $wpdb; 2480 2480 -
trunk/src/wp-includes/author-template.php
r45932 r46290 566 566 * @access private 567 567 */ 568 function __clear_multi_author_cache() { //phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore 568 function __clear_multi_author_cache() { //phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 569 569 delete_transient( 'is_multi_author' ); 570 570 } -
trunk/src/wp-includes/deprecated.php
r46225 r46290 1799 1799 * @see _n() 1800 1800 */ 1801 function __ngettext( ...$args ) { 1801 function __ngettext( ...$args ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 1802 1802 _deprecated_function( __FUNCTION__, '2.8.0', '_n()' ); 1803 1803 return _n( ...$args ); … … 1811 1811 * @see _n_noop() 1812 1812 */ 1813 function __ngettext_noop( ...$args ) { 1813 function __ngettext_noop( ...$args ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 1814 1814 _deprecated_function( __FUNCTION__, '2.8.0', '_n_noop()' ); 1815 1815 return _n_noop( ...$args ); -
trunk/src/wp-includes/functions.php
r46214 r46290 5744 5744 * @return true True. 5745 5745 */ 5746 function __return_true() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore 5746 function __return_true() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 5747 5747 return true; 5748 5748 } … … 5759 5759 * @return false False. 5760 5760 */ 5761 function __return_false() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore 5761 function __return_false() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 5762 5762 return false; 5763 5763 } … … 5772 5772 * @return int 0. 5773 5773 */ 5774 function __return_zero() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore 5774 function __return_zero() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 5775 5775 return 0; 5776 5776 } … … 5785 5785 * @return array Empty array. 5786 5786 */ 5787 function __return_empty_array() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore 5787 function __return_empty_array() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 5788 5788 return array(); 5789 5789 } … … 5798 5798 * @return null Null value. 5799 5799 */ 5800 function __return_null() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore 5800 function __return_null() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 5801 5801 return null; 5802 5802 } … … 5813 5813 * @return string Empty string. 5814 5814 */ 5815 function __return_empty_string() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore 5815 function __return_empty_string() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 5816 5816 return ''; 5817 5817 } -
trunk/src/wp-includes/general-template.php
r46163 r46290 4685 4685 * @return string html attribute or empty string 4686 4686 */ 4687 function __checked_selected_helper( $helper, $current, $echo, $type ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore 4687 function __checked_selected_helper( $helper, $current, $echo, $type ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore 4688 4688 if ( (string) $helper === (string) $current ) { 4689 4689 $result = " $type='$type'";
Note: See TracChangeset
for help on using the changeset viewer.