diff --git a/res/composer-schema.json b/res/composer-schema.json
index 35377faff..70b386da3 100644
--- a/res/composer-schema.json
+++ b/res/composer-schema.json
@@ -206,6 +206,42 @@
"description": "Occurs after a package has been uninstalled, contains one or more Class::method callables."
}
}
+ },
+ "support": {
+ "type": "object",
+ "additionalProperties": true,
+ "properties": {
+ "email": {
+ "type": "string",
+ "description": "Email address of the community.",
+ "format": "email"
+ },
+ "issues": {
+ "type": "string",
+ "description": "URL to the Issue Tracker.",
+ "format": "uri"
+ },
+ "forum": {
+ "type": "string",
+ "description": "URL to the Forum.",
+ "format": "uri"
+ },
+ "wiki": {
+ "type": "string",
+ "description": "URL to the Wiki.",
+ "format": "uri"
+ },
+ "irc": {
+ "type": "string",
+ "description": "Irc support channel"
+ },
+ "source": {
+ "type": "string",
+ "description": "URL to the sources",
+ "format": "uri"
+ }
+ }
}
+
}
}
diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php
index aaaca2031..86bf53525 100644
--- a/src/Composer/Command/ShowCommand.php
+++ b/src/Composer/Command/ShowCommand.php
@@ -170,6 +170,13 @@ EOT
$output->writeln('dist : ' . sprintf('[%s] %s %s', $package->getDistType(), $package->getDistUrl(), $package->getDistReference()));
$output->writeln('names : ' . implode(', ', $package->getNames()));
+ if ($package->getSupport()) {
+ $output->writeln("\nsupport");
+ foreach ($package->getSupport() as $type => $url) {
+ $output->writeln('' . $type . ' : '.$url);
+ }
+ }
+
if ($package->getAutoload()) {
$output->writeln("\nautoload");
foreach ($package->getAutoload() as $type => $autoloads) {
diff --git a/src/Composer/Package/AliasPackage.php b/src/Composer/Package/AliasPackage.php
index 5bc86e889..b96398f0c 100644
--- a/src/Composer/Package/AliasPackage.php
+++ b/src/Composer/Package/AliasPackage.php
@@ -303,6 +303,10 @@ class AliasPackage extends BasePackage
{
return $this->aliasOf->getAuthors();
}
+ public function getSupport()
+ {
+ return $this->aliasOf->getSupport();
+ }
public function __toString()
{
return parent::__toString().' (alias of '.$this->aliasOf->getVersion().')';
diff --git a/src/Composer/Package/Dumper/ArrayDumper.php b/src/Composer/Package/Dumper/ArrayDumper.php
index ed25e656b..70691ee44 100644
--- a/src/Composer/Package/Dumper/ArrayDumper.php
+++ b/src/Composer/Package/Dumper/ArrayDumper.php
@@ -37,6 +37,7 @@ class ArrayDumper
'autoload',
'repositories',
'includePaths' => 'include-path',
+ 'support',
);
$data = array();
diff --git a/src/Composer/Package/Loader/ArrayLoader.php b/src/Composer/Package/Loader/ArrayLoader.php
index 035dcf75a..c760eb388 100644
--- a/src/Composer/Package/Loader/ArrayLoader.php
+++ b/src/Composer/Package/Loader/ArrayLoader.php
@@ -184,6 +184,10 @@ class ArrayLoader
$package->setIncludePaths($config['include-path']);
}
+ if (isset($config['support'])) {
+ $package->setSupport($config['support']);
+ }
+
return $package;
}
diff --git a/src/Composer/Package/MemoryPackage.php b/src/Composer/Package/MemoryPackage.php
index 4d1ba0cd7..d0e4cd053 100644
--- a/src/Composer/Package/MemoryPackage.php
+++ b/src/Composer/Package/MemoryPackage.php
@@ -61,6 +61,7 @@ class MemoryPackage extends BasePackage
protected $suggests = array();
protected $autoload = array();
protected $includePaths = array();
+ protected $support = array();
/**
* Creates a new in memory package.
@@ -691,4 +692,24 @@ class MemoryPackage extends BasePackage
{
return $this->includePaths;
}
+
+ /**
+ * Set the support information
+ *
+ * @param array $support
+ */
+ public function setSupport(array $support)
+ {
+ $this->support = $support;
+ }
+
+ /**
+ * Returns the support information
+ *
+ * @return array
+ */
+ public function getSupport()
+ {
+ return $this->support;
+ }
}