diff --git a/README.md b/README.md index 1539b88..cd209d4 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ To install this, make sure you are using the latest release of PHPSpec, and then ```json "require-dev": { ..., - "phpspec/nyan-formatters": "1.*" + "phpspec/nyan-formatters": "2.*" } ``` @@ -32,7 +32,7 @@ Install or update your dependencies, and then in a `phpspec.yml` file in the roo ```yaml extensions: - - PhpSpec\NyanFormattersExtension\Extension + PhpSpec\NyanFormattersExtension\Extension: ~ ``` Then, you can add a `--format` switch to your `phpspec` command with one of the following values: diff --git a/composer.json b/composer.json index ff36f07..33cc8f2 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "license": "MIT", "require": { "php": ">=5.3.3", - "phpspec/phpspec": "~2.0", + "phpspec/phpspec": "~3.0", "whatthejeff/nyancat-scoreboard": "~1.1" }, "autoload": { diff --git a/phpspec.yml.dist b/phpspec.yml.dist index 2cde5c0..73de19c 100644 --- a/phpspec.yml.dist +++ b/phpspec.yml.dist @@ -1,2 +1,2 @@ extensions: - - PhpSpec\NyanFormattersExtension\Extension + PhpSpec\NyanFormattersExtension\Extension: ~ diff --git a/src/PhpSpec/NyanFormattersExtension/Extension.php b/src/PhpSpec/NyanFormattersExtension/Extension.php index a025cb5..33aca42 100644 --- a/src/PhpSpec/NyanFormattersExtension/Extension.php +++ b/src/PhpSpec/NyanFormattersExtension/Extension.php @@ -2,7 +2,7 @@ namespace PhpSpec\NyanFormattersExtension; -use PhpSpec\Extension\ExtensionInterface; +use PhpSpec\Extension as PhpSpecExtension; use PhpSpec\ServiceContainer; /** @@ -12,12 +12,12 @@ * * @author Matthew Davis */ -class Extension implements ExtensionInterface +class Extension implements PhpSpecExtension { /** * {@inheritdoc} */ - public function load(ServiceContainer $container) + public function load(ServiceContainer $container, array $params) { $this->addFormatter($container, 'cat', 'PhpSpec\NyanFormattersExtension\Formatter\NyanFormatter'); $this->addFormatter($container, 'dino', 'PhpSpec\NyanFormattersExtension\Formatter\DinoFormatter'); @@ -33,7 +33,7 @@ public function load(ServiceContainer $container) */ protected function addFormatter(ServiceContainer $container, $name, $class) { - $container->set('formatter.formatters.nyan.' . $name, function ($c) use ($class) { + $container->define('formatter.formatters.nyan.' . $name, function ($c) use ($class) { /** @var ServiceContainer $c */ return new $class( $c->get('formatter.presenter'), diff --git a/src/PhpSpec/NyanFormattersExtension/Formatter/NyanFormatter.php b/src/PhpSpec/NyanFormattersExtension/Formatter/NyanFormatter.php index 27f8334..f21b6db 100644 --- a/src/PhpSpec/NyanFormattersExtension/Formatter/NyanFormatter.php +++ b/src/PhpSpec/NyanFormattersExtension/Formatter/NyanFormatter.php @@ -4,7 +4,7 @@ use PhpSpec\Event\SuiteEvent; use PhpSpec\Event\ExampleEvent; -use PhpSpec\Formatter\DotFormatter; +use PhpSpec\Formatter\ConsoleFormatter; use NyanCat\Cat; use NyanCat\Rainbow; @@ -21,7 +21,7 @@ * @author Jeff Welch * @author Matthew Davis */ -class NyanFormatter extends DotFormatter +class NyanFormatter extends ConsoleFormatter { /** * The number of examples