Commit Graph

8 Commits

Author SHA1 Message Date
jrf 3581d34bb0 Build/Tools: Update PHPCS ruleset for WP Core and related Composer setup.
`.gitignore` + `svn:ignore`:
* Add the typical filenames of overloaded PHPCS configs to `.gitignore`.

Composer:
* Use the `develop` (Packagist `dev-master`) version of WPCS as it contains lots of bugfixes.
* Remove the PHPCS dependency. This is a dependency of WPCS, not of WP Core itself. This will also make sure that the PHPCS version used is always one which is supported by WPCS.
* Refreshed the `composer.lock` file.

PHPCS ruleset:
* Removed a reference to a sniff which doesn't exist in WPCS yet.
* Use the PHPCS 3.x `basepath` option to clean up the file paths PHPCS shows in the reports.
* Use the PHPCS 3.x `parallel` option to enable parallel scanning whenever possible to speed up the scans.
* Whitelist the `wp-includes/l10n.php` file from issues being reported by the `WordPress.WP.I18n` sniff.

Fixes #44366.

git-svn-id: https://develop.svn.wordpress.org/trunk@43348 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-15 15:56:58 +00:00
Gary Pendergast dc24919339 Build Tools: Update the description in package.json and composer.json.
The description now matches the tagline on the front page of WordPress.org.

Props ocean90.
Fixes #43558.



git-svn-id: https://develop.svn.wordpress.org/trunk@42961 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-05 07:15:25 +00:00
Gary Pendergast aee223f097 Build Tools: Add a composer.json for development environments.
This allows Core developers to more easily run coding standards checks on PHP code.

Props netweb.
Fixes #43558.



git-svn-id: https://develop.svn.wordpress.org/trunk@42960 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-05 07:04:08 +00:00
Scott Taylor 7b0cd0ac85 Bootstrap: move `composer.{json|lock}` into `src`.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38409 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 19:05:28 +00:00
Scott Taylor 5d4485b184 Bootstrap: exclude more files from the `autoloader.classmap` in `composer.json`.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38395 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 05:39:31 +00:00
Scott Taylor 1c52ad1196 Bootstrap: run `composer require xrstf/composer-php52` to get the updated suggested version. Change the `vendor-dir` to `wp-vendor`.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38393 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 03:35:35 +00:00
Scott Taylor 07fe41b23d Bootstrap: exclude some files from the Composer autoload setup via `exclude-from-classmap`.
See #36335.



git-svn-id: https://develop.svn.wordpress.org/trunk@38391 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 22:21:00 +00:00
Scott Taylor 39a145e0e1 Bootstrap: add a `composer.json` file to the project. No code relies on it (yet), and no `vendor` dir is checked in (yet). No autoloader is being used (yet). Taking this first step will hopefully encourage the perfectionists of our world to scrutinize each line.
To fiddle around with what it does, run `composer install` from the project root. If you do not have Composer installed:
https://getcomposer.org/doc/00-intro.md#locally

tl;dr for Mac/Homebrew users: `brew install composer`

Classes from `wp-includes` and `wp-admin` are eligible for autoloading via `autoload.classmap`. Through a tornado of recent commits, many unsuitable files have been transitioned into a more acceptable state for autoloading: 1 file per class, no side effects.

The file bootstrap in `wp-settings.php` can transition into `autoload.files`. This will be done with care and attention.

See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38384 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 20:59:54 +00:00