2011-08-20 12:55:01 +00:00
{
2014-11-28 22:02:05 +00:00
"$schema" : "http://json-schema.org/draft-04/schema#" ,
2011-08-20 12:55:01 +00:00
"name" : "Package" ,
"type" : "object" ,
"additionalProperties" : false ,
2014-11-28 22:02:05 +00:00
"required" : [ "name" , "description" ] ,
2011-08-20 12:55:01 +00:00
"properties" : {
"name" : {
"type" : "string" ,
2014-11-28 22:02:05 +00:00
"description" : "Package name, including 'vendor-name/' prefix."
2011-08-20 12:55:01 +00:00
} ,
"type" : {
2013-08-13 11:25:21 +00:00
"description" : "Package type, either 'library' for common packages, 'composer-plugin' for plugins, 'metapackage' for empty packages, or a custom type ([a-z0-9-]+) defined by whatever project this package applies to." ,
2011-11-20 15:23:22 +00:00
"type" : "string"
2011-08-20 12:55:01 +00:00
} ,
2011-10-16 16:52:08 +00:00
"target-dir" : {
2014-01-03 15:46:56 +00:00
"description" : "DEPRECATED: Forces the package to be installed into the given subdirectory path. This is used for autoloading PSR-0 packages that do not contain their full path. Use forward slashes for cross-platform compatibility." ,
2011-10-09 14:43:16 +00:00
"type" : "string"
} ,
2011-08-20 12:55:01 +00:00
"description" : {
"type" : "string" ,
2014-11-28 22:02:05 +00:00
"description" : "Short package description."
2011-08-20 12:55:01 +00:00
} ,
"keywords" : {
"type" : "array" ,
"items" : {
2011-11-20 15:23:22 +00:00
"type" : "string" ,
"description" : "A tag/keyword that this package relates to."
}
2011-08-20 12:55:01 +00:00
} ,
"homepage" : {
"type" : "string" ,
2011-11-20 15:23:22 +00:00
"description" : "Homepage URL for the project." ,
"format" : "uri"
2011-08-20 12:55:01 +00:00
} ,
"version" : {
"type" : "string" ,
2015-05-04 17:37:57 +00:00
"description" : "Package version, see https://getcomposer.org/doc/04-schema.md#version for more info on valid schemes."
2011-08-20 12:55:01 +00:00
} ,
2011-11-20 15:23:22 +00:00
"time" : {
"type" : "string" ,
2014-06-07 15:04:06 +00:00
"description" : "Package release date, in 'YYYY-MM-DD', 'YYYY-MM-DD HH:MM:SS' or 'YYYY-MM-DDTHH:MM:SSZ' format."
2011-11-20 15:23:22 +00:00
} ,
2011-08-20 12:55:01 +00:00
"license" : {
2011-09-26 23:09:48 +00:00
"type" : [ "string" , "array" ] ,
2011-11-20 15:23:22 +00:00
"description" : "License name. Or an array of license names."
2011-08-20 12:55:01 +00:00
} ,
"authors" : {
"type" : "array" ,
2011-11-20 15:23:22 +00:00
"description" : "List of authors that contributed to the package. This is typically the main maintainers, not the full list." ,
2011-08-20 12:55:01 +00:00
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
2014-11-28 22:02:05 +00:00
"required" : [ "name" ] ,
2011-08-20 12:55:01 +00:00
"properties" : {
"name" : {
"type" : "string" ,
2014-11-28 22:02:05 +00:00
"description" : "Full name of the author."
2011-08-20 12:55:01 +00:00
} ,
"email" : {
"type" : "string" ,
2011-11-20 15:23:22 +00:00
"description" : "Email address of the author." ,
"format" : "email"
2011-08-20 12:55:01 +00:00
} ,
"homepage" : {
"type" : "string" ,
2011-11-20 15:23:22 +00:00
"description" : "Homepage URL for the author." ,
"format" : "uri"
2012-04-28 14:26:47 +00:00
} ,
"role" : {
"type" : "string" ,
2012-05-01 14:01:55 +00:00
"description" : "Author's role in the project."
2011-08-20 12:55:01 +00:00
}
}
2011-11-20 15:23:22 +00:00
}
2011-08-20 12:55:01 +00:00
} ,
"require" : {
"type" : "object" ,
2011-11-20 15:23:22 +00:00
"description" : "This is a hash of package name (keys) and version constraints (values) that are required to run this package." ,
"additionalProperties" : true
2011-08-20 12:55:01 +00:00
} ,
2011-09-26 23:09:48 +00:00
"replace" : {
"type" : "object" ,
2011-11-20 15:23:22 +00:00
"description" : "This is a hash of package name (keys) and version constraints (values) that can be replaced by this package." ,
"additionalProperties" : true
2011-09-26 23:09:48 +00:00
} ,
"conflict" : {
"type" : "object" ,
2011-11-20 15:23:22 +00:00
"description" : "This is a hash of package name (keys) and version constraints (values) that conflict with this package." ,
"additionalProperties" : true
2011-09-26 23:09:48 +00:00
} ,
"provide" : {
"type" : "object" ,
2011-11-20 15:23:22 +00:00
"description" : "This is a hash of package name (keys) and version constraints (values) that this package provides in addition to this package's name." ,
"additionalProperties" : true
2011-09-26 23:09:48 +00:00
} ,
2012-04-14 10:00:01 +00:00
"require-dev" : {
2011-09-26 23:09:48 +00:00
"type" : "object" ,
2012-04-14 10:00:01 +00:00
"description" : "This is a hash of package name (keys) and version constraints (values) that this package requires for developing it (testing tools and such)." ,
2011-11-20 15:23:22 +00:00
"additionalProperties" : true
2011-09-26 23:09:48 +00:00
} ,
"suggest" : {
"type" : "object" ,
2012-04-14 10:00:01 +00:00
"description" : "This is a hash of package name (keys) and descriptions (values) that this package suggests work well with it (this will be suggested to the user during installation)." ,
2011-11-20 15:23:22 +00:00
"additionalProperties" : true
2011-09-26 23:09:48 +00:00
} ,
2012-02-19 17:24:27 +00:00
"config" : {
2013-02-12 10:16:52 +00:00
"type" : "object" ,
2012-02-19 17:24:27 +00:00
"description" : "Composer options." ,
"properties" : {
2012-09-07 22:44:19 +00:00
"process-timeout" : {
"type" : "integer" ,
"description" : "The timeout in seconds for process executions, defaults to 300 (5mins)."
} ,
2013-02-12 10:16:52 +00:00
"use-include-path" : {
"type" : "boolean" ,
"description" : "If true, the Composer autoloader will also look for classes in the PHP include path."
} ,
2013-03-05 11:56:09 +00:00
"preferred-install" : {
"type" : "string" ,
"description" : "The install method Composer will prefer to use, defaults to auto and can be any of source, dist or auto."
2013-03-04 19:23:55 +00:00
} ,
2012-09-07 22:44:19 +00:00
"notify-on-install" : {
"type" : "boolean" ,
"description" : "Composer allows repositories to define a notification URL, so that they get notified whenever a package from that repository is installed. This option allows you to disable that behaviour, defaults to true."
} ,
"github-protocols" : {
"type" : "array" ,
"description" : "A list of protocols to use for github.com clones, in priority order, defaults to [\"git\", \"https\", \"http\"]." ,
"items" : {
"type" : "string"
}
2013-02-12 10:16:52 +00:00
} ,
"github-oauth" : {
"type" : "object" ,
"description" : "A hash of domain name => github API oauth tokens, typically {\"github.com\":\"<token>\"}." ,
"additionalProperties" : true
} ,
2014-05-27 11:50:47 +00:00
"http-basic" : {
"type" : "object" ,
"description" : "A hash of domain name => {\"username\": \"...\", \"password\": \"...\"}." ,
"additionalProperties" : true
} ,
"store-auths" : {
"type" : [ "string" , "boolean" ] ,
"description" : "What to do after prompting for authentication, one of: true (store), false (do not store) or \"prompt\" (ask every time), defaults to prompt."
} ,
2015-04-29 21:38:07 +00:00
"platform" : {
"type" : "object" ,
"description" : "This is a hash of package name (keys) and version (values) that will be used to mock the platform packages on this machine." ,
"additionalProperties" : true
} ,
2013-02-12 10:16:52 +00:00
"vendor-dir" : {
"type" : "string" ,
"description" : "The location where all packages are installed, defaults to \"vendor\"."
} ,
"bin-dir" : {
"type" : "string" ,
"description" : "The location where all binaries are linked, defaults to \"vendor/bin\"."
} ,
"cache-dir" : {
"type" : "string" ,
"description" : "The location where all caches are located, defaults to \"~/.composer/cache\" on *nix and \"%LOCALAPPDATA%\\Composer\" on windows."
} ,
"cache-files-dir" : {
"type" : "string" ,
"description" : "The location where files (zip downloads) are cached, defaults to \"{$cache-dir}/files\"."
} ,
"cache-repo-dir" : {
"type" : "string" ,
"description" : "The location where repo (git/hg repo clones) are cached, defaults to \"{$cache-dir}/repo\"."
} ,
"cache-vcs-dir" : {
"type" : "string" ,
"description" : "The location where vcs infos (git clones, github api calls, etc. when reading vcs repos) are cached, defaults to \"{$cache-dir}/vcs\"."
} ,
"cache-ttl" : {
"type" : "integer" ,
"description" : "The default cache time-to-live, defaults to 15552000 (6 months)."
} ,
"cache-files-ttl" : {
"type" : "integer" ,
"description" : "The cache time-to-live for files, defaults to the value of cache-ttl."
} ,
"cache-files-maxsize" : {
"type" : [ "string" , "integer" ] ,
"description" : "The cache max size for the files cache, defaults to \"300MiB\"."
2013-02-28 16:10:04 +00:00
} ,
2015-02-03 20:06:53 +00:00
"bin-compat" : {
2015-10-27 15:36:12 +00:00
"enum" : [ "auto" , "full" ] ,
"description" : "The compatibility of the binaries, defaults to \"auto\" (automatically guessed) and can be \"full\" (compatible with both Windows and Unix-based systems)."
2015-02-03 20:06:53 +00:00
} ,
2013-02-28 16:10:04 +00:00
"discard-changes" : {
2013-03-01 22:47:24 +00:00
"type" : [ "string" , "boolean" ] ,
"description" : "The default style of handling dirty updates, defaults to false and can be any of true, false or \"stash\"."
2013-10-16 16:35:44 +00:00
} ,
2013-12-23 03:01:42 +00:00
"autoloader-suffix" : {
2013-12-23 16:27:33 +00:00
"type" : "string" ,
2013-12-26 16:40:52 +00:00
"description" : "Optional string to be used as a suffix for the generated Composer autoloader. When null a random one will be generated."
2013-12-23 03:01:42 +00:00
} ,
2014-01-17 13:43:54 +00:00
"optimize-autoloader" : {
2014-01-16 19:44:16 +00:00
"type" : "boolean" ,
2014-05-27 11:50:47 +00:00
"description" : "Always optimize when dumping the autoloader."
2014-01-16 19:44:16 +00:00
} ,
2013-10-16 16:35:44 +00:00
"prepend-autoloader" : {
"type" : "boolean" ,
"description" : "If false, the composer autoloader will not be prepended to existing autoloaders, defaults to true."
2012-09-07 23:51:33 +00:00
} ,
2015-01-04 00:35:25 +00:00
"classmap-authoritative" : {
"type" : "boolean" ,
"description" : "If true, the composer autoloader will not scan the filesystem for classes that are not found in the class map, defaults to false."
} ,
2012-09-07 23:51:33 +00:00
"github-domains" : {
"type" : "array" ,
"description" : "A list of domains to use in github mode. This is used for GitHub Enterprise setups, defaults to [\"github.com\"]." ,
"items" : {
"type" : "string"
}
2014-10-17 16:21:48 +00:00
} ,
"github-expose-hostname" : {
"type" : "boolean" ,
"description" : "Defaults to true. If set to false, the OAuth tokens created to access the github API will have a date instead of the machine hostname."
2015-05-27 07:20:07 +00:00
} ,
"archive-format" : {
"type" : "string" ,
"description" : "The default archiving format when not provided on cli, defaults to \"tar\"."
} ,
"archive-dir" : {
"type" : "string" ,
"description" : "The default archive path when not provided on cli, defaults to \".\"."
2012-02-19 17:24:27 +00:00
}
}
} ,
2011-08-20 12:55:01 +00:00
"extra" : {
"type" : [ "object" , "array" ] ,
2013-08-13 11:25:21 +00:00
"description" : "Arbitrary extra data that can be used by plugins, for example, package of type composer-plugin may have a 'class' key defining an installer class name." ,
2011-11-20 15:23:22 +00:00
"additionalProperties" : true
2011-10-09 14:43:16 +00:00
} ,
"autoload" : {
"type" : "object" ,
2011-11-20 15:23:22 +00:00
"description" : "Description of how the package can be autoloaded." ,
2011-10-22 19:44:19 +00:00
"properties" : {
2014-02-27 09:39:33 +00:00
"psr-0" : {
"type" : "object" ,
"description" : "This is a hash of namespaces (keys) and the directories they can be found into (values, can be arrays of paths) by the autoloader." ,
"additionalProperties" : true
} ,
"psr-4" : {
"type" : "object" ,
"description" : "This is a hash of namespaces (keys) and the PSR-4 directories they can map to (values, can be arrays of paths) by the autoloader." ,
"additionalProperties" : true
} ,
"classmap" : {
"type" : "array" ,
"description" : "This is an array of directories that contain classes to be included in the class-map generation process."
} ,
"files" : {
"type" : "array" ,
"description" : "This is an array of files that are always required on every request."
2014-01-27 10:42:54 +00:00
} ,
"exclude-from-classmap" : {
"type" : "array" ,
"description" : "This is an array of patterns to exclude from autoload classmap generation. (e.g. \"exclude-from-classmap\": [\"/test/\", \"/tests/\", \"/Tests/\"]"
2014-02-27 09:39:33 +00:00
}
}
} ,
"autoload-dev" : {
"type" : "object" ,
"description" : "Description of additional autoload rules for development purpose (eg. a test suite)." ,
"properties" : {
2011-10-22 19:44:19 +00:00
"psr-0" : {
"type" : "object" ,
2012-03-28 15:09:07 +00:00
"description" : "This is a hash of namespaces (keys) and the directories they can be found into (values, can be arrays of paths) by the autoloader." ,
2011-10-22 19:44:19 +00:00
"additionalProperties" : true
2012-03-05 12:26:46 +00:00
} ,
2013-12-14 15:28:27 +00:00
"psr-4" : {
"type" : "object" ,
2014-01-03 15:31:05 +00:00
"description" : "This is a hash of namespaces (keys) and the PSR-4 directories they can map to (values, can be arrays of paths) by the autoloader." ,
2013-12-14 15:28:27 +00:00
"additionalProperties" : true
} ,
2012-03-05 12:26:46 +00:00
"classmap" : {
"type" : "array" ,
"description" : "This is an array of directories that contain classes to be included in the class-map generation process."
2012-06-02 16:18:33 +00:00
} ,
"files" : {
"type" : "array" ,
"description" : "This is an array of files that are always required on every request."
2011-10-22 19:44:19 +00:00
}
}
} ,
2013-02-07 14:45:58 +00:00
"archive" : {
"type" : [ "object" ] ,
"description" : "Options for creating package archives for distribution." ,
"properties" : {
"exclude" : {
"type" : "array" ,
2013-02-17 16:39:48 +00:00
"description" : "A list of patterns for paths to exclude or include if prefixed with an exclamation mark."
2013-02-07 14:45:58 +00:00
}
}
} ,
2011-10-22 19:44:19 +00:00
"repositories" : {
"type" : [ "object" , "array" ] ,
2011-11-20 15:23:22 +00:00
"description" : "A set of additional repositories where packages can be found." ,
2011-10-09 14:43:16 +00:00
"additionalProperties" : true
2012-02-19 20:07:30 +00:00
} ,
2012-04-17 23:33:47 +00:00
"minimum-stability" : {
"type" : [ "string" ] ,
2015-02-10 11:46:11 +00:00
"description" : "The minimum stability the packages must have to be install-able. Possible values are: dev, alpha, beta, RC, stable." ,
"pattern" : "^dev|alpha|beta|rc|RC|stable$"
2012-04-17 23:33:47 +00:00
} ,
2013-03-28 20:02:55 +00:00
"prefer-stable" : {
"type" : [ "boolean" ] ,
2015-03-20 14:23:24 +00:00
"description" : "If set to true, stable packages will be preferred to dev packages when possible, even if the minimum-stability allows unstable packages."
2013-03-28 20:02:55 +00:00
} ,
2012-02-19 20:07:30 +00:00
"bin" : {
"type" : [ "array" ] ,
"description" : "A set of files that should be treated as binaries and symlinked into bin-dir (from config)." ,
"items" : {
"type" : "string"
}
2012-02-19 20:09:06 +00:00
} ,
2012-04-08 15:42:57 +00:00
"include-path" : {
2012-04-04 07:46:31 +00:00
"type" : [ "array" ] ,
2012-04-08 15:42:57 +00:00
"description" : "DEPRECATED: A list of directories which should get added to PHP's include path. This is only present to support legacy projects, and all new code should preferably use autoloading." ,
2012-04-04 07:46:31 +00:00
"items" : {
"type" : "string"
}
} ,
2012-02-19 17:11:21 +00:00
"scripts" : {
"type" : [ "object" ] ,
"description" : "Scripts listeners that will be executed before/after some events." ,
"properties" : {
"pre-install-cmd" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs before the install command is executed, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
} ,
"post-install-cmd" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs after the install command is executed, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
} ,
"pre-update-cmd" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs before the update command is executed, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
} ,
"post-update-cmd" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs after the update command is executed, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
} ,
2013-08-01 06:44:07 +00:00
"pre-status-cmd" : {
"type" : [ "array" , "string" ] ,
"description" : "Occurs before the status command is executed, contains one or more Class::method callables or shell commands."
} ,
"post-status-cmd" : {
"type" : [ "array" , "string" ] ,
"description" : "Occurs after the status command is executed, contains one or more Class::method callables or shell commands."
} ,
2012-02-19 17:11:21 +00:00
"pre-package-install" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs before a package is installed, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
} ,
"post-package-install" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs after a package is installed, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
} ,
"pre-package-update" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs before a package is updated, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
} ,
"post-package-update" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs after a package is updated, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
} ,
"pre-package-uninstall" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs before a package has been uninstalled, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
} ,
"post-package-uninstall" : {
"type" : [ "array" , "string" ] ,
2013-02-22 17:44:50 +00:00
"description" : "Occurs after a package has been uninstalled, contains one or more Class::method callables or shell commands."
} ,
2013-05-06 14:37:21 +00:00
"pre-autoload-dump" : {
"type" : [ "array" , "string" ] ,
"description" : "Occurs before the autoloader is dumped, contains one or more Class::method callables or shell commands."
} ,
2013-02-22 17:44:50 +00:00
"post-autoload-dump" : {
"type" : [ "array" , "string" ] ,
2013-05-06 14:37:21 +00:00
"description" : "Occurs after the autoloader is dumped, contains one or more Class::method callables or shell commands."
2013-05-31 09:47:31 +00:00
} ,
"post-root-package-install" : {
"type" : [ "array" , "string" ] ,
"description" : "Occurs after the root-package is installed, contains one or more Class::method callables or shell commands."
} ,
"post-create-project-cmd" : {
"type" : [ "array" , "string" ] ,
"description" : "Occurs after the create-project command is executed, contains one or more Class::method callables or shell commands."
2012-02-19 17:11:21 +00:00
}
}
2012-03-10 09:24:14 +00:00
} ,
"support" : {
"type" : "object" ,
"properties" : {
"email" : {
"type" : "string" ,
2012-05-27 23:57:12 +00:00
"description" : "Email address for support." ,
2012-03-10 09:24:14 +00:00
"format" : "email"
} ,
"issues" : {
"type" : "string" ,
2015-05-28 11:03:24 +00:00
"description" : "URL to the issue tracker." ,
2012-03-10 09:24:14 +00:00
"format" : "uri"
} ,
"forum" : {
"type" : "string" ,
2015-05-28 11:03:24 +00:00
"description" : "URL to the forum." ,
2012-03-10 09:24:14 +00:00
"format" : "uri"
} ,
"wiki" : {
"type" : "string" ,
2015-05-28 11:03:24 +00:00
"description" : "URL to the wiki." ,
2012-03-10 09:24:14 +00:00
"format" : "uri"
} ,
"irc" : {
"type" : "string" ,
2012-05-27 23:57:12 +00:00
"description" : "IRC channel for support, as irc://server/channel." ,
"format" : "uri"
2012-03-16 07:44:36 +00:00
} ,
"source" : {
"type" : "string" ,
2012-05-27 23:57:12 +00:00
"description" : "URL to browse or download the sources." ,
2012-03-17 12:07:13 +00:00
"format" : "uri"
2015-05-28 11:03:24 +00:00
} ,
"docs" : {
"type" : "string" ,
"description" : "URL to the documentation." ,
"format" : "uri"
2012-03-10 09:24:14 +00:00
}
}
2015-02-02 13:36:50 +00:00
} ,
"non-feature-branches" : {
"type" : [ "array" ] ,
2015-05-06 08:57:35 +00:00
"description" : "A set of string or regex patterns for non-numeric branch names that will not be handled as feature branches." ,
2015-02-02 13:36:50 +00:00
"items" : {
"type" : "string"
}
2015-11-21 07:58:52 +00:00
} ,
"abandoned" : {
2015-11-21 14:13:13 +00:00
"type" : [ "boolean" , "string" ] ,
"description" : "Indicates whether this package has been abandoned, it can be boolean or a package name/URL pointing to a recommended alternative. Defaults to false."
2011-08-20 12:55:01 +00:00
}
}
}