Skip to content

Commit 0a86a6c

Browse files
authored
Merge pull request #48 from Sam-Burns/phpspec4
PhpSpec 4 compatibility
2 parents 6c77676 + 774af85 commit 0a86a6c

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ matrix:
1010
include:
1111
- php: 7.1
1212
env: DEPENDENCIES='low'
13-
- php: 5.6
1413
- php: 7.0
1514
- php: 7.1
1615
- php: nightly

Bossa/PhpSpec/Expect/Subject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class Subject extends BaseSubject
88
{
9-
public function __call($method, array $arguments = array())
9+
public function __call(string $method, array $arguments = array())
1010
{
1111
if (preg_match('/^(to|notTo)(.+)$/', $method, $matches)) {
1212
$method = 'should'.$matches[2];

Bossa/PhpSpec/Expect/Wrapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use PhpSpec\Formatter\Presenter\Presenter;
99
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
1010
use PhpSpec\Loader\Node\ExampleNode;
11-
11+
use PhpSpec\Wrapper\Subject as BaseSubject;
1212
use PhpSpec\Wrapper\Subject\WrappedObject;
1313
use PhpSpec\Wrapper\Subject\Caller;
1414
use PhpSpec\Wrapper\Subject\SubjectWithArrayAccess;
@@ -33,7 +33,7 @@ public function __construct(MatcherManager $matchers, Presenter $presenter,
3333
$this->accessInspector = $accessInspector;
3434
}
3535

36-
public function wrap($value = null)
36+
public function wrap($value = null): BaseSubject
3737
{
3838
$exceptionFactory = new ExceptionFactory($this->presenter);
3939
$wrappedObject = new WrappedObject($value, $this->presenter);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
},
1818
"require": {
19-
"phpspec/phpspec": "~3.2 <3.5.0"
19+
"phpspec/phpspec": "^4.0"
2020
},
2121
"require-dev": {
2222
"phpunit/phpunit": "^5.6|^6.0"

0 commit comments

Comments
 (0)