From 39a145e0e1e442b4bed8921029c86800a804af60 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 26 Aug 2016 20:59:54 +0000 Subject: [PATCH] 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 --- composer.json | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000000..2faf8d1962 --- /dev/null +++ b/composer.json @@ -0,0 +1,47 @@ +{ + "name": "wordpress/wordpress", + "description": "WordPress is web software you can use to create a beautiful website or blog.", + "keywords": [ + "blog", + "cms" + ], + "type": "wordpress-core", + "homepage": "https://wordpress.org/", + "license": "GPL-2.0+", + "authors": [ + { + "name": "WordPress Community", + "homepage": "https://wordpress.org/about/" + } + ], + "support": { + "issues": "https://core.trac.wordpress.org/", + "forum": "https://wordpress.org/support/", + "wiki": "https://codex.wordpress.org/", + "irc": "irc://irc.freenode.net/wordpress", + "source": "https://core.trac.wordpress.org/browser" + }, + "require": { + "xrstf/composer-php52": "1.*" + }, + "scripts": { + "post-install-cmd": [ + "xrstf\\Composer52\\Generator::onPostInstallCmd" + ], + "post-update-cmd": [ + "xrstf\\Composer52\\Generator::onPostInstallCmd" + ], + "post-autoload-dump": [ + "xrstf\\Composer52\\Generator::onPostInstallCmd" + ] + }, + "autoload": { + "classmap": [ + "src/wp-includes/", + "src/wp-admin/" + ] + }, + "config": { + "vendor-dir": "src/vendor" + } +} \ No newline at end of file