Commit 182331d5 authored by Anton Smirnov's avatar Anton Smirnov

Plugin skeleton

parent bf0d9d6a
/.idea
/docs/*.html
/vendor/
composer.lock
{
"name": "sandfoxme/composer-yaml",
"type": "library",
"type": "composer-plugin",
"license": "MIT",
"description": "Yaml support plugin for composer",
"keywords": [
"composer",
"composer plugin",
"yaml"
],
"authors": [
......@@ -13,5 +14,24 @@
"email": "sandfox@sandfox.me"
}
],
"require": {}
"autoload": {
"psr-4": {
"SandFox\\ComposerYaml\\": "src"
}
},
"extra": {
"class": "SandFox\\ComposerYaml\\YamlPlugin"
},
"require": {
"symfony/yaml": "^2|^3|^4",
"composer-plugin-api": "^1.1",
"php": ">= 5.5"
},
"require-dev": {
"composer/composer": "~1.8"
},
"suggest": {
"ext-yaml": "*"
}
}
<?php
namespace SandFox\ComposerYaml;
use Composer\Plugin\Capability\CommandProvider;
class YamlCommandProvider implements CommandProvider
{
public function getCommands()
{
return [
];
}
}
<?php
namespace SandFox\ComposerYaml;
use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Plugin\Capability\CommandProvider;
use Composer\Plugin\Capable;
use Composer\Plugin\PluginInterface;
class YamlPlugin implements PluginInterface, Capable
{
public function getCapabilities()
{
return [
CommandProvider::class => YamlCommandProvider::class,
];
}
public function activate(Composer $composer, IOInterface $io)
{
//
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment