Skip to content

Commit 82b9dc9

Browse files
authored
Drop PhpSpec 5 for PhpSpec 6 (#13)
* build(deps): update phpspec to ^6.0 * doc: update comptability table * chore: fix specs
1 parent 032e1d0 commit 82b9dc9

File tree

5 files changed

+93
-65
lines changed

5 files changed

+93
-65
lines changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131

3232
## Compatibility
3333

34-
| PHPStan version | PhpSpec extension version |
35-
| --------------- | ---------------------- |
36-
| 0.11.6 | 0.2.x |
37-
| 0.10.7 | 0.1.x |
34+
| PHPStan version | PhpSpec version | PhpSpec extension version |
35+
| --------------- | --------------- | ------------------------- |
36+
| ^0.11.6 | ^6.0 | 0.3.x |
37+
| ^0.11.6 | ^5.1 | 0.2.x |
38+
| ^0.10.7 | ^5.1 | 0.1.x |
3839

3940

4041
## Installation

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"php": "^7.1",
77
"phpstan/phpstan": "^0.11.6",
88
"nikic/php-parser": "^4.1",
9-
"phpspec/phpspec": "^5.1"
9+
"phpspec/phpspec": "^6.0"
1010
},
1111
"require-dev": {
1212
"phpunit/phpunit": "^7.0",

composer.lock

+79-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/PhpSpec/CodeGenerator/Generator/SpecificationGeneratorSpec.php

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function it_generates_spec_class_from_resource_and_puts_it_into_appropria
5656
'%filepath%' => '/project/spec/Acme/AppSpec.php',
5757
'%name%' => 'AppSpec',
5858
'%namespace%' => 'spec\Acme',
59+
'%imports%' => "use Acme\App;\nuse PhpSpec\ObjectBehavior;",
5960
'%subject%' => 'Acme\App',
6061
'%subject_class%' => 'App'
6162
];
@@ -86,6 +87,7 @@ public function it_uses_template_provided_by_templating_system_if_there_is_one(
8687
'%filepath%' => '/project/spec/Acme/AppSpec.php',
8788
'%name%' => 'AppSpec',
8889
'%namespace%' => 'spec\Acme',
90+
'%imports%' => "use Acme\App;\nuse PhpSpec\ObjectBehavior;",
8991
'%subject%' => 'Acme\App',
9092
'%subject_class%' => 'App'
9193
];

spec/PhpSpec/Formatter/Presenter/Differ/ArrayEngineSpec.php

+6
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55
namespace spec\PhpSpec\Formatter\Presenter\Differ;
66

77
use PhpSpec\ObjectBehavior;
8+
use SebastianBergmann\Exporter\Exporter;
89

910
class ArrayEngineSpec extends ObjectBehavior
1011
{
12+
public function let(Exporter $exporter)
13+
{
14+
$this->beConstructedWith($exporter);
15+
}
16+
1117
public function it_is_a_diff_engine()
1218
{
1319
$this->shouldBeAnInstanceOf('PhpSpec\Formatter\Presenter\Differ\DifferEngine');

0 commit comments

Comments
 (0)