Make WordPress Core

Ticket #46152: 46152.diff

File 46152.diff, 11.3 KB (added by desrosj, 6 years ago)

First pass.

  • composer.json

     
    1111        },
    1212        "require-dev": {
    1313                "dealerdirect/phpcodesniffer-composer-installer": "~0.5.0",
     14                "phpcompatibility/php-compatibility": "~9.1.0",
     15                "phpcompatibility/phpcompatibility-wp": "~2.0.0",
    1416                "wp-coding-standards/wpcs": "~2.0.0"
    1517        },
    1618        "scripts": {
     19                "compatibility": "phpcs --standard=php-compatibility.xml.dist --report-summary --report-source",
    1720                "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source",
    1821                "lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source"
    1922        }
  • composer.lock

     
    44        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "c7426ffeca8db395605e43bccf174b02",
     7    "content-hash": "5874ba4cbad074e9e7d20d83e566fdc9",
    88    "packages": [],
    99    "packages-dev": [
    1010        {
     
    7474            "time": "2018-10-26T13:21:45+00:00"
    7575        },
    7676        {
     77            "name": "phpcompatibility/php-compatibility",
     78            "version": "9.1.1",
     79            "source": {
     80                "type": "git",
     81                "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
     82                "reference": "2b63c5d284ab8857f7b1d5c240ddb507a6b2293c"
     83            },
     84            "dist": {
     85                "type": "zip",
     86                "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/2b63c5d284ab8857f7b1d5c240ddb507a6b2293c",
     87                "reference": "2b63c5d284ab8857f7b1d5c240ddb507a6b2293c",
     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.4.3 || 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": "Contributors",
     112                    "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
     113                },
     114                {
     115                    "name": "Wim Godden",
     116                    "homepage": "https://github.com/wimg",
     117                    "role": "lead"
     118                },
     119                {
     120                    "name": "Juliette Reinders Folmer",
     121                    "homepage": "https://github.com/jrfnl",
     122                    "role": "lead"
     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": "2018-12-30T23:16:27+00:00"
     133        },
     134        {
     135            "name": "phpcompatibility/phpcompatibility-paragonie",
     136            "version": "1.0.1",
     137            "source": {
     138                "type": "git",
     139                "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
     140                "reference": "9160de79fcd683b5c99e9c4133728d91529753ea"
     141            },
     142            "dist": {
     143                "type": "zip",
     144                "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/9160de79fcd683b5c99e9c4133728d91529753ea",
     145                "reference": "9160de79fcd683b5c99e9c4133728d91529753ea",
     146                "shasum": ""
     147            },
     148            "require": {
     149                "phpcompatibility/php-compatibility": "^9.0"
     150            },
     151            "require-dev": {
     152                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4"
     153            },
     154            "suggest": {
     155                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
     156                "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
     157            },
     158            "type": "phpcodesniffer-standard",
     159            "notification-url": "https://packagist.org/downloads/",
     160            "license": [
     161                "LGPL-3.0-or-later"
     162            ],
     163            "authors": [
     164                {
     165                    "name": "Wim Godden",
     166                    "role": "lead"
     167                },
     168                {
     169                    "name": "Juliette Reinders Folmer",
     170                    "role": "lead"
     171                }
     172            ],
     173            "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.",
     174            "homepage": "http://phpcompatibility.com/",
     175            "keywords": [
     176                "compatibility",
     177                "paragonie",
     178                "phpcs",
     179                "polyfill",
     180                "standards"
     181            ],
     182            "time": "2018-12-16T19:10:44+00:00"
     183        },
     184        {
     185            "name": "phpcompatibility/phpcompatibility-wp",
     186            "version": "2.0.0",
     187            "source": {
     188                "type": "git",
     189                "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
     190                "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd"
     191            },
     192            "dist": {
     193                "type": "zip",
     194                "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
     195                "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
     196                "shasum": ""
     197            },
     198            "require": {
     199                "phpcompatibility/php-compatibility": "^9.0",
     200                "phpcompatibility/phpcompatibility-paragonie": "^1.0"
     201            },
     202            "require-dev": {
     203                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
     204            },
     205            "suggest": {
     206                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
     207                "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
     208            },
     209            "type": "phpcodesniffer-standard",
     210            "notification-url": "https://packagist.org/downloads/",
     211            "license": [
     212                "LGPL-3.0-or-later"
     213            ],
     214            "authors": [
     215                {
     216                    "name": "Wim Godden",
     217                    "role": "lead"
     218                },
     219                {
     220                    "name": "Juliette Reinders Folmer",
     221                    "role": "lead"
     222                }
     223            ],
     224            "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.",
     225            "homepage": "http://phpcompatibility.com/",
     226            "keywords": [
     227                "compatibility",
     228                "phpcs",
     229                "standards",
     230                "wordpress"
     231            ],
     232            "time": "2018-10-07T18:31:37+00:00"
     233        },
     234        {
    77235            "name": "squizlabs/php_codesniffer",
    78236            "version": "3.4.0",
    79237            "source": {
  • php-compatibility.xml.dist

     
     1<?xml version="1.0"?>
     2<ruleset name="WordPress PHP Compatibility">
     3        <description>Apply PHP compatibility checks to all Core files</description>
     4
     5        <rule ref="PHPCompatibilityWP"/>
     6        <config name="testVersion" value="5.2.4-"/>
     7
     8        <arg name="extensions" value="php"/>
     9
     10        <!-- Strip the filepaths down to the relevant bit. -->
     11        <arg name="basepath" value="./"/>
     12
     13        <!-- Check up to 20 files simultaneously. -->
     14        <arg name="parallel" value="20"/>
     15
     16        <!-- Show sniff codes in all reports -->
     17        <arg value="ps"/>
     18
     19        <file>.</file>
     20
     21        <!-- Exclude the build folder in the current directory, as Travis puts the checkout in a build directory. -->
     22        <exclude-pattern type="relative">^build/*</exclude-pattern>
     23
     24        <!-- Directories and third party library exclusions -->
     25        <exclude-pattern>/node_modules/*</exclude-pattern>
     26        <exclude-pattern>/vendor/*</exclude-pattern>
     27
     28        <exclude-pattern>/src/wp-admin/includes/class-ftp*</exclude-pattern>
     29        <exclude-pattern>/src/wp-admin/includes/class-pclzip\.php</exclude-pattern>
     30        <exclude-pattern>/src/wp-admin/includes/deprecated\.php</exclude-pattern>
     31        <exclude-pattern>/src/wp-admin/includes/ms-deprecated\.php</exclude-pattern>
     32
     33        <exclude-pattern>/src/wp-includes/atomlib\.php</exclude-pattern>
     34        <exclude-pattern>/src/wp-includes/class-IXR\.php</exclude-pattern>
     35        <exclude-pattern>/src/wp-includes/class-json\.php</exclude-pattern>
     36        <exclude-pattern>/src/wp-includes/class-phpass\.php</exclude-pattern>
     37        <exclude-pattern>/src/wp-includes/class-phpmailer\.php</exclude-pattern>
     38        <exclude-pattern>/src/wp-includes/class-pop3\.php</exclude-pattern>
     39        <exclude-pattern>/src/wp-includes/class-requests\.php</exclude-pattern>
     40        <exclude-pattern>/src/wp-includes/class-simplepie\.php</exclude-pattern>
     41        <exclude-pattern>/src/wp-includes/class-smtp\.php</exclude-pattern>
     42        <exclude-pattern>/src/wp-includes/class-snoopy\.php</exclude-pattern>
     43        <exclude-pattern>/src/wp-includes/class-wp-block-parser\.php</exclude-pattern>
     44        <exclude-pattern>/src/wp-includes/deprecated\.php</exclude-pattern>
     45        <exclude-pattern>/src/wp-includes/ms-deprecated\.php</exclude-pattern>
     46        <exclude-pattern>/src/wp-includes/pluggable-deprecated\.php</exclude-pattern>
     47        <exclude-pattern>/src/wp-includes/rss\.php</exclude-pattern>
     48
     49        <exclude-pattern>/src/wp-includes/blocks/*</exclude-pattern>
     50        <exclude-pattern>/src/wp-includes/ID3/*</exclude-pattern>
     51        <exclude-pattern>/src/wp-includes/IXR/*</exclude-pattern>
     52        <exclude-pattern>/src/wp-includes/random_compat/*</exclude-pattern>
     53        <exclude-pattern>/src/wp-includes/Requests/*</exclude-pattern>
     54        <exclude-pattern>/src/wp-includes/SimplePie/*</exclude-pattern>
     55        <exclude-pattern>/src/wp-includes/Text/*</exclude-pattern>
     56
     57        <exclude-pattern>/tests/phpunit/includes/speed-trap-listener\.php</exclude-pattern>
     58
     59        <!-- Test data and fixtures -->
     60        <exclude-pattern>/tests/phpunit/build*</exclude-pattern>
     61        <exclude-pattern>/tests/phpunit/data/*</exclude-pattern>
     62
     63        <exclude-pattern>/tools/*</exclude-pattern>
     64</ruleset>