From e9bf1914fcdff5796594aa67e79e9a3f1f641c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simonas=20=C5=A0erlinskas?= <simonas.serlinskas@nfq.com> Date: Tue, 30 Jun 2015 09:53:14 +0300 Subject: [PATCH] removed elasticsearch client dependency, added tests autoload to dev env --- composer.json | 10 ++++++---- src/DslTypeAwareTrait.php | 6 ++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 5d6639a..f68b6d8 100644 --- a/composer.json +++ b/composer.json @@ -12,18 +12,20 @@ ], "require": { "php": ">=5.4", - "symfony/serializer": "~2.7", - "elasticsearch/elasticsearch": "~1.0" + "symfony/serializer": "~2.7" }, "require-dev": { - "mikey179/vfsStream": "~1.4", "phpunit/phpunit": "~4.4", "squizlabs/php_codesniffer": "~2.0", "ongr/ongr-strict-standard": "~2.0" }, "autoload": { "psr-4": { - "ONGR\\ElasticsearchDSL\\": "src/", + "ONGR\\ElasticsearchDSL\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { "ONGR\\ElasticsearchDSL\\Tests\\": "tests/" } } diff --git a/src/DslTypeAwareTrait.php b/src/DslTypeAwareTrait.php index 122144e..2bfc282 100644 --- a/src/DslTypeAwareTrait.php +++ b/src/DslTypeAwareTrait.php @@ -11,8 +11,6 @@ namespace ONGR\ElasticsearchDSL; -use Elasticsearch\Common\Exceptions\InvalidArgumentException; - /** * A trait which handles dsl type. */ @@ -38,12 +36,12 @@ trait DslTypeAwareTrait * * @param string $dslType * - * @throws InvalidArgumentException + * @throws \InvalidArgumentException */ public function setDslType($dslType) { if ($dslType !== 'filter' && $dslType !== 'query') { - throw new InvalidArgumentException('Not supported dsl type'); + throw new \InvalidArgumentException('Not supported dsl type'); } $this->dslType = $dslType; } -- GitLab