From 94fd8c2ae93a62cdc36782c223dbc6ead7f54839 Mon Sep 17 00:00:00 2001 From: Vance Lucas Date: Fri, 20 May 2016 23:38:40 -0500 Subject: [PATCH] Update DBAL and PHPUnit; Query method passthrough --- composer.json | 4 ++-- lib/Query.php | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 4a79ecd..da397d7 100644 --- a/composer.json +++ b/composer.json @@ -15,11 +15,11 @@ "require": { "php": ">=5.4.0", "vlucas/valitron": "~1.1", - "doctrine/dbal": "~2.4", + "doctrine/dbal": "2.5.4", "sabre/event": "~2.0" }, "require-dev": { - "phpunit/phpunit": "^4.7" + "phpunit/phpunit": "^4.8" }, "autoload": { "psr-4": { diff --git a/lib/Query.php b/lib/Query.php index 769de94..7fbfbdd 100644 --- a/lib/Query.php +++ b/lib/Query.php @@ -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");