Skip to content

Commit

Permalink
Update DBAL and PHPUnit; Query method passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
vlucas committed May 21, 2016
1 parent 0b2d384 commit 94fd8c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"require": {
"php": ">=5.4.0",
"vlucas/valitron": "~1.1",
"doctrine/dbal": "~2.4",
"doctrine/dbal": "2.5.4",

This comment has been minimized.

Copy link
@tuupola

tuupola May 21, 2016

Contributor

This locks to specific version. Is it intentional? Maybe the constraint should be ^2.5.4 or ^2.5.

This comment has been minimized.

Copy link
@vlucas

vlucas May 23, 2016

Author Collaborator

Yes, it is intentional for now. I will update it periodically after confirming any new versions or changes work with Spot.

"sabre/event": "~2.0"
},
"require-dev": {
"phpunit/phpunit": "^4.7"
"phpunit/phpunit": "^4.8"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 2 additions & 6 deletions lib/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -799,12 +799,8 @@ public function __call($method, $args)

// Methods on Collection
} elseif (method_exists('\\Spot\\Entity\\Collection', $method)) {
if(isset($args[0])){
return $this->execute()->$method($args[0]);
} else {
return $this->execute()->$method();
}

return call_user_func_array($method, $args);

// Error
} else {
throw new \BadMethodCallException("Method '" . __CLASS__ . "::" . $method . "' not found");
Expand Down

0 comments on commit 94fd8c2

Please sign in to comment.