Skip to content

Commit 7204c8c

Browse files
committed
Prepare for PhpSpec 3.0
1 parent dd784df commit 7204c8c

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ To install this, make sure you are using the latest release of PHPSpec, and then
2424
```json
2525
"require-dev": {
2626
...,
27-
"phpspec/nyan-formatters": "1.*"
27+
"phpspec/nyan-formatters": "2.*"
2828
}
2929
```
3030

3131
Install or update your dependencies, and then in a `phpspec.yml` file in the root of your project, add the following:
3232

3333
```yaml
3434
extensions:
35-
- PhpSpec\NyanFormattersExtension\Extension
35+
PhpSpec\NyanFormattersExtension\Extension: ~
3636
```
3737
3838
Then, you can add a `--format` switch to your `phpspec` command with one of the following values:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "MIT",
88
"require": {
99
"php": ">=5.3.3",
10-
"phpspec/phpspec": "~2.0",
10+
"phpspec/phpspec": "~3.0",
1111
"whatthejeff/nyancat-scoreboard": "~1.1"
1212
},
1313
"autoload": {

phpspec.yml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
extensions:
2-
- PhpSpec\NyanFormattersExtension\Extension
2+
PhpSpec\NyanFormattersExtension\Extension: ~

src/PhpSpec/NyanFormattersExtension/Extension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PhpSpec\NyanFormattersExtension;
44

5-
use PhpSpec\Extension\ExtensionInterface;
5+
use PhpSpec\Extension as PhpSpecExtension;
66
use PhpSpec\ServiceContainer;
77

88
/**
@@ -12,12 +12,12 @@
1212
*
1313
* @author Matthew Davis <[email protected]>
1414
*/
15-
class Extension implements ExtensionInterface
15+
class Extension implements PhpSpecExtension
1616
{
1717
/**
1818
* {@inheritdoc}
1919
*/
20-
public function load(ServiceContainer $container)
20+
public function load(ServiceContainer $container, array $params)
2121
{
2222
$this->addFormatter($container, 'cat', 'PhpSpec\NyanFormattersExtension\Formatter\NyanFormatter');
2323
$this->addFormatter($container, 'dino', 'PhpSpec\NyanFormattersExtension\Formatter\DinoFormatter');
@@ -33,7 +33,7 @@ public function load(ServiceContainer $container)
3333
*/
3434
protected function addFormatter(ServiceContainer $container, $name, $class)
3535
{
36-
$container->set('formatter.formatters.nyan.' . $name, function ($c) use ($class) {
36+
$container->define('formatter.formatters.nyan.' . $name, function ($c) use ($class) {
3737
/** @var ServiceContainer $c */
3838
return new $class(
3939
$c->get('formatter.presenter'),

src/PhpSpec/NyanFormattersExtension/Formatter/NyanFormatter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use PhpSpec\Event\SuiteEvent;
66
use PhpSpec\Event\ExampleEvent;
7-
use PhpSpec\Formatter\DotFormatter;
7+
use PhpSpec\Formatter\ConsoleFormatter;
88

99
use NyanCat\Cat;
1010
use NyanCat\Rainbow;
@@ -21,7 +21,7 @@
2121
* @author Jeff Welch <[email protected]>
2222
* @author Matthew Davis <[email protected]>
2323
*/
24-
class NyanFormatter extends DotFormatter
24+
class NyanFormatter extends ConsoleFormatter
2525
{
2626
/**
2727
* The number of examples

0 commit comments

Comments
 (0)