Skip to:
Content

BuddyPress.org

Ticket #7997: 7997.diff

File 7997.diff, 31.5 KB (added by boonebgorges, 6 years ago)
  • .travis.yml

    diff --git a/.travis.yml b/.travis.yml
    index 7eae319e1..67905a675 100644
    a b matrix: 
    3535  include:
    3636    - php: 7.2
    3737      env: WP_VERSION=master BP_TRAVISCI=travis:grunt
     38    - php: 7.2
     39      env: WP_VERSION=master BP_TRAVISCI=travis:phpcompat
    3840    - php: 5.3
    3941      env: WP_VERSION=master BP_TRAVISCI=travis:phpunit
    4042      dist: precise
    before_install: 
    8082
    8183  # prepare for running the tests
    8284  - cd $plugin_dir
     85  - composer install
    8386
    8487  # setup NodeJS version using NVM
    8588  - export PATH="$HOME/.composer/vendor/bin:$PATH"
    before_script: 
    109112
    110113# Run tests
    111114script:
    112   - php tests/lint-php/lint-php.php .
    113115  - grunt $BP_TRAVISCI
    114116
    115117notifications:
  • Gruntfile.js

    diff --git a/Gruntfile.js b/Gruntfile.js
    index 5f321baef..2450faae0 100644
    a b module.exports = function( grunt ) { 
    241241                                src: [ '**/*.scss' ]
    242242                        }
    243243                },
    244                 phplint: {
    245                         good: ['**/*.php'].concat( BP_EXCLUDED_MISC )
    246                 },
    247244                postcss: {
    248245                        options: {
    249246                                map: false,
    module.exports = function( grunt ) { 
    296293                                command: 'svn export --force https://github.com/buddypress/wp-cli-buddypress.git/tags/1.7 cli',
    297294                                cwd: BUILD_DIR,
    298295                                stdout: false
     296                        },
     297                        phpcompat: {
     298                                command: './vendor/bin/phpcs -p --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 5.3- src tests',
     299                                stdout: true
    299300                        }
    300301                },
    301302                jsvalidate:{
    module.exports = function( grunt ) { 
    332333         * Register tasks.
    333334         */
    334335        grunt.registerTask( 'src',     ['checkDependencies', 'jsvalidate:src', 'jshint', 'stylelint', 'sass', 'postcss', 'rtlcss'] );
    335         grunt.registerTask( 'commit',  ['src', 'checktextdomain', 'imagemin','phplint'] );
     336        grunt.registerTask( 'commit',  ['src', 'checktextdomain', 'imagemin','exec:phpcompat'] );
    336337        grunt.registerTask( 'build',   ['commit', 'clean:all', 'copy:files', 'uglify', 'jsvalidate:build', 'cssmin', 'makepot', 'exec:bpdefault', 'exec:cli'] );
    337338        grunt.registerTask( 'release', ['build'] );
    338339
    module.exports = function( grunt ) { 
    351352
    352353        // Travis CI Tasks.
    353354        grunt.registerTask( 'travis:grunt', 'Runs Grunt build task.', [ 'build' ]);
    354         grunt.registerTask( 'travis:phpunit', ['jsvalidate:src', 'jshint', 'checktextdomain', 'phplint', 'test'] );
     355        grunt.registerTask( 'travis:phpunit', ['jsvalidate:src', 'jshint', 'checktextdomain', 'test'] );
    355356        grunt.registerTask( 'travis:codecoverage', 'Runs PHPUnit tasks with code-coverage generation.', ['phpunit:codecoverage'] );
     357        grunt.registerTask( 'travis:phpcompat', 'Runs PHP compatibility scan.', ['exec:phpcompat'] );
    356358
    357359        // Patch task.
    358360        grunt.renameTask( 'patch_wordpress', 'patch' );
  • composer.json

    diff --git a/composer.json b/composer.json
    index 0de32cbe5..df0c4dbdd 100644
    a b  
    2929        "require": {
    3030                "composer/installers": "~1.0",
    3131                "php": ">=5.3.0"
     32        },
     33        "require-dev": {
     34                "phpcompatibility/phpcompatibility-wp": "*",
     35                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
    3236        }
    3337}
  • new file composer.lock

    diff --git a/composer.lock b/composer.lock
    new file mode 100644
    index 000000000..3f6d22c84
    - +  
     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": "90ce29c17b18d6e1939f860a2a0dd560",
     8    "packages": [
     9        {
     10            "name": "composer/installers",
     11            "version": "v1.6.0",
     12            "source": {
     13                "type": "git",
     14                "url": "https://github.com/composer/installers.git",
     15                "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
     16            },
     17            "dist": {
     18                "type": "zip",
     19                "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
     20                "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
     21                "shasum": ""
     22            },
     23            "require": {
     24                "composer-plugin-api": "^1.0"
     25            },
     26            "replace": {
     27                "roundcube/plugin-installer": "*",
     28                "shama/baton": "*"
     29            },
     30            "require-dev": {
     31                "composer/composer": "1.0.*@dev",
     32                "phpunit/phpunit": "^4.8.36"
     33            },
     34            "type": "composer-plugin",
     35            "extra": {
     36                "class": "Composer\\Installers\\Plugin",
     37                "branch-alias": {
     38                    "dev-master": "1.0-dev"
     39                }
     40            },
     41            "autoload": {
     42                "psr-4": {
     43                    "Composer\\Installers\\": "src/Composer/Installers"
     44                }
     45            },
     46            "notification-url": "https://packagist.org/downloads/",
     47            "license": [
     48                "MIT"
     49            ],
     50            "authors": [
     51                {
     52                    "name": "Kyle Robinson Young",
     53                    "email": "kyle@dontkry.com",
     54                    "homepage": "https://github.com/shama"
     55                }
     56            ],
     57            "description": "A multi-framework Composer library installer",
     58            "homepage": "https://composer.github.io/installers/",
     59            "keywords": [
     60                "Craft",
     61                "Dolibarr",
     62                "Eliasis",
     63                "Hurad",
     64                "ImageCMS",
     65                "Kanboard",
     66                "Lan Management System",
     67                "MODX Evo",
     68                "Mautic",
     69                "Maya",
     70                "OXID",
     71                "Plentymarkets",
     72                "Porto",
     73                "RadPHP",
     74                "SMF",
     75                "Thelia",
     76                "WolfCMS",
     77                "agl",
     78                "aimeos",
     79                "annotatecms",
     80                "attogram",
     81                "bitrix",
     82                "cakephp",
     83                "chef",
     84                "cockpit",
     85                "codeigniter",
     86                "concrete5",
     87                "croogo",
     88                "dokuwiki",
     89                "drupal",
     90                "eZ Platform",
     91                "elgg",
     92                "expressionengine",
     93                "fuelphp",
     94                "grav",
     95                "installer",
     96                "itop",
     97                "joomla",
     98                "kohana",
     99                "laravel",
     100                "lavalite",
     101                "lithium",
     102                "magento",
     103                "majima",
     104                "mako",
     105                "mediawiki",
     106                "modulework",
     107                "modx",
     108                "moodle",
     109                "osclass",
     110                "phpbb",
     111                "piwik",
     112                "ppi",
     113                "puppet",
     114                "pxcms",
     115                "reindex",
     116                "roundcube",
     117                "shopware",
     118                "silverstripe",
     119                "sydes",
     120                "symfony",
     121                "typo3",
     122                "wordpress",
     123                "yawik",
     124                "zend",
     125                "zikula"
     126            ],
     127            "time": "2018-08-27T06:10:37+00:00"
     128        }
     129    ],
     130    "packages-dev": [
     131        {
     132            "name": "dealerdirect/phpcodesniffer-composer-installer",
     133            "version": "v0.4.4",
     134            "source": {
     135                "type": "git",
     136                "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
     137                "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08"
     138            },
     139            "dist": {
     140                "type": "zip",
     141                "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/2e41850d5f7797cbb1af7b030d245b3b24e63a08",
     142                "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08",
     143                "shasum": ""
     144            },
     145            "require": {
     146                "composer-plugin-api": "^1.0",
     147                "php": "^5.3|^7",
     148                "squizlabs/php_codesniffer": "*"
     149            },
     150            "require-dev": {
     151                "composer/composer": "*",
     152                "wimg/php-compatibility": "^8.0"
     153            },
     154            "suggest": {
     155                "dealerdirect/qa-tools": "All the PHP QA tools you'll need"
     156            },
     157            "type": "composer-plugin",
     158            "extra": {
     159                "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
     160            },
     161            "autoload": {
     162                "psr-4": {
     163                    "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
     164                }
     165            },
     166            "notification-url": "https://packagist.org/downloads/",
     167            "license": [
     168                "MIT"
     169            ],
     170            "authors": [
     171                {
     172                    "name": "Franck Nijhof",
     173                    "email": "f.nijhof@dealerdirect.nl",
     174                    "homepage": "http://workingatdealerdirect.eu",
     175                    "role": "Developer"
     176                }
     177            ],
     178            "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
     179            "homepage": "http://workingatdealerdirect.eu",
     180            "keywords": [
     181                "PHPCodeSniffer",
     182                "PHP_CodeSniffer",
     183                "code quality",
     184                "codesniffer",
     185                "composer",
     186                "installer",
     187                "phpcs",
     188                "plugin",
     189                "qa",
     190                "quality",
     191                "standard",
     192                "standards",
     193                "style guide",
     194                "stylecheck",
     195                "tests"
     196            ],
     197            "time": "2017-12-06T16:27:17+00:00"
     198        },
     199        {
     200            "name": "phpcompatibility/php-compatibility",
     201            "version": "9.0.0",
     202            "source": {
     203                "type": "git",
     204                "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
     205                "reference": "e9f4047e5edf53c88f36f1dafc0d49454ce13e25"
     206            },
     207            "dist": {
     208                "type": "zip",
     209                "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/e9f4047e5edf53c88f36f1dafc0d49454ce13e25",
     210                "reference": "e9f4047e5edf53c88f36f1dafc0d49454ce13e25",
     211                "shasum": ""
     212            },
     213            "require": {
     214                "php": ">=5.3",
     215                "squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
     216            },
     217            "conflict": {
     218                "squizlabs/php_codesniffer": "2.6.2"
     219            },
     220            "require-dev": {
     221                "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
     222            },
     223            "suggest": {
     224                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
     225                "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
     226            },
     227            "type": "phpcodesniffer-standard",
     228            "notification-url": "https://packagist.org/downloads/",
     229            "license": [
     230                "LGPL-3.0-or-later"
     231            ],
     232            "authors": [
     233                {
     234                    "name": "Contributors",
     235                    "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
     236                },
     237                {
     238                    "name": "Wim Godden",
     239                    "homepage": "https://github.com/wimg",
     240                    "role": "lead"
     241                },
     242                {
     243                    "name": "Juliette Reinders Folmer",
     244                    "homepage": "https://github.com/jrfnl",
     245                    "role": "lead"
     246                }
     247            ],
     248            "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
     249            "homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
     250            "keywords": [
     251                "compatibility",
     252                "phpcs",
     253                "standards"
     254            ],
     255            "time": "2018-10-07T17:38:02+00:00"
     256        },
     257        {
     258            "name": "phpcompatibility/phpcompatibility-paragonie",
     259            "version": "1.0.0",
     260            "source": {
     261                "type": "git",
     262                "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
     263                "reference": "67d89dcef47f351144d24b247aa968f2269162f7"
     264            },
     265            "dist": {
     266                "type": "zip",
     267                "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/67d89dcef47f351144d24b247aa968f2269162f7",
     268                "reference": "67d89dcef47f351144d24b247aa968f2269162f7",
     269                "shasum": ""
     270            },
     271            "require": {
     272                "phpcompatibility/php-compatibility": "^9.0"
     273            },
     274            "require-dev": {
     275                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4"
     276            },
     277            "suggest": {
     278                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
     279                "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
     280            },
     281            "type": "phpcodesniffer-standard",
     282            "notification-url": "https://packagist.org/downloads/",
     283            "license": [
     284                "LGPL-3.0-or-later"
     285            ],
     286            "authors": [
     287                {
     288                    "name": "Wim Godden",
     289                    "role": "lead"
     290                },
     291                {
     292                    "name": "Juliette Reinders Folmer",
     293                    "role": "lead"
     294                }
     295            ],
     296            "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.",
     297            "homepage": "http://phpcompatibility.com/",
     298            "keywords": [
     299                "compatibility",
     300                "paragonie",
     301                "phpcs",
     302                "polyfill",
     303                "standards"
     304            ],
     305            "time": "2018-10-07T17:59:30+00:00"
     306        },
     307        {
     308            "name": "phpcompatibility/phpcompatibility-wp",
     309            "version": "2.0.0",
     310            "source": {
     311                "type": "git",
     312                "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
     313                "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd"
     314            },
     315            "dist": {
     316                "type": "zip",
     317                "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
     318                "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
     319                "shasum": ""
     320            },
     321            "require": {
     322                "phpcompatibility/php-compatibility": "^9.0",
     323                "phpcompatibility/phpcompatibility-paragonie": "^1.0"
     324            },
     325            "require-dev": {
     326                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
     327            },
     328            "suggest": {
     329                "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
     330                "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
     331            },
     332            "type": "phpcodesniffer-standard",
     333            "notification-url": "https://packagist.org/downloads/",
     334            "license": [
     335                "LGPL-3.0-or-later"
     336            ],
     337            "authors": [
     338                {
     339                    "name": "Wim Godden",
     340                    "role": "lead"
     341                },
     342                {
     343                    "name": "Juliette Reinders Folmer",
     344                    "role": "lead"
     345                }
     346            ],
     347            "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.",
     348            "homepage": "http://phpcompatibility.com/",
     349            "keywords": [
     350                "compatibility",
     351                "phpcs",
     352                "standards",
     353                "wordpress"
     354            ],
     355            "time": "2018-10-07T18:31:37+00:00"
     356        },
     357        {
     358            "name": "squizlabs/php_codesniffer",
     359            "version": "3.3.2",
     360            "source": {
     361                "type": "git",
     362                "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
     363                "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e"
     364            },
     365            "dist": {
     366                "type": "zip",
     367                "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e",
     368                "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e",
     369                "shasum": ""
     370            },
     371            "require": {
     372                "ext-simplexml": "*",
     373                "ext-tokenizer": "*",
     374                "ext-xmlwriter": "*",
     375                "php": ">=5.4.0"
     376            },
     377            "require-dev": {
     378                "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
     379            },
     380            "bin": [
     381                "bin/phpcs",
     382                "bin/phpcbf"
     383            ],
     384            "type": "library",
     385            "extra": {
     386                "branch-alias": {
     387                    "dev-master": "3.x-dev"
     388                }
     389            },
     390            "notification-url": "https://packagist.org/downloads/",
     391            "license": [
     392                "BSD-3-Clause"
     393            ],
     394            "authors": [
     395                {
     396                    "name": "Greg Sherwood",
     397                    "role": "lead"
     398                }
     399            ],
     400            "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
     401            "homepage": "http://www.squizlabs.com/php-codesniffer",
     402            "keywords": [
     403                "phpcs",
     404                "standards"
     405            ],
     406            "time": "2018-09-23T23:08:17+00:00"
     407        }
     408    ],
     409    "aliases": [],
     410    "minimum-stability": "stable",
     411    "stability-flags": [],
     412    "prefer-stable": false,
     413    "prefer-lowest": false,
     414    "platform": {
     415        "php": ">=5.3.0"
     416    },
     417    "platform-dev": []
     418}
  • npm-shrinkwrap.json

    diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
    index e075c8afb..a64765bef 100644
    a b  
    646646                                "unset-value": "^1.0.0"
    647647                        }
    648648                },
    649                 "cache-swap": {
    650                         "version": "0.3.0",
    651                         "resolved": "https://registry.npmjs.org/cache-swap/-/cache-swap-0.3.0.tgz",
    652                         "integrity": "sha1-HFQaoQilAQb2ML3Zj+HeyLoTP1E=",
    653                         "dev": true,
    654                         "requires": {
    655                                 "graceful-fs": "^4.1.2",
    656                                 "mkdirp": "^0.5.1",
    657                                 "object-assign": "^4.0.1",
    658                                 "rimraf": "^2.4.0"
    659                         }
    660                 },
    661649                "camelcase": {
    662650                        "version": "2.1.1",
    663651                        "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
     
    34893477                                "xmlrpc": "^1.3.1"
    34903478                        }
    34913479                },
    3492                 "grunt-phplint": {
    3493                         "version": "0.1.0",
    3494                         "resolved": "https://registry.npmjs.org/grunt-phplint/-/grunt-phplint-0.1.0.tgz",
    3495                         "integrity": "sha1-bb4uauxTqiKc+sCtmnyZ4kGEhI0=",
    3496                         "dev": true,
    3497                         "requires": {
    3498                                 "cache-swap": "~0.3.0",
    3499                                 "grunt": "~0.4.1"
    3500                         },
    3501                         "dependencies": {
    3502                                 "argparse": {
    3503                                         "version": "0.1.16",
    3504                                         "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz",
    3505                                         "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=",
    3506                                         "dev": true,
    3507                                         "requires": {
    3508                                                 "underscore": "~1.7.0",
    3509                                                 "underscore.string": "~2.4.0"
    3510                                         },
    3511                                         "dependencies": {
    3512                                                 "underscore.string": {
    3513                                                         "version": "2.4.0",
    3514                                                         "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz",
    3515                                                         "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=",
    3516                                                         "dev": true
    3517                                                 }
    3518                                         }
    3519                                 },
    3520                                 "async": {
    3521                                         "version": "0.1.22",
    3522                                         "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz",
    3523                                         "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=",
    3524                                         "dev": true
    3525                                 },
    3526                                 "coffee-script": {
    3527                                         "version": "1.3.3",
    3528                                         "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz",
    3529                                         "integrity": "sha1-FQ1rTLUiiUNp7+1qIQHCC8f0pPQ=",
    3530                                         "dev": true
    3531                                 },
    3532                                 "colors": {
    3533                                         "version": "0.6.2",
    3534                                         "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz",
    3535                                         "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=",
    3536                                         "dev": true
    3537                                 },
    3538                                 "dateformat": {
    3539                                         "version": "1.0.2-1.2.3",
    3540                                         "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz",
    3541                                         "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk=",
    3542                                         "dev": true
    3543                                 },
    3544                                 "esprima": {
    3545                                         "version": "1.0.4",
    3546                                         "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz",
    3547                                         "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=",
    3548                                         "dev": true
    3549                                 },
    3550                                 "findup-sync": {
    3551                                         "version": "0.1.3",
    3552                                         "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz",
    3553                                         "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=",
    3554                                         "dev": true,
    3555                                         "requires": {
    3556                                                 "glob": "~3.2.9",
    3557                                                 "lodash": "~2.4.1"
    3558                                         },
    3559                                         "dependencies": {
    3560                                                 "glob": {
    3561                                                         "version": "3.2.11",
    3562                                                         "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
    3563                                                         "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
    3564                                                         "dev": true,
    3565                                                         "requires": {
    3566                                                                 "inherits": "2",
    3567                                                                 "minimatch": "0.3"
    3568                                                         }
    3569                                                 },
    3570                                                 "lodash": {
    3571                                                         "version": "2.4.2",
    3572                                                         "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
    3573                                                         "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=",
    3574                                                         "dev": true
    3575                                                 },
    3576                                                 "minimatch": {
    3577                                                         "version": "0.3.0",
    3578                                                         "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
    3579                                                         "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
    3580                                                         "dev": true,
    3581                                                         "requires": {
    3582                                                                 "lru-cache": "2",
    3583                                                                 "sigmund": "~1.0.0"
    3584                                                         }
    3585                                                 }
    3586                                         }
    3587                                 },
    3588                                 "glob": {
    3589                                         "version": "3.1.21",
    3590                                         "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
    3591                                         "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=",
    3592                                         "dev": true,
    3593                                         "requires": {
    3594                                                 "graceful-fs": "~1.2.0",
    3595                                                 "inherits": "1",
    3596                                                 "minimatch": "~0.2.11"
    3597                                         },
    3598                                         "dependencies": {
    3599                                                 "inherits": {
    3600                                                         "version": "1.0.2",
    3601                                                         "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
    3602                                                         "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=",
    3603                                                         "dev": true
    3604                                                 }
    3605                                         }
    3606                                 },
    3607                                 "graceful-fs": {
    3608                                         "version": "1.2.3",
    3609                                         "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
    3610                                         "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=",
    3611                                         "dev": true
    3612                                 },
    3613                                 "grunt": {
    3614                                         "version": "0.4.5",
    3615                                         "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz",
    3616                                         "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=",
    3617                                         "dev": true,
    3618                                         "requires": {
    3619                                                 "async": "~0.1.22",
    3620                                                 "coffee-script": "~1.3.3",
    3621                                                 "colors": "~0.6.2",
    3622                                                 "dateformat": "1.0.2-1.2.3",
    3623                                                 "eventemitter2": "~0.4.13",
    3624                                                 "exit": "~0.1.1",
    3625                                                 "findup-sync": "~0.1.2",
    3626                                                 "getobject": "~0.1.0",
    3627                                                 "glob": "~3.1.21",
    3628                                                 "grunt-legacy-log": "~0.1.0",
    3629                                                 "grunt-legacy-util": "~0.2.0",
    3630                                                 "hooker": "~0.2.3",
    3631                                                 "iconv-lite": "~0.2.11",
    3632                                                 "js-yaml": "~2.0.5",
    3633                                                 "lodash": "~0.9.2",
    3634                                                 "minimatch": "~0.2.12",
    3635                                                 "nopt": "~1.0.10",
    3636                                                 "rimraf": "~2.2.8",
    3637                                                 "underscore.string": "~2.2.1",
    3638                                                 "which": "~1.0.5"
    3639                                         }
    3640                                 },
    3641                                 "grunt-legacy-log": {
    3642                                         "version": "0.1.3",
    3643                                         "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz",
    3644                                         "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=",
    3645                                         "dev": true,
    3646                                         "requires": {
    3647                                                 "colors": "~0.6.2",
    3648                                                 "grunt-legacy-log-utils": "~0.1.1",
    3649                                                 "hooker": "~0.2.3",
    3650                                                 "lodash": "~2.4.1",
    3651                                                 "underscore.string": "~2.3.3"
    3652                                         },
    3653                                         "dependencies": {
    3654                                                 "lodash": {
    3655                                                         "version": "2.4.2",
    3656                                                         "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
    3657                                                         "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=",
    3658                                                         "dev": true
    3659                                                 },
    3660                                                 "underscore.string": {
    3661                                                         "version": "2.3.3",
    3662                                                         "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
    3663                                                         "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=",
    3664                                                         "dev": true
    3665                                                 }
    3666                                         }
    3667                                 },
    3668                                 "grunt-legacy-log-utils": {
    3669                                         "version": "0.1.1",
    3670                                         "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz",
    3671                                         "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=",
    3672                                         "dev": true,
    3673                                         "requires": {
    3674                                                 "colors": "~0.6.2",
    3675                                                 "lodash": "~2.4.1",
    3676                                                 "underscore.string": "~2.3.3"
    3677                                         },
    3678                                         "dependencies": {
    3679                                                 "lodash": {
    3680                                                         "version": "2.4.2",
    3681                                                         "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
    3682                                                         "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=",
    3683                                                         "dev": true
    3684                                                 },
    3685                                                 "underscore.string": {
    3686                                                         "version": "2.3.3",
    3687                                                         "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
    3688                                                         "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=",
    3689                                                         "dev": true
    3690                                                 }
    3691                                         }
    3692                                 },
    3693                                 "grunt-legacy-util": {
    3694                                         "version": "0.2.0",
    3695                                         "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz",
    3696                                         "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=",
    3697                                         "dev": true,
    3698                                         "requires": {
    3699                                                 "async": "~0.1.22",
    3700                                                 "exit": "~0.1.1",
    3701                                                 "getobject": "~0.1.0",
    3702                                                 "hooker": "~0.2.3",
    3703                                                 "lodash": "~0.9.2",
    3704                                                 "underscore.string": "~2.2.1",
    3705                                                 "which": "~1.0.5"
    3706                                         }
    3707                                 },
    3708                                 "iconv-lite": {
    3709                                         "version": "0.2.11",
    3710                                         "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
    3711                                         "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg=",
    3712                                         "dev": true
    3713                                 },
    3714                                 "js-yaml": {
    3715                                         "version": "2.0.5",
    3716                                         "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz",
    3717                                         "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=",
    3718                                         "dev": true,
    3719                                         "requires": {
    3720                                                 "argparse": "~ 0.1.11",
    3721                                                 "esprima": "~ 1.0.2"
    3722                                         }
    3723                                 },
    3724                                 "lodash": {
    3725                                         "version": "0.9.2",
    3726                                         "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz",
    3727                                         "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw=",
    3728                                         "dev": true
    3729                                 },
    3730                                 "lru-cache": {
    3731                                         "version": "2.7.3",
    3732                                         "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
    3733                                         "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=",
    3734                                         "dev": true
    3735                                 },
    3736                                 "minimatch": {
    3737                                         "version": "0.2.14",
    3738                                         "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
    3739                                         "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
    3740                                         "dev": true,
    3741                                         "requires": {
    3742                                                 "lru-cache": "2",
    3743                                                 "sigmund": "~1.0.0"
    3744                                         }
    3745                                 },
    3746                                 "nopt": {
    3747                                         "version": "1.0.10",
    3748                                         "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
    3749                                         "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
    3750                                         "dev": true,
    3751                                         "requires": {
    3752                                                 "abbrev": "1"
    3753                                         }
    3754                                 },
    3755                                 "rimraf": {
    3756                                         "version": "2.2.8",
    3757                                         "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
    3758                                         "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=",
    3759                                         "dev": true
    3760                                 },
    3761                                 "underscore": {
    3762                                         "version": "1.7.0",
    3763                                         "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
    3764                                         "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=",
    3765                                         "dev": true
    3766                                 },
    3767                                 "underscore.string": {
    3768                                         "version": "2.2.1",
    3769                                         "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz",
    3770                                         "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk=",
    3771                                         "dev": true
    3772                                 },
    3773                                 "which": {
    3774                                         "version": "1.0.9",
    3775                                         "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz",
    3776                                         "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=",
    3777                                         "dev": true
    3778                                 }
    3779                         }
    3780                 },
    37813480                "grunt-postcss": {
    37823481                        "version": "0.9.0",
    37833482                        "resolved": "https://registry.npmjs.org/grunt-postcss/-/grunt-postcss-0.9.0.tgz",
     
    70366735                        "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=",
    70376736                        "dev": true
    70386737                },
    7039                 "sigmund": {
    7040                         "version": "1.0.1",
    7041                         "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
    7042                         "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
    7043                         "dev": true
    7044                 },
    70456738                "signal-exit": {
    70466739                        "version": "3.0.2",
    70476740                        "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
  • package.json

    diff --git a/package.json b/package.json
    index 76e198c9e..e736b193f 100644
    a b  
    2121                "grunt-jsvalidate": "~0.2.2",
    2222                "grunt-legacy-util": "~1.1.1",
    2323                "grunt-patch-wordpress": "~1.0.0",
    24                 "grunt-phplint": "~0.1.0",
    2524                "grunt-postcss": "~0.9.0",
    2625                "grunt-rtlcss": "~2.0.1",
    2726                "grunt-sass": "~2.0.0",
  • deleted file tests/lint-php/lint-php.php

    diff --git a/tests/lint-php/lint-php.php b/tests/lint-php/lint-php.php
    deleted file mode 100644
    index 9af8e57da..000000000
    + -  
    1 <?php
    2 
    3 /**
    4  * Recurses each directory and runs PHP's lint function against each file to test for parse errors.
    5  *
    6  * @since 4.0.0
    7  *
    8  * @param string $dir The directory you would like to start from.
    9  * @return array The files that did not pass the test.
    10  */
    11 function bp_lint( $dir ) {
    12         static $failed = array();
    13 
    14         $excluded_dirs  = array();
    15         $excluded_files = array();
    16 
    17         foreach ( new RecursiveDirectoryIterator( $dir ) as $path => $objSplFileInfo ) {
    18                 // Recurse if directory.
    19                 if ( $objSplFileInfo->isDir() ) {
    20                         if ( stristr( $objSplFileInfo->getFileName(), '.svn' ) !== false ) {
    21                                 continue;
    22                         }
    23 
    24                         if ( '.' === $objSplFileInfo->getFileName() || '..' === $objSplFileInfo->getFileName() ) {
    25                                 continue;
    26                         }
    27 
    28                         $relativePath = bp_lint_get_relative_path( $objSplFileInfo->getRealPath() );
    29 
    30                         if ( in_array( $relativePath, $excluded_dirs, true ) ) {
    31                                 continue;
    32                         }
    33 
    34                         bp_lint( $objSplFileInfo->getPathName() );
    35 
    36                         continue;
    37                 }
    38 
    39                 // are there any non-dirs that aren't files?
    40                 if ( ! $objSplFileInfo->isFile() ) {
    41                         throw new UnexpectedValueException( 'Not a dir and not a file?' );
    42                 }
    43 
    44                 // skip non-php files
    45                 if ( preg_match( '#\.php$#', $objSplFileInfo->getFileName() ) !== 1 ) {
    46                         continue;
    47                 }
    48 
    49                 // Blacklist.
    50                 $relativePath = bp_lint_get_relative_path( $objSplFileInfo );
    51                 if ( in_array( $relativePath, $excluded_files, true ) ) {
    52                         continue;
    53                 }
    54 
    55                 // Perform the lint check.
    56                 $result = exec( 'php -l ' . escapeshellarg( $objSplFileInfo ) );
    57                 if ( preg_match( '#^No syntax errors detected in#', $result ) !== 1 ) {
    58                         $failed[ $objSplFileInfo->getPathName() ] = $result;
    59                 }
    60         }
    61 
    62         echo '.';
    63         return $failed;
    64 }
    65 
    66 /**
    67  * Gets a relative path.
    68  *
    69  * @since 4.0.0
    70  *
    71  * @param string $path Full path.
    72  * @return string
    73  */
    74 function bp_lint_get_relative_path( $path ) {
    75         return str_replace( realpath( __DIR__ . '/../' ), '', $path );
    76 }
    77 
    78 echo 'Linting...';
    79 $failed = bp_lint( realpath( $argv[1] ) );
    80 echo "\n";
    81 if ( empty( $failed ) ) {
    82         echo 'All checks passed.' . "\n";
    83         exit( 0 );
    84 } else {
    85         echo 'Errors found in the following files:' . "\n";
    86         print_r( $failed );
    87         echo "\n";
    88         exit( 1 );
    89 }