From 83c92efdbb7112a42892fe660ce95911bf54ee5e Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 11:39:17 +0530 Subject: [PATCH 01/35] BugFix: Exception not thrown when limit is set to 0 --- src/RequestParser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RequestParser.php b/src/RequestParser.php index 833dacc..4bf861c 100644 --- a/src/RequestParser.php +++ b/src/RequestParser.php @@ -211,7 +211,8 @@ public function getAttributes() */ protected function parseRequest() { - if (request()->limit) { + + if ( isset(request()->limit) ) { if (request()->limit <= 0) { throw new InvalidPerPageLimitException; } From a39971ae6e47940a38a76f94ff3302f8e55a4f76 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 12:05:21 +0530 Subject: [PATCH 02/35] BugFix: Handle Invalid Offset Exception --- src/Exceptions/ErrorCodes.php | 1 + src/Exceptions/Parse/InvalidOffsetException.php | 17 +++++++++++++++++ src/RequestParser.php | 7 +++++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/Exceptions/Parse/InvalidOffsetException.php diff --git a/src/Exceptions/ErrorCodes.php b/src/Exceptions/ErrorCodes.php index 17a4b6c..edccd8e 100644 --- a/src/Exceptions/ErrorCodes.php +++ b/src/Exceptions/ErrorCodes.php @@ -18,5 +18,6 @@ class ErrorCodes const ORDERING_INVALID = 1005; const MAX_LIMIT = 1006; const INVALID_LIMIT = 1007; + const INVALID_OFFSET = 1008; const RELATED_RESOURCE_NOT_EXISTS = 1010; } diff --git a/src/Exceptions/Parse/InvalidOffsetException.php b/src/Exceptions/Parse/InvalidOffsetException.php new file mode 100644 index 0000000..381822b --- /dev/null +++ b/src/Exceptions/Parse/InvalidOffsetException.php @@ -0,0 +1,17 @@ +limit) ) { if (request()->limit <= 0) { throw new InvalidPerPageLimitException; @@ -221,7 +221,10 @@ protected function parseRequest() $this->limit = config('api.perPage'); } - if (request()->offset) { + if ( isset(request()->offset) ) { + if(request()->offset < 0 ) { + throw new InvalidOffsetException; + } $this->offset = request()->offset; } else { $this->offset = 0; From 3db9408ce8efb822ab7d0a6f281302259c8aa5c3 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 12:05:52 +0530 Subject: [PATCH 03/35] Transfer Exception Handling Duties to Illuminate's Handler --- src/Handlers/ExceptionHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handlers/ExceptionHandler.php b/src/Handlers/ExceptionHandler.php index 751d364..774e37c 100644 --- a/src/Handlers/ExceptionHandler.php +++ b/src/Handlers/ExceptionHandler.php @@ -2,7 +2,7 @@ namespace Asahasrabuddhe\LaravelAPI\Handlers; -use App\Exceptions\Handler; +use Illuminate\Foundation\Exceptions\Handler; use Illuminate\Database\QueryException; use Illuminate\Http\Exception\HttpResponseException; use Asahasrabuddhe\LaravelAPI\BaseResponse as Response; From 5c2806271ada4f2f86435d5a381cf0ba250d2745 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 12:06:27 +0530 Subject: [PATCH 04/35] Setup the testing world --- tests/Http/Resources/AddressResource.php | 27 +++++ tests/Http/Resources/PostResource.php | 23 ++++ tests/Http/Resources/UserCollection.php | 20 ++++ tests/Http/Resources/UserResource.php | 24 ++++ tests/Models/Address.php | 38 +++++++ tests/Models/Post.php | 16 +++ tests/Models/User.php | 41 +++++++ tests/TestCase.php | 136 +++++++++++++++++++++++ 8 files changed, 325 insertions(+) create mode 100644 tests/Http/Resources/AddressResource.php create mode 100644 tests/Http/Resources/PostResource.php create mode 100644 tests/Http/Resources/UserCollection.php create mode 100644 tests/Http/Resources/UserResource.php create mode 100644 tests/Models/Address.php create mode 100644 tests/Models/Post.php create mode 100644 tests/Models/User.php create mode 100644 tests/TestCase.php diff --git a/tests/Http/Resources/AddressResource.php b/tests/Http/Resources/AddressResource.php new file mode 100644 index 0000000..413c353 --- /dev/null +++ b/tests/Http/Resources/AddressResource.php @@ -0,0 +1,27 @@ + $this->line_1, + 'line_2' => $this->line_2, + 'city' => $this->city, + 'state' => $this->state, + 'country' => $this->country, + 'zip_code' => $this->zip_code + ]; + } +} diff --git a/tests/Http/Resources/PostResource.php b/tests/Http/Resources/PostResource.php new file mode 100644 index 0000000..959cd35 --- /dev/null +++ b/tests/Http/Resources/PostResource.php @@ -0,0 +1,23 @@ + $this->title, + 'content' => $this->content + ]; + } +} diff --git a/tests/Http/Resources/UserCollection.php b/tests/Http/Resources/UserCollection.php new file mode 100644 index 0000000..9a42fe8 --- /dev/null +++ b/tests/Http/Resources/UserCollection.php @@ -0,0 +1,20 @@ +collection; + } +} diff --git a/tests/Http/Resources/UserResource.php b/tests/Http/Resources/UserResource.php new file mode 100644 index 0000000..dd8bac5 --- /dev/null +++ b/tests/Http/Resources/UserResource.php @@ -0,0 +1,24 @@ + $this->id, + 'email' => $this->email, + 'name' => $this->name + ]; + } +} diff --git a/tests/Models/Address.php b/tests/Models/Address.php new file mode 100644 index 0000000..9e57125 --- /dev/null +++ b/tests/Models/Address.php @@ -0,0 +1,38 @@ +belongsTo('App\User'); + } +} diff --git a/tests/Models/Post.php b/tests/Models/Post.php new file mode 100644 index 0000000..9c524da --- /dev/null +++ b/tests/Models/Post.php @@ -0,0 +1,16 @@ +belongsTo('App\User'); + } +} diff --git a/tests/Models/User.php b/tests/Models/User.php new file mode 100644 index 0000000..e280cc1 --- /dev/null +++ b/tests/Models/User.php @@ -0,0 +1,41 @@ +hasMany('App\Address'); + } + + public function posts() { + return $this->hasMany('App\Post'); + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..80ea573 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,136 @@ + 'Asaharabuddhe\LaravelAPI\Facades\ApiRoute' + ]; + } + + /** + * Setup the test environment. + */ + protected function setUp() + { + parent::setUp(); + + $this->artisan('migrate', [ + '--database' => 'testbench', + '--path' => './database/migrations' + ]); + + $this->migrateDatabase(); + + $this->seedDatabase(); + } + + /** + * Define environment setup. + * + * @param \Illuminate\Foundation\Application $app + * @return void + */ + protected function getEnvironmentSetUp($app) + { + // Setup default database to use sqlite :memory: + $app['config']->set('database.default', 'testbench'); + $app['config']->set('database.connections.testbench', [ + 'driver' => 'sqlite', + 'database' => ':memory:', + 'prefix' => '', + ]); + $app['config']->set('api.perPage', 10); + } + + protected function migrateDatabase() + { + /** @var \Illuminate\Database\Schema\Builder $schemaBuilder */ + $schemaBuilder = $this->app['db']->connection()->getSchemaBuilder(); + $schemaBuilder->create('users', function (Blueprint $table) { + $table->increments('id'); + $table->string('name'); + $table->string('email')->unique(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + + $schemaBuilder->create('password_resets', function (Blueprint $table) { + $table->string('email')->index(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); + + $schemaBuilder->create('addresses', function (Blueprint $table) { + $table->increments('id'); + $table->text('line_1'); + $table->text('line_2'); + $table->string('city'); + $table->string('state'); + $table->string('country'); + $table->string('zip_code'); + $table->integer('user_id')->unsigned(); + $table->foreign('user_id')->references('id')->on('users'); + $table->timestamps(); + }); + + $schemaBuilder->create('posts', function (Blueprint $table) { + $table->increments('id'); + $table->string('title'); + $table->text('content'); + $table->integer('user_id')->unsigned(); + $table->foreign('user_id')->references('id')->on('users'); + $table->timestamps(); + }); + } + + protected function seedDatabase() + { + $faker = \Faker\Factory::create(); + for($i = 1; $i <= 50; $i++) { + User::create([ + 'name' => $faker->name, + 'email' => $faker->unique()->safeEmail, + 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret + 'remember_token' => str_random(10), + ]); + } + + for($i = 1; $i <= 100; $i++) { + Address::create([ + 'line_1' => $faker->streetAddress, + 'line_2' => $faker->secondaryAddress, + 'city' => $faker->city, + 'state' => $faker->state, + 'country' => $faker->country, + 'zip_code' => $faker->postcode, + 'user_id' => $faker->numberBetween(1, 50) + ]); + } + + for($i = 1; $i <= 200; $i++) { + Post::create([ + 'title' => $faker->realText($maxNbChars = 200, $indexSize = 2), + 'content' => $faker->text($maxNbChars = 200), + 'user_id' => $faker->numberBetween(1, 50) + ]); + } + } +} From be9b526584dae30cb61f405bb166d8125ebcc938 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 12:06:53 +0530 Subject: [PATCH 05/35] Testing: Start with Request Parser --- .travis.yml | 17 ++++++ composer.json | 8 +++ phpunit.xml | 34 ++++++++++++ tests/RequestParserTest.php | 105 ++++++++++++++++++++++++++++++++++++ 4 files changed, 164 insertions(+) create mode 100644 .travis.yml create mode 100644 phpunit.xml create mode 100644 tests/RequestParserTest.php diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..baa2c95 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: php +install: + composer install +php: + - 7.0 + - 7.1 + - 7.2 + +script: + - mkdir -p build/logs + - php vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml + +after_success: + - bash <(curl -s https://codecov.io/bash) + +after_script: + - php vendor/bin/coveralls -v \ No newline at end of file diff --git a/composer.json b/composer.json index be8f007..f37c072 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,11 @@ "Asahasrabuddhe\\LaravelAPI\\": "src/" } }, + "autoload-dev": { + "psr-4": { + "Asahasrabuddhe\\LaravelAPI\\Tests\\": "tests/" + } + }, "extra": { "laravel": { "providers": [ @@ -22,5 +27,8 @@ "ApiRoute": "Asahasrabuddhe\\LaravelAPI\\Facades\\ApiRoute" } } + }, + "require-dev": { + "orchestra/testbench": "~3.6" } } diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..bb6de38 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,34 @@ + + + + + + ./tests/ + + + + + + src/ + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/RequestParserTest.php b/tests/RequestParserTest.php new file mode 100644 index 0000000..62fbfa7 --- /dev/null +++ b/tests/RequestParserTest.php @@ -0,0 +1,105 @@ +merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getLimit(), 15); + } + + /** @test */ + public function parses_limit_from_configuration() + { + $_GET['limit'] = null; + $_GET['offset'] = null; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getLimit(), 10); + } + + /** @test */ + public function throws_exception_for_negative_limit() + { + $this->expectException(InvalidPerPageLimitException::class); + + $_GET['limit'] = -10; + $_GET['offset'] = null; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + } + + /** @test */ + public function throws_exception_for_zero_limit() + { + $this->expectException(InvalidPerPageLimitException::class); + + $_GET['limit'] = 0; + $_GET['offset'] = null; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + } + + /** @test */ + public function parses_offset_from_request() + { + $_GET['limit'] = null; + $_GET['offset'] = 10; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getOffset(), 10); + } + + /** @test */ + public function parses_default_offset() + { + $_GET['limit'] = null; + $_GET['offset'] = null; + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getOffset(), 0); + } + + /** @test */ + public function throws_exception_for_negative_offset() + { + $this->expectException(InvalidOffsetException::class); + + $_GET['limit'] = null; + $_GET['offset'] = -10; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + } +} \ No newline at end of file From 847a92a0271fe155f71d3df307478ae2dcd85cc2 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 12:08:19 +0530 Subject: [PATCH 06/35] Update CodeCov Token --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index baa2c95..ccd9c02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ script: - php vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml after_success: - - bash <(curl -s https://codecov.io/bash) + - bash <(curl -s https://codecov.io/bash) -t 03ae5c0f-95ef-4671-a35b-0a9cea99f56c after_script: - php vendor/bin/coveralls -v \ No newline at end of file From 649bbe3ec1f689e75bdc5f069328bd7d73b844af Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 12:09:13 +0530 Subject: [PATCH 07/35] Remove PHP7.0 Support --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ccd9c02..82e3025 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: php install: composer install php: - - 7.0 - 7.1 - 7.2 From 4b141608d9376518a5175c2baeb0596de41dd2b8 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 12:17:45 +0530 Subject: [PATCH 08/35] Coveralls Support Added --- .coveralls.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..9160059 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +service_name: travis-ci From d7a6ed48849cb1ba47fb0b500aee0d258a89ba04 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 13:31:55 +0530 Subject: [PATCH 09/35] BugFix - Throw exception for unknown fields --- src/RequestParser.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/RequestParser.php b/src/RequestParser.php index 3f573c0..554591d 100644 --- a/src/RequestParser.php +++ b/src/RequestParser.php @@ -11,6 +11,8 @@ use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidFilterDefinitionException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOrderingDefinitionException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOffsetException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\UnknownFieldException; +use Illuminate\Support\Facades\Schema; class RequestParser { @@ -404,7 +406,6 @@ private function parseFields($fields) preg_match_all(static::FIELD_PARTS_REGEX, $match, $parts); $fieldName = $parts[1][0]; if (Str::contains($fieldName, ':') || call_user_func($this->model . '::relationExists', $fieldName)) { - // If field name has a colon, we assume its a relations // OR // If method with field name exists in the class, we assume its a relation @@ -499,9 +500,13 @@ private function parseFields($fields) $this->fields[] = $keyField; } } - } else { - // Else, its a normal field - $this->fields[] = $fieldName; + } else { // Else, its a normal field + // Check if the field actually exists otherwise, throw exception + if( Schema::hasColumn((new $this->model())->getTable(), $fieldName) ) { + $this->fields[] = $fieldName; + } else { + throw new UnknownFieldException; + } } } } From 5a1f9724d328e5609a53147edfc0d18b5b722d00 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 13:32:15 +0530 Subject: [PATCH 10/35] Update Relationship Namespace --- tests/Models/Address.php | 2 +- tests/Models/Post.php | 2 +- tests/Models/User.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Models/Address.php b/tests/Models/Address.php index 9e57125..caaae6b 100644 --- a/tests/Models/Address.php +++ b/tests/Models/Address.php @@ -33,6 +33,6 @@ class Address extends BaseModel public function user() { - return $this->belongsTo('App\User'); + return $this->belongsTo('Asahasrabuddhe\LaravelAPI\Tests\Models\User'); } } diff --git a/tests/Models/Post.php b/tests/Models/Post.php index 9c524da..a2365dc 100644 --- a/tests/Models/Post.php +++ b/tests/Models/Post.php @@ -11,6 +11,6 @@ class Post extends BaseModel public function user() { - return $this->belongsTo('App\User'); + return $this->belongsTo('Asahasrabuddhe\LaravelAPI\Tests\Models\User'); } } diff --git a/tests/Models/User.php b/tests/Models/User.php index e280cc1..076fc4c 100644 --- a/tests/Models/User.php +++ b/tests/Models/User.php @@ -29,13 +29,13 @@ class User extends BaseUser 'name' ]; - protected $resource = UserResource::class; + // protected $resource = UserResource::class; public function address() { - return $this->hasMany('App\Address'); + return $this->hasMany('Asahasrabuddhe\LaravelAPI\Tests\Models\Address'); } public function posts() { - return $this->hasMany('App\Post'); + return $this->hasMany('Asahasrabuddhe\LaravelAPI\Tests\Models\Post'); } } From bef726d4edd4285e0ef4d39271a09e6757e9b45c Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 13:33:10 +0530 Subject: [PATCH 11/35] Add Coveralls Dependency to DEV --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f37c072..ca1738e 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,6 @@ "email": "ajitem.s@outlook.com" } ], - "require": {}, "autoload": { "psr-4": { "Asahasrabuddhe\\LaravelAPI\\": "src/" @@ -29,6 +28,7 @@ } }, "require-dev": { - "orchestra/testbench": "~3.6" + "orchestra/testbench": "~3.6", + "php-coveralls/php-coveralls": "^2.0" } } From a3d23da8da2d86c00aaf0f7e238f8de674829671 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 14:10:49 +0530 Subject: [PATCH 12/35] BugFix - Throw Invalid Ordering Definition Exception --- src/Exceptions/ErrorCodes.php | 1 + .../Parse/InvalidOrderingDefinitionException.php | 15 +++++++++++++++ src/RequestParser.php | 6 +++--- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 src/Exceptions/Parse/InvalidOrderingDefinitionException.php diff --git a/src/Exceptions/ErrorCodes.php b/src/Exceptions/ErrorCodes.php index edccd8e..aa73a8a 100644 --- a/src/Exceptions/ErrorCodes.php +++ b/src/Exceptions/ErrorCodes.php @@ -19,5 +19,6 @@ class ErrorCodes const MAX_LIMIT = 1006; const INVALID_LIMIT = 1007; const INVALID_OFFSET = 1008; + const ORDERING_INVALID_DEFINITION = 1009; const RELATED_RESOURCE_NOT_EXISTS = 1010; } diff --git a/src/Exceptions/Parse/InvalidOrderingDefinitionException.php b/src/Exceptions/Parse/InvalidOrderingDefinitionException.php new file mode 100644 index 0000000..e1b7c29 --- /dev/null +++ b/src/Exceptions/Parse/InvalidOrderingDefinitionException.php @@ -0,0 +1,15 @@ + '; case 'gt': return' > '; case 'ge': @@ -362,7 +362,7 @@ protected function extractOrdering() ], $order); $this->order = $order; } else { - throw new InvalidOrderingDefinitionException(); + throw new InvalidOrderingDefinitionException; } } } From 1d8f97385976c422952455810de44ca275e263f2 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 14:20:31 +0530 Subject: [PATCH 13/35] Added Test for Request Parser Class --- composer.lock | 4028 +++++++++++++++++++++++++++++++++++ src/RequestParser.php | 4 +- tests/Models/User.php | 4 + tests/RequestParserTest.php | 242 ++- 4 files changed, 4263 insertions(+), 15 deletions(-) create mode 100644 composer.lock diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..1d4832c --- /dev/null +++ b/composer.lock @@ -0,0 +1,4028 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "e0d6b68303ad656e053301ed1832e820", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22T15:46:56+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2017-03-20T17:10:46+00:00" + }, + { + "name": "php-coveralls/php-coveralls", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3eaf7eb689cdf6b86801a3843940d974dc657068", + "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.0", + "php": "^5.5 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", + "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/php-coveralls" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCoveralls\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp", + "role": "Original creator" + }, + { + "name": "Takashi Matsuo", + "email": "tmatsuo@google.com" + }, + { + "name": "Google Inc" + }, + { + "name": "Dariusz Ruminski", + "email": "dariusz.ruminski@gmail.com", + "homepage": "https://github.com/keradus" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2017-12-08T14:28:16+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "symfony/config", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/7c19370ab04e9ac05b74a504198e165f5ccf6dd8", + "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/filesystem": "~3.4|~4.0" + }, + "conflict": { + "symfony/finder": "<3.4" + }, + "require-dev": { + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2018-03-19T22:35:49+00:00" + }, + { + "name": "symfony/console", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", + "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-04-03T05:24:00+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", + "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2018-02-22T10:50:29+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-01-30T19:27:44+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6795ffa2f8eebedac77f045aa62c0c10b2763042", + "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2018-02-19T16:50:22+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/8b34ebb5989df61cbd77eff29a02c4db9ac1069c", + "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-04-03T05:24:00+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/inflector", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2018-01-09T20:05:19+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-07-22T11:58:36+00:00" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "3f00985deec8df53d4cc1e5c33619bda1ee309a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/3f00985deec8df53d4cc1e5c33619bda1ee309a5", + "reference": "3f00985deec8df53d4cc1e5c33619bda1ee309a5", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "time": "2018-04-06T15:51:55+00:00" + }, + { + "name": "egulias/email-validator", + "version": "2.1.4", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "8790f594151ca6a2010c6218e09d96df67173ad3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/8790f594151ca6a2010c6218e09d96df67173ad3", + "reference": "8790f594151ca6a2010c6218e09d96df67173ad3", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.0.1", + "php": ">= 5.5" + }, + "require-dev": { + "dominicsayers/isemail": "dev-master", + "phpunit/phpunit": "^4.8.35||^5.7||^6.0", + "satooshi/php-coveralls": "^1.0.1" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "EmailValidator" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "time": "2018-04-10T10:11:19+00:00" + }, + { + "name": "erusev/parsedown", + "version": "1.7.1", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", + "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2018-03-08T01:11:30+00:00" + }, + { + "name": "fzaninotto/faker", + "version": "v1.7.1", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", + "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "ext-intl": "*", + "phpunit/phpunit": "^4.0 || ^5.0", + "squizlabs/php_codesniffer": "^1.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2017-08-15T16:48:10+00:00" + }, + { + "name": "laravel/framework", + "version": "v5.6.17", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "0f787c763ae8fb9fae0c8c809830ba4fa81e2d9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/0f787c763ae8fb9fae0c8c809830ba4fa81e2d9d", + "reference": "0f787c763ae8fb9fae0c8c809830ba4fa81e2d9d", + "shasum": "" + }, + "require": { + "doctrine/inflector": "~1.1", + "dragonmantank/cron-expression": "~2.0", + "erusev/parsedown": "~1.7", + "ext-mbstring": "*", + "ext-openssl": "*", + "league/flysystem": "^1.0.8", + "monolog/monolog": "~1.12", + "nesbot/carbon": "1.25.*", + "php": "^7.1.3", + "psr/container": "~1.0", + "psr/simple-cache": "^1.0", + "ramsey/uuid": "^3.7", + "swiftmailer/swiftmailer": "~6.0", + "symfony/console": "~4.0", + "symfony/debug": "~4.0", + "symfony/finder": "~4.0", + "symfony/http-foundation": "~4.0", + "symfony/http-kernel": "~4.0", + "symfony/process": "~4.0", + "symfony/routing": "~4.0", + "symfony/var-dumper": "~4.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.1", + "vlucas/phpdotenv": "~2.2" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "~3.0", + "doctrine/dbal": "~2.6", + "filp/whoops": "^2.1.4", + "league/flysystem-cached-adapter": "~1.0", + "mockery/mockery": "~1.0", + "moontoast/math": "^1.1", + "orchestra/testbench-core": "3.6.*", + "pda/pheanstalk": "~3.0", + "phpunit/phpunit": "~7.0", + "predis/predis": "^1.1.1", + "symfony/css-selector": "~4.0", + "symfony/dom-crawler": "~4.0" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.6).", + "ext-pcntl": "Required to use all features of the queue worker.", + "ext-posix": "Required to use all features of the queue worker.", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", + "laravel/tinker": "Required to use the tinker console command (~1.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0).", + "nexmo/client": "Required to use the Nexmo transport (~1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", + "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~3.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (~4.0).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~4.0).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "files": [ + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "time": "2018-04-17T12:51:04+00:00" + }, + { + "name": "league/flysystem", + "version": "1.0.44", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "168dbe519737221dc87d17385cde33073881fd02" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/168dbe519737221dc87d17385cde33073881fd02", + "reference": "168dbe519737221dc87d17385cde33073881fd02", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "ext-fileinfo": "*", + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2018-04-06T09:58:14+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.23.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4", + "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2017-06-19T01:22:40+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-10-19T19:58:43+00:00" + }, + { + "name": "nesbot/carbon", + "version": "1.25.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "cbcf13da0b531767e39eb86e9687f5deba9857b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cbcf13da0b531767e39eb86e9687f5deba9857b4", + "reference": "cbcf13da0b531767e39eb86e9687f5deba9857b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "^4.8.35 || ^5.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.23-dev" + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2018-03-19T15:50:49+00:00" + }, + { + "name": "orchestra/testbench", + "version": "v3.6.4", + "source": { + "type": "git", + "url": "https://github.com/orchestral/testbench.git", + "reference": "242cc47d2e5d86ababe36d22519e2b948eff8f73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/242cc47d2e5d86ababe36d22519e2b948eff8f73", + "reference": "242cc47d2e5d86ababe36d22519e2b948eff8f73", + "shasum": "" + }, + "require": { + "laravel/framework": "~5.6.13", + "orchestra/testbench-core": "~3.6.5", + "php": ">=7.1", + "phpunit/phpunit": "~7.0" + }, + "require-dev": { + "mockery/mockery": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.6-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com", + "homepage": "https://github.com/crynobone" + } + ], + "description": "Laravel Testing Helper for Packages Development", + "homepage": "http://orchestraplatform.com/docs/latest/components/testbench/", + "keywords": [ + "BDD", + "TDD", + "laravel", + "orchestra-platform", + "orchestral", + "testing" + ], + "time": "2018-03-27T09:27:00+00:00" + }, + { + "name": "orchestra/testbench-core", + "version": "v3.6.5", + "source": { + "type": "git", + "url": "https://github.com/orchestral/testbench-core.git", + "reference": "d089f0fd32a81764fbd98044148a193db828dd52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/d089f0fd32a81764fbd98044148a193db828dd52", + "reference": "d089f0fd32a81764fbd98044148a193db828dd52", + "shasum": "" + }, + "require": { + "fzaninotto/faker": "~1.4", + "php": ">=7.1" + }, + "require-dev": { + "laravel/framework": "~5.6.13", + "mockery/mockery": "~1.0", + "phpunit/phpunit": "~7.0" + }, + "suggest": { + "laravel/framework": "Required for testing (~5.6.13).", + "mockery/mockery": "Allow to use Mockery for testing (~1.0).", + "orchestra/testbench-browser-kit": "Allow to use legacy Laravel BrowserKit for testing (~3.6).", + "orchestra/testbench-dusk": "Allow to use Laravel Dusk for testing (~3.6).", + "phpunit/phpunit": "Allow to use PHPUnit for testing (~7.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Orchestra\\Testbench\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com", + "homepage": "https://github.com/crynobone" + } + ], + "description": "Testing Helper for Laravel Development", + "homepage": "http://orchestraplatform.com/docs/latest/components/testbench/", + "keywords": [ + "BDD", + "TDD", + "laravel", + "orchestra-platform", + "orchestral", + "testing" + ], + "time": "2018-03-27T08:00:28+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.12", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb", + "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2018-04-04T21:24:14+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.7.6", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-04-18T13:57:24+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "6.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/774a82c0c5da4c1c7701790c262035d235ab7856", + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.1", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.1", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "suggest": { + "ext-xdebug": "^2.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2018-04-06T15:39:20+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2018-02-01T13:07:23+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2018-02-01T13:16:43+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "7.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6d51299e307dc510149e0b7cd1931dd11770e1cb", + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.1", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^6.0.1", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.0", + "phpunit/phpunit-mock-objects": "^6.1.1", + "sebastian/comparator": "^2.1 || ^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2018-04-18T13:41:53+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "6.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.5", + "php": "^7.1", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2018-04-11T04:50:36+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "ramsey/uuid", + "version": "3.7.3", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/44abcdad877d9a46685a3a4d221e3b2c4b87cb76", + "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "^1.0|^2.0", + "php": "^5.4 || ^7.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "codeception/aspect-mock": "^1.0 | ~2.0.0", + "doctrine/annotations": "~1.2.0", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", + "ircmaxell/random-lib": "^1.1", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "mockery/mockery": "^0.9.9", + "moontoast/math": "^1.1", + "php-mock/php-mock-phpunit": "^0.3|^1.1", + "phpunit/phpunit": "^4.7|^5.0", + "squizlabs/php_codesniffer": "^2.3" + }, + "suggest": { + "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", + "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", + "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Thibaud Fabre", + "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "homepage": "https://github.com/ramsey/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "time": "2018-01-20T00:28:24+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "shasum": "" + }, + "require": { + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-04-18T13:33:00+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2018-02-01T13:45:15+00:00" + }, + { + "name": "sebastian/environment", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2017-07-01T08:51:00+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2017-04-03T13:19:02+00:00" + }, + { + "name": "sebastian/global-state", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v6.0.2", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/412333372fb6c8ffb65496a2bbd7321af75733fc", + "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc", + "shasum": "" + }, + "require": { + "egulias/email-validator": "~2.0", + "php": ">=7.0.0" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.3@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.0-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.symfony.com", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2017-09-30T22:39:41+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "03f965583147957f1ecbad7ea1c9d6fd5e525ec2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/03f965583147957f1ecbad7ea1c9d6fd5e525ec2", + "reference": "03f965583147957f1ecbad7ea1c9d6fd5e525ec2", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2018-03-19T22:35:49+00:00" + }, + { + "name": "symfony/debug", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "5961d02d48828671f5d8a7805e06579d692f6ede" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/5961d02d48828671f5d8a7805e06579d692f6ede", + "reference": "5961d02d48828671f5d8a7805e06579d692f6ede", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": "<3.4" + }, + "require-dev": { + "symfony/http-kernel": "~3.4|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2018-04-03T05:24:00+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "63353a71073faf08f62caab4e6889b06a787f07b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/63353a71073faf08f62caab4e6889b06a787f07b", + "reference": "63353a71073faf08f62caab4e6889b06a787f07b", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-04-06T07:35:43+00:00" + }, + { + "name": "symfony/finder", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2018-04-04T05:10:37+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "d0864a82e5891ab61d31eecbaa48bed5a09b8e6c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d0864a82e5891ab61d31eecbaa48bed5a09b8e6c", + "reference": "d0864a82e5891ab61d31eecbaa48bed5a09b8e6c", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~3.4|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2018-04-03T05:24:00+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "6dd620d96d64456075536ffe3c6c4658dd689021" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6dd620d96d64456075536ffe3c6c4658dd689021", + "reference": "6dd620d96d64456075536ffe3c6c4658dd689021", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/log": "~1.0", + "symfony/debug": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/http-foundation": "~3.4.4|~4.0.4" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4.5|<4.0.5,>=4", + "symfony/var-dumper": "<3.4", + "twig/twig": "<1.34|<2.4,>=2" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/cache": "~1.0", + "symfony/browser-kit": "~3.4|~4.0", + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/css-selector": "~3.4|~4.0", + "symfony/dependency-injection": "^3.4.5|^4.0.5", + "symfony/dom-crawler": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0", + "symfony/templating": "~3.4|~4.0", + "symfony/translation": "~3.4|~4.0", + "symfony/var-dumper": "~3.4|~4.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpKernel Component", + "homepage": "https://symfony.com", + "time": "2018-04-06T16:25:03+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "8eca20c8a369e069d4f4c2ac9895144112867422" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/8eca20c8a369e069d4f4c2ac9895144112867422", + "reference": "8eca20c8a369e069d4f4c2ac9895144112867422", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-01-31T17:43:24+00:00" + }, + { + "name": "symfony/process", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25", + "reference": "d7dc1ee5dfe9f732cb1bba7310f5b99f2b7a6d25", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2018-04-03T05:24:00+00:00" + }, + { + "name": "symfony/routing", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "0663036dd57dbfd4e9ff29f75bbd5dd3253ebe71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/0663036dd57dbfd4e9ff29f75bbd5dd3253ebe71", + "reference": "0663036dd57dbfd4e9ff29f75bbd5dd3253ebe71", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2018-04-04T13:50:32+00:00" + }, + { + "name": "symfony/translation", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/e20a9b7f9f62cb33a11638b345c248e7d510c938", + "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2018-02-22T10:50:29+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "e1b4d008100f4d203cc38b0d793ad6252d8d8af0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e1b4d008100f4d203cc38b0d793ad6252d8d8af0", + "reference": "e1b4d008100f4d203cc38b0d793ad6252d8d8af0", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "require-dev": { + "ext-iconv": "*", + "twig/twig": "~1.34|~2.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2018-04-04T05:10:37+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", + "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "time": "2017-11-27T11:13:29+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", + "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause-Attribution" + ], + "authors": [ + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "http://www.vancelucas.com" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "time": "2016-09-01T10:05:43+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-01-29T19:49:41+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/src/RequestParser.php b/src/RequestParser.php index 6efa8da..09e98a0 100644 --- a/src/RequestParser.php +++ b/src/RequestParser.php @@ -35,12 +35,12 @@ class RequestParser /** * Checks if ordering is specified correctly. */ - const ORDER_FILTER = '/[\\s]*([\\w\\.]+)(?:[\\s](?!,))*(asc|desc|)/i'; + const ORDER_FILTER = '/[\\s]*([\\w\\.]+)(?:[\\s](?!,))*(asc|desc)/i'; /** * Extract order parts for relational field. */ - const RELATION_ORDER_REGEX = '/[\\s]*([\\w]+)\\.([\\w]+)(?:[\\s](?!,))*(asc|desc|)/'; + const RELATION_ORDER_REGEX = '/[\\s]*([\\w]+)\\.([\\w]+)(?:[\\s](?!,))*(asc|desc)/'; // /** // * Extract order parts for regular field diff --git a/tests/Models/User.php b/tests/Models/User.php index 076fc4c..6f3793e 100644 --- a/tests/Models/User.php +++ b/tests/Models/User.php @@ -31,6 +31,10 @@ class User extends BaseUser // protected $resource = UserResource::class; + protected $filterable = [ + 'id', 'name' + ]; + public function address() { return $this->hasMany('Asahasrabuddhe\LaravelAPI\Tests\Models\Address'); } diff --git a/tests/RequestParserTest.php b/tests/RequestParserTest.php index 62fbfa7..4f593f6 100644 --- a/tests/RequestParserTest.php +++ b/tests/RequestParserTest.php @@ -10,6 +10,10 @@ use Asahasrabuddhe\LaravelAPI\Tests\Models\User; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidPerPageLimitException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOffsetException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\UnknownFieldException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidFilterDefinitionException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\FieldCannotBeFilteredException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOrderingDefinitionException; class RequestParserTest extends TestCase @@ -17,9 +21,9 @@ class RequestParserTest extends TestCase /** @test */ public function parses_limit_from_request() { + $_GET = []; $_GET['limit'] = 15; - $_GET['offset'] = null; - + request()->merge($_GET); $parser = new RequestParser(User::class); @@ -30,8 +34,7 @@ public function parses_limit_from_request() /** @test */ public function parses_limit_from_configuration() { - $_GET['limit'] = null; - $_GET['offset'] = null; + $_GET = []; request()->merge($_GET); @@ -44,9 +47,9 @@ public function parses_limit_from_configuration() public function throws_exception_for_negative_limit() { $this->expectException(InvalidPerPageLimitException::class); - + + $_GET = []; $_GET['limit'] = -10; - $_GET['offset'] = null; request()->merge($_GET); @@ -58,18 +61,18 @@ public function throws_exception_for_zero_limit() { $this->expectException(InvalidPerPageLimitException::class); + $_GET = []; $_GET['limit'] = 0; - $_GET['offset'] = null; request()->merge($_GET); - + $parser = new RequestParser(User::class); } /** @test */ public function parses_offset_from_request() { - $_GET['limit'] = null; + $_GET = []; $_GET['offset'] = 10; request()->merge($_GET); @@ -82,8 +85,7 @@ public function parses_offset_from_request() /** @test */ public function parses_default_offset() { - $_GET['limit'] = null; - $_GET['offset'] = null; + $_GET = []; $parser = new RequestParser(User::class); @@ -94,12 +96,226 @@ public function parses_default_offset() public function throws_exception_for_negative_offset() { $this->expectException(InvalidOffsetException::class); - - $_GET['limit'] = null; + + $_GET = []; $_GET['offset'] = -10; request()->merge($_GET); $parser = new RequestParser(User::class); } + + /** @test */ + public function parses_fields_from_request() + { + $_GET = []; + $_GET['fields'] = 'name,email,address,posts'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFields(), ['name', 'email', 'id']); + + $this->assertArrayHasKey('address', $parser->getRelations()); + $this->assertArrayHasKey('posts', $parser->getRelations()); + } + + /** @test */ + public function throws_exception_for_unknown_field() + { + $this->expectException(UnknownFieldException::class); + + $_GET = []; + $_GET['fields'] = 'phone'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + } + + /** @test */ + public function parses_greater_than_filter_from_request() + { + $_GET = []; + $_GET['filters'] = 'id gt 5'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFilters(), '(`id` > 5)'); + } + + /** @test */ + public function parses_greater_than_equal_to_filter_from_request() + { + $_GET = []; + $_GET['filters'] = 'id ge 5'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFilters(), '(`id` >= 5)'); + } + + /** @test */ + public function parses_lesser_than_filter_from_request() + { + $_GET = []; + $_GET['filters'] = 'id lt 5'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFilters(), '(`id` < 5)'); + } + + /** @test */ + public function parses_less_than_equal_to_filter_from_request() + { + $_GET = []; + $_GET['filters'] = 'id le 5'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFilters(), '(`id` <= 5)'); + } + + /** @test */ + public function parses_equal_to_filter_from_request() + { + $_GET = []; + $_GET['filters'] = 'id eq 5'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFilters(), '(`id` = 5)'); + } + + /** @test */ + public function parses_not_equal_filter_from_request() + { + $_GET = []; + $_GET['filters'] = 'id ne 5'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFilters(), '(`id` <> 5)'); + } + + /** @test */ + public function parses_like_filter_from_request() + { + $_GET = []; + $_GET['filters'] = 'id ne 5'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFilters(), '(`id` <> 5)'); + } + + + /** @test */ + public function parses_is_null_filter_from_request() + { + $_GET = []; + $_GET['filters'] = 'id eq null'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFilters(), '(`id` is null)'); + } + + /** @test */ + public function parses_is_not_null_filter_from_request() + { + $_GET = []; + $_GET['filters'] = 'id ne null'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getFilters(), '(`id` is not null)'); + } + + /** @test */ + public function throws_exception_for_invalid_filtering() + { + $this->expectException(InvalidFilterDefinitionException::class); + + $_GET = []; + $_GET['filters'] = 'id as 5'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + } + + /** @test */ + public function throws_exception_for_fields_that_cannot_be_filtered() + { + $this->expectException(FieldCannotBeFilteredException::class); + + $_GET = []; + $_GET['filters'] = 'email lk "perennial"'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + } + + /** @test */ + public function parse_ascending_ordering_from_request() + { + $_GET = []; + $_GET['order'] = 'id asc'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getOrder(), '`id` asc'); + } + + /** @test */ + public function parse_descending_ordering_from_request() + { + $_GET = []; + $_GET['order'] = 'id desc'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + $this->assertEquals($parser->getOrder(), '`id` desc'); + } + + /** @test */ + public function throws_exception_for_invalid_ordering() + { + $this->expectException(InvalidOrderingDefinitionException::class); + + $_GET = []; + $_GET['order'] = 'id ad'; + + request()->merge($_GET); + + $parser = new RequestParser(User::class); + + dd($parser->getORder()); + } } \ No newline at end of file From 0d1c35c5f00f655dea81556da82a45f76cd47269 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrbauddhe Date: Mon, 30 Apr 2018 08:56:59 +0000 Subject: [PATCH 14/35] Apply fixes from StyleCI --- src/Handlers/ExceptionHandler.php | 2 +- src/RequestParser.php | 14 +++--- tests/Http/Resources/AddressResource.php | 12 ++--- tests/Http/Resources/PostResource.php | 4 +- tests/Http/Resources/UserResource.php | 2 +- tests/Models/Address.php | 3 +- tests/Models/Post.php | 1 - tests/Models/User.php | 10 +++-- tests/RequestParserTest.php | 57 +++++++++++------------- tests/TestCase.php | 47 ++++++++++--------- 10 files changed, 74 insertions(+), 78 deletions(-) diff --git a/src/Handlers/ExceptionHandler.php b/src/Handlers/ExceptionHandler.php index 774e37c..dff10e5 100644 --- a/src/Handlers/ExceptionHandler.php +++ b/src/Handlers/ExceptionHandler.php @@ -2,8 +2,8 @@ namespace Asahasrabuddhe\LaravelAPI\Handlers; -use Illuminate\Foundation\Exceptions\Handler; use Illuminate\Database\QueryException; +use Illuminate\Foundation\Exceptions\Handler; use Illuminate\Http\Exception\HttpResponseException; use Asahasrabuddhe\LaravelAPI\BaseResponse as Response; use Asahasrabuddhe\LaravelAPI\Exceptions\BaseException; diff --git a/src/RequestParser.php b/src/RequestParser.php index 09e98a0..aab4d42 100644 --- a/src/RequestParser.php +++ b/src/RequestParser.php @@ -3,16 +3,16 @@ namespace Asahasrabuddhe\LaravelAPI; use Illuminate\Support\Str; +use Illuminate\Support\Facades\Schema; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Asahasrabuddhe\LaravelAPI\Helpers\ReflectionHelper; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\UnknownFieldException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOffsetException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidPerPageLimitException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\FieldCannotBeFilteredException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidFilterDefinitionException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOrderingDefinitionException; -use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOffsetException; -use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\UnknownFieldException; -use Illuminate\Support\Facades\Schema; class RequestParser { @@ -214,7 +214,7 @@ public function getAttributes() */ protected function parseRequest() { - if ( isset(request()->limit) ) { + if (isset(request()->limit)) { if (request()->limit <= 0) { throw new InvalidPerPageLimitException; } @@ -223,8 +223,8 @@ protected function parseRequest() $this->limit = config('api.perPage'); } - if ( isset(request()->offset) ) { - if(request()->offset < 0 ) { + if (isset(request()->offset)) { + if (request()->offset < 0) { throw new InvalidOffsetException; } $this->offset = request()->offset; @@ -502,7 +502,7 @@ private function parseFields($fields) } } else { // Else, its a normal field // Check if the field actually exists otherwise, throw exception - if( Schema::hasColumn((new $this->model())->getTable(), $fieldName) ) { + if (Schema::hasColumn((new $this->model())->getTable(), $fieldName)) { $this->fields[] = $fieldName; } else { throw new UnknownFieldException; diff --git a/tests/Http/Resources/AddressResource.php b/tests/Http/Resources/AddressResource.php index 413c353..bc3ff44 100644 --- a/tests/Http/Resources/AddressResource.php +++ b/tests/Http/Resources/AddressResource.php @@ -16,12 +16,12 @@ public function toArray($request) { // return parent::toArray($request); return [ - 'line_1' => $this->line_1, - 'line_2' => $this->line_2, - 'city' => $this->city, - 'state' => $this->state, - 'country' => $this->country, - 'zip_code' => $this->zip_code + 'line_1' => $this->line_1, + 'line_2' => $this->line_2, + 'city' => $this->city, + 'state' => $this->state, + 'country' => $this->country, + 'zip_code' => $this->zip_code, ]; } } diff --git a/tests/Http/Resources/PostResource.php b/tests/Http/Resources/PostResource.php index 959cd35..47ab16b 100644 --- a/tests/Http/Resources/PostResource.php +++ b/tests/Http/Resources/PostResource.php @@ -16,8 +16,8 @@ public function toArray($request) { // return parent::toArray($request); return [ - 'title' => $this->title, - 'content' => $this->content + 'title' => $this->title, + 'content' => $this->content, ]; } } diff --git a/tests/Http/Resources/UserResource.php b/tests/Http/Resources/UserResource.php index dd8bac5..73cdadd 100644 --- a/tests/Http/Resources/UserResource.php +++ b/tests/Http/Resources/UserResource.php @@ -18,7 +18,7 @@ public function toArray($request) return [ // 'id' => $this->id, 'email' => $this->email, - 'name' => $this->name + 'name' => $this->name, ]; } } diff --git a/tests/Models/Address.php b/tests/Models/Address.php index caaae6b..f56ae6c 100644 --- a/tests/Models/Address.php +++ b/tests/Models/Address.php @@ -4,13 +4,14 @@ use Asahasrabuddhe\LaravelAPI\BaseModel; use Asahasrabuddhe\LaravelAPI\Tests\Http\Resources\AddressResource; + /** * Class Address. */ class Address extends BaseModel { /** - * Fully qualified of the Eloquent API Resource class that this model will be transformed into + * Fully qualified of the Eloquent API Resource class that this model will be transformed into. * * @var string */ diff --git a/tests/Models/Post.php b/tests/Models/Post.php index a2365dc..5c5af7e 100644 --- a/tests/Models/Post.php +++ b/tests/Models/Post.php @@ -3,7 +3,6 @@ namespace Asahasrabuddhe\LaravelAPI\Tests\Models; use Asahasrabuddhe\LaravelAPI\BaseModel; -use Asahasrabuddhe\LaravelAPI\Tests\Http\Resources\AddressResource; class Post extends BaseModel { diff --git a/tests/Models/User.php b/tests/Models/User.php index 6f3793e..abe836d 100644 --- a/tests/Models/User.php +++ b/tests/Models/User.php @@ -26,20 +26,22 @@ class User extends BaseUser ]; protected $default = [ - 'name' + 'name', ]; // protected $resource = UserResource::class; protected $filterable = [ - 'id', 'name' + 'id', 'name', ]; - public function address() { + public function address() + { return $this->hasMany('Asahasrabuddhe\LaravelAPI\Tests\Models\Address'); } - public function posts() { + public function posts() + { return $this->hasMany('Asahasrabuddhe\LaravelAPI\Tests\Models\Post'); } } diff --git a/tests/RequestParserTest.php b/tests/RequestParserTest.php index 4f593f6..c24b903 100644 --- a/tests/RequestParserTest.php +++ b/tests/RequestParserTest.php @@ -2,26 +2,22 @@ namespace Asahasrabuddhe\LaravelAPI\Tests; -use Carbon\Carbon; -use Asahasrabuddhe\LaravelAPI\BaseModel; use Illuminate\Http\Request; -use Symfony\Component\HttpKernel\Tests\Exception\TooManyRequestsHttpExceptionTest; use Asahasrabuddhe\LaravelAPI\RequestParser; use Asahasrabuddhe\LaravelAPI\Tests\Models\User; -use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidPerPageLimitException; -use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOffsetException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\UnknownFieldException; -use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidFilterDefinitionException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOffsetException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidPerPageLimitException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\FieldCannotBeFilteredException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidFilterDefinitionException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOrderingDefinitionException; - class RequestParserTest extends TestCase { /** @test */ public function parses_limit_from_request() { - $_GET = []; + $_GET = []; $_GET['limit'] = 15; request()->merge($_GET); @@ -48,7 +44,7 @@ public function throws_exception_for_negative_limit() { $this->expectException(InvalidPerPageLimitException::class); - $_GET = []; + $_GET = []; $_GET['limit'] = -10; request()->merge($_GET); @@ -61,7 +57,7 @@ public function throws_exception_for_zero_limit() { $this->expectException(InvalidPerPageLimitException::class); - $_GET = []; + $_GET = []; $_GET['limit'] = 0; request()->merge($_GET); @@ -72,7 +68,7 @@ public function throws_exception_for_zero_limit() /** @test */ public function parses_offset_from_request() { - $_GET = []; + $_GET = []; $_GET['offset'] = 10; request()->merge($_GET); @@ -97,7 +93,7 @@ public function throws_exception_for_negative_offset() { $this->expectException(InvalidOffsetException::class); - $_GET = []; + $_GET = []; $_GET['offset'] = -10; request()->merge($_GET); @@ -108,7 +104,7 @@ public function throws_exception_for_negative_offset() /** @test */ public function parses_fields_from_request() { - $_GET = []; + $_GET = []; $_GET['fields'] = 'name,email,address,posts'; request()->merge($_GET); @@ -125,8 +121,8 @@ public function parses_fields_from_request() public function throws_exception_for_unknown_field() { $this->expectException(UnknownFieldException::class); - - $_GET = []; + + $_GET = []; $_GET['fields'] = 'phone'; request()->merge($_GET); @@ -137,7 +133,7 @@ public function throws_exception_for_unknown_field() /** @test */ public function parses_greater_than_filter_from_request() { - $_GET = []; + $_GET = []; $_GET['filters'] = 'id gt 5'; request()->merge($_GET); @@ -150,7 +146,7 @@ public function parses_greater_than_filter_from_request() /** @test */ public function parses_greater_than_equal_to_filter_from_request() { - $_GET = []; + $_GET = []; $_GET['filters'] = 'id ge 5'; request()->merge($_GET); @@ -163,7 +159,7 @@ public function parses_greater_than_equal_to_filter_from_request() /** @test */ public function parses_lesser_than_filter_from_request() { - $_GET = []; + $_GET = []; $_GET['filters'] = 'id lt 5'; request()->merge($_GET); @@ -176,7 +172,7 @@ public function parses_lesser_than_filter_from_request() /** @test */ public function parses_less_than_equal_to_filter_from_request() { - $_GET = []; + $_GET = []; $_GET['filters'] = 'id le 5'; request()->merge($_GET); @@ -189,7 +185,7 @@ public function parses_less_than_equal_to_filter_from_request() /** @test */ public function parses_equal_to_filter_from_request() { - $_GET = []; + $_GET = []; $_GET['filters'] = 'id eq 5'; request()->merge($_GET); @@ -202,7 +198,7 @@ public function parses_equal_to_filter_from_request() /** @test */ public function parses_not_equal_filter_from_request() { - $_GET = []; + $_GET = []; $_GET['filters'] = 'id ne 5'; request()->merge($_GET); @@ -215,7 +211,7 @@ public function parses_not_equal_filter_from_request() /** @test */ public function parses_like_filter_from_request() { - $_GET = []; + $_GET = []; $_GET['filters'] = 'id ne 5'; request()->merge($_GET); @@ -225,11 +221,10 @@ public function parses_like_filter_from_request() $this->assertEquals($parser->getFilters(), '(`id` <> 5)'); } - /** @test */ public function parses_is_null_filter_from_request() { - $_GET = []; + $_GET = []; $_GET['filters'] = 'id eq null'; request()->merge($_GET); @@ -242,7 +237,7 @@ public function parses_is_null_filter_from_request() /** @test */ public function parses_is_not_null_filter_from_request() { - $_GET = []; + $_GET = []; $_GET['filters'] = 'id ne null'; request()->merge($_GET); @@ -257,7 +252,7 @@ public function throws_exception_for_invalid_filtering() { $this->expectException(InvalidFilterDefinitionException::class); - $_GET = []; + $_GET = []; $_GET['filters'] = 'id as 5'; request()->merge($_GET); @@ -270,7 +265,7 @@ public function throws_exception_for_fields_that_cannot_be_filtered() { $this->expectException(FieldCannotBeFilteredException::class); - $_GET = []; + $_GET = []; $_GET['filters'] = 'email lk "perennial"'; request()->merge($_GET); @@ -281,7 +276,7 @@ public function throws_exception_for_fields_that_cannot_be_filtered() /** @test */ public function parse_ascending_ordering_from_request() { - $_GET = []; + $_GET = []; $_GET['order'] = 'id asc'; request()->merge($_GET); @@ -294,7 +289,7 @@ public function parse_ascending_ordering_from_request() /** @test */ public function parse_descending_ordering_from_request() { - $_GET = []; + $_GET = []; $_GET['order'] = 'id desc'; request()->merge($_GET); @@ -309,7 +304,7 @@ public function throws_exception_for_invalid_ordering() { $this->expectException(InvalidOrderingDefinitionException::class); - $_GET = []; + $_GET = []; $_GET['order'] = 'id ad'; request()->merge($_GET); @@ -318,4 +313,4 @@ public function throws_exception_for_invalid_ordering() dd($parser->getORder()); } -} \ No newline at end of file +} diff --git a/tests/TestCase.php b/tests/TestCase.php index 80ea573..faa9324 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,13 +2,12 @@ namespace Asahasrabuddhe\LaravelAPI\Tests; -use Orchestra\Testbench\TestCase as BaseTestCase; -use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\DB; use Illuminate\Database\Schema\Blueprint; +use Asahasrabuddhe\LaravelAPI\Tests\Models\Post; use Asahasrabuddhe\LaravelAPI\Tests\Models\User; +use Orchestra\Testbench\TestCase as BaseTestCase; use Asahasrabuddhe\LaravelAPI\Tests\Models\Address; -use Asahasrabuddhe\LaravelAPI\Tests\Models\Post; abstract class TestCase extends BaseTestCase { @@ -20,7 +19,7 @@ protected function getPackageProviders($app) protected function getPackageAliases($app) { return [ - 'ApiRoute' => 'Asaharabuddhe\LaravelAPI\Facades\ApiRoute' + 'ApiRoute' => 'Asaharabuddhe\LaravelAPI\Facades\ApiRoute', ]; } @@ -33,7 +32,7 @@ protected function setUp() $this->artisan('migrate', [ '--database' => 'testbench', - '--path' => './database/migrations' + '--path' => './database/migrations', ]); $this->migrateDatabase(); @@ -52,9 +51,9 @@ protected function getEnvironmentSetUp($app) // Setup default database to use sqlite :memory: $app['config']->set('database.default', 'testbench'); $app['config']->set('database.connections.testbench', [ - 'driver' => 'sqlite', + 'driver' => 'sqlite', 'database' => ':memory:', - 'prefix' => '', + 'prefix' => '', ]); $app['config']->set('api.perPage', 10); } @@ -71,7 +70,7 @@ protected function migrateDatabase() $table->rememberToken(); $table->timestamps(); }); - + $schemaBuilder->create('password_resets', function (Blueprint $table) { $table->string('email')->index(); $table->string('token'); @@ -98,38 +97,38 @@ protected function migrateDatabase() $table->integer('user_id')->unsigned(); $table->foreign('user_id')->references('id')->on('users'); $table->timestamps(); - }); + }); } protected function seedDatabase() { $faker = \Faker\Factory::create(); - for($i = 1; $i <= 50; $i++) { + for ($i = 1; $i <= 50; $i++) { User::create([ - 'name' => $faker->name, - 'email' => $faker->unique()->safeEmail, - 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret + 'name' => $faker->name, + 'email' => $faker->unique()->safeEmail, + 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 'remember_token' => str_random(10), ]); } - for($i = 1; $i <= 100; $i++) { + for ($i = 1; $i <= 100; $i++) { Address::create([ - 'line_1' => $faker->streetAddress, - 'line_2' => $faker->secondaryAddress, - 'city' => $faker->city, - 'state' => $faker->state, - 'country' => $faker->country, + 'line_1' => $faker->streetAddress, + 'line_2' => $faker->secondaryAddress, + 'city' => $faker->city, + 'state' => $faker->state, + 'country' => $faker->country, 'zip_code' => $faker->postcode, - 'user_id' => $faker->numberBetween(1, 50) + 'user_id' => $faker->numberBetween(1, 50), ]); } - for($i = 1; $i <= 200; $i++) { + for ($i = 1; $i <= 200; $i++) { Post::create([ - 'title' => $faker->realText($maxNbChars = 200, $indexSize = 2), - 'content' => $faker->text($maxNbChars = 200), - 'user_id' => $faker->numberBetween(1, 50) + 'title' => $faker->realText($maxNbChars = 200, $indexSize = 2), + 'content' => $faker->text($maxNbChars = 200), + 'user_id' => $faker->numberBetween(1, 50), ]); } } From 6548ace5c0a3cebe0dd0f8f02c309784251a8cf4 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 14:38:09 +0530 Subject: [PATCH 15/35] Add testdox --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82e3025..68c7782 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ php: script: - mkdir -p build/logs - - php vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml + - php vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml --testdox after_success: - bash <(curl -s https://codecov.io/bash) -t 03ae5c0f-95ef-4671-a35b-0a9cea99f56c From 2bedec9ba512dde2ebb5d1b54516a8925fd847af Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 14:48:53 +0530 Subject: [PATCH 16/35] Update Travis for Coveralls --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 68c7782..cf68b15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ after_success: - bash <(curl -s https://codecov.io/bash) -t 03ae5c0f-95ef-4671-a35b-0a9cea99f56c after_script: - - php vendor/bin/coveralls -v \ No newline at end of file + - php vendor/bin/php-coveralls -v \ No newline at end of file From e46e8b1c346de696e6650ac47a8bcf6921752fc7 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 15:46:52 +0530 Subject: [PATCH 17/35] Support Updated for Coveralls --- .coveralls.yml | 4 +++- phpunit.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.coveralls.yml b/.coveralls.yml index 9160059..170992c 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1 +1,3 @@ -service_name: travis-ci +coverage_clover: coverage.xml +json_path: coverage-upload.json +service_name: travis-ci \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index bb6de38..b9ae1f0 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -18,7 +18,7 @@ - + src/ From 4731b2b7f33b7fc77c4ca94e55c059002f58a878 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 15:59:42 +0530 Subject: [PATCH 18/35] Add Test for LIKE Filter --- tests/RequestParserTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/RequestParserTest.php b/tests/RequestParserTest.php index c24b903..5a3be89 100644 --- a/tests/RequestParserTest.php +++ b/tests/RequestParserTest.php @@ -212,13 +212,13 @@ public function parses_not_equal_filter_from_request() public function parses_like_filter_from_request() { $_GET = []; - $_GET['filters'] = 'id ne 5'; + $_GET['filters'] = 'name lk "Luc"'; request()->merge($_GET); $parser = new RequestParser(User::class); - $this->assertEquals($parser->getFilters(), '(`id` <> 5)'); + $this->assertEquals($parser->getFilters(), '(`name` LIKE "Luc")'); } /** @test */ From 8d9f66b0fcf884895dccef23ab358342a441f900 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 30 Apr 2018 18:58:12 +0530 Subject: [PATCH 19/35] Updated Tests for Request Parser --- src/RequestParser.php | 2 +- tests/Models/Address.php | 2 +- tests/Models/Post.php | 1 + tests/RequestParserTest.php | 15 ++++++++++++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/RequestParser.php b/src/RequestParser.php index aab4d42..86b0e32 100644 --- a/src/RequestParser.php +++ b/src/RequestParser.php @@ -376,7 +376,7 @@ protected function extractOrdering() */ protected function formatRelationalOrderingFieldToSql($matches) { - return $matches[1] . '`.`' . $matches[2] . ' ' . $matches[3]; + return '`' . $matches[1] . '`.`' . $matches[2] . '` ' . $matches[3]; } /** diff --git a/tests/Models/Address.php b/tests/Models/Address.php index f56ae6c..d1d2135 100644 --- a/tests/Models/Address.php +++ b/tests/Models/Address.php @@ -30,7 +30,7 @@ class Address extends BaseModel * * @var array */ - // protected $filterable = []; + protected $filterable = ['id']; public function user() { diff --git a/tests/Models/Post.php b/tests/Models/Post.php index 5c5af7e..aa0745f 100644 --- a/tests/Models/Post.php +++ b/tests/Models/Post.php @@ -3,6 +3,7 @@ namespace Asahasrabuddhe\LaravelAPI\Tests\Models; use Asahasrabuddhe\LaravelAPI\BaseModel; +use Asahasrabuddhe\LaravelAPI\Tests\Http\Resources\PostResource; class Post extends BaseModel { diff --git a/tests/RequestParserTest.php b/tests/RequestParserTest.php index 5a3be89..b09de91 100644 --- a/tests/RequestParserTest.php +++ b/tests/RequestParserTest.php @@ -11,6 +11,7 @@ use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\FieldCannotBeFilteredException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidFilterDefinitionException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOrderingDefinitionException; +use Asahasrabuddhe\LaravelAPI\Tests\Models\Post; class RequestParserTest extends TestCase { @@ -117,6 +118,18 @@ public function parses_fields_from_request() $this->assertArrayHasKey('posts', $parser->getRelations()); } + /** @test */ + public function parses_fields_from_resource() + { + $_GET = []; + + request()->merge($_GET); + + $parser = new RequestParser(Post::class); + + $this->assertEquals($parser->getFields(), ['title', 'content', 'id']); + } + /** @test */ public function throws_exception_for_unknown_field() { @@ -218,7 +231,7 @@ public function parses_like_filter_from_request() $parser = new RequestParser(User::class); - $this->assertEquals($parser->getFilters(), '(`name` LIKE "Luc")'); + $this->assertEquals($parser->getFilters(), '(`name` LIKE "Luc")'); } /** @test */ From cfa4f349f1397025ab52bca8a637b83a1cf35c3b Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 3 May 2018 17:36:36 +0530 Subject: [PATCH 20/35] Handle ResourceNotFoundException properly --- src/BaseController.php | 1 + src/Handlers/ExceptionHandler.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/BaseController.php b/src/BaseController.php index cfc4418..d1b22e3 100644 --- a/src/BaseController.php +++ b/src/BaseController.php @@ -17,6 +17,7 @@ use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; +use Asahasrabuddhe\LaravelAPI\Exceptions\ResourceNotFoundException; class BaseController extends Controller { diff --git a/src/Handlers/ExceptionHandler.php b/src/Handlers/ExceptionHandler.php index dff10e5..115b66d 100644 --- a/src/Handlers/ExceptionHandler.php +++ b/src/Handlers/ExceptionHandler.php @@ -12,6 +12,7 @@ use Asahasrabuddhe\LaravelAPI\Exceptions\UnauthorizedException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\UnknownFieldException; +use Asahasrabuddhe\LaravelAPI\Exceptions\ResourceNotFoundException; class ExceptionHandler extends Handler { @@ -34,6 +35,10 @@ public function render($request, \Exception $e) return Response::exception(new BaseException('Requested resource not found', null, 404, 404, null, [ 'url' => request()->url(), ])); + } elseif ($e instanceof ResourceNotFoundException) { + return Response::exception(new BaseException('Requested resource not found', null, 404, 404, null, [ + 'url' => request()->url(), + ])); } elseif ($e instanceof Exception) { return Response::exception($e); } elseif ($e instanceof QueryException) { From 112c2b6431bbdc2d055a13641264fb49515a422c Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 3 May 2018 17:36:54 +0530 Subject: [PATCH 21/35] Add Controllers for API Testing --- tests/Http/Controllers/AddressController.php | 11 +++++++++++ tests/Http/Controllers/PostController.php | 11 +++++++++++ tests/Http/Controllers/UserController.php | 11 +++++++++++ tests/TestCase.php | 12 ++++++++++-- 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 tests/Http/Controllers/AddressController.php create mode 100644 tests/Http/Controllers/PostController.php create mode 100644 tests/Http/Controllers/UserController.php diff --git a/tests/Http/Controllers/AddressController.php b/tests/Http/Controllers/AddressController.php new file mode 100644 index 0000000..b4996bb --- /dev/null +++ b/tests/Http/Controllers/AddressController.php @@ -0,0 +1,11 @@ +migrateDatabase(); $this->seedDatabase(); + + $this->app->make(BaseRouter::class)->resource('users', UserController::class); + $this->app->make(BaseRouter::class)->resource('posts', PostController::class); + $this->app->make(BaseRouter::class)->resource('comments', CommentController::class); } /** @@ -112,7 +120,7 @@ protected function seedDatabase() ]); } - for ($i = 1; $i <= 100; $i++) { + for ($i = 1; $i <= 50; $i++) { Address::create([ 'line_1' => $faker->streetAddress, 'line_2' => $faker->secondaryAddress, @@ -120,7 +128,7 @@ protected function seedDatabase() 'state' => $faker->state, 'country' => $faker->country, 'zip_code' => $faker->postcode, - 'user_id' => $faker->numberBetween(1, 50), + 'user_id' => $i, ]); } From 7c37de57d1017aec936afeadf4a2f5078c810fbf Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 3 May 2018 17:37:06 +0530 Subject: [PATCH 22/35] Update User model with 1-to-1 relationship for address --- tests/Models/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Models/User.php b/tests/Models/User.php index abe836d..bdf5072 100644 --- a/tests/Models/User.php +++ b/tests/Models/User.php @@ -37,7 +37,7 @@ class User extends BaseUser public function address() { - return $this->hasMany('Asahasrabuddhe\LaravelAPI\Tests\Models\Address'); + return $this->hasOne('Asahasrabuddhe\LaravelAPI\Tests\Models\Address'); } public function posts() From 11554c863d1381c33b1c02c23bf1ebca9948a658 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 3 May 2018 18:12:00 +0530 Subject: [PATCH 23/35] Added support for Custom Status in Base Controller --- src/BaseResponse.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BaseResponse.php b/src/BaseResponse.php index 5b37099..3112fac 100644 --- a/src/BaseResponse.php +++ b/src/BaseResponse.php @@ -68,7 +68,7 @@ public function setData($data) * @param array $data * @return Response */ - public static function make($message = null, $data = null, $meta = null) + public static function make($message = null, $data = null, $meta = null, $status = 200) { $response = []; @@ -84,7 +84,7 @@ public static function make($message = null, $data = null, $meta = null) $response['meta'] = $meta; } - $returnResponse = Response::make($response); + $returnResponse = Response::make($response, $status); return $returnResponse; } From 446829253b652e950c0d3c922b93ab22ccb318e3 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 3 May 2018 18:12:30 +0530 Subject: [PATCH 24/35] Updated object shared on Events; Create User now returns 201 --- src/BaseController.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/BaseController.php b/src/BaseController.php index d1b22e3..fb47b19 100644 --- a/src/BaseController.php +++ b/src/BaseController.php @@ -199,7 +199,7 @@ public function store() $object->fill(request()->all()); // Fire creating event - Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'creating', $results); + Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'creating', $object); $object->save(); @@ -208,9 +208,9 @@ public function store() \DB::commit(); // Fire created event - Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'created', $results); + Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'created', $object); - return BaseResponse::make('Resource created successfully', ['id' => $object->id], $meta); + return BaseResponse::make('Resource created successfully', ['id' => $object->id], $meta, 201); } public function update(...$args) @@ -235,7 +235,7 @@ public function update(...$args) $object->fill(request()->all()); // Fire updating event - Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'updating', $results); + Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'updating', $object); $object->save(); @@ -244,7 +244,7 @@ public function update(...$args) \DB::commit(); // Fire updated event - Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'updated', $results); + Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'updated', $object); return BaseResponse::make('Resource updated successfully', ['id' => $object->id], $meta); } @@ -269,7 +269,7 @@ public function destroy(...$args) } // Fire deleting event - Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'deleting', $results); + Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'deleting', $object); $object->delete(); @@ -278,7 +278,7 @@ public function destroy(...$args) \DB::commit(); // Fire deleted event - Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'deleted', $results); + Event::fire(strtolower((new \ReflectionClass($this->model))->getShortName()) . 'deleted', $object); return BaseResponse::make('Resource deleted successfully', null, $meta); } @@ -288,7 +288,7 @@ public function relation($id, $relation) $this->validate(); // To show relations, we just make a new fields parameter, which requests - // only object id, and the relation and get the results like normal index request + // only object id, and the relation and get the result like normal index request $fields = 'id,' . $relation . '.limit(' . ((request()->limit) ? request()->limit : $this->defaultLimit) . ')' . ((request()->offset) ? '.offset(' . request()->offset . ')' : '') From 44ef6505d1c28afaf45dd0173724be9e9dad534d Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 3 May 2018 18:12:43 +0530 Subject: [PATCH 25/35] Test Suite added for APIs --- tests/APITest.php | 405 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 405 insertions(+) create mode 100644 tests/APITest.php diff --git a/tests/APITest.php b/tests/APITest.php new file mode 100644 index 0000000..de6b578 --- /dev/null +++ b/tests/APITest.php @@ -0,0 +1,405 @@ +call('GET', 'api/v1/users'); + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + [ + 'name', + 'id' + ] + ], + 'meta' => [ + 'paging' => [ + 'links' => [ + 'next' + ], + 'total' + ], + 'time' + ] + ]); + } + + /** @test */ + public function test_get_all_users_with_fields() + { + $response = $this->call('GET', 'api/v1/users?fields=name,email'); + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + [ + 'name', + 'email', + 'id' + ] + ], + 'meta' => [ + 'paging' => [ + 'links' => [ + 'next' + ], + 'total' + ], + 'time' + ] + ]); + } + + /** @test */ + public function test_get_all_users_with_related_fields_one_to_one() + { + $response = $this->call('GET', 'api/v1/users?fields=name,email,address'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + [ + 'name', + 'email', + 'address', + 'id' + ] + ], + 'meta' => [ + 'paging' => [ + 'links' => [ + 'next' + ], + 'total' + ], + 'time' + ] + ]); + $this->assertFalse(is_array($responseContent->data[0]->address)); + } + + /** @test */ + public function test_get_all_users_with_related_fields_one_to_many() + { + $response = $this->call('GET', 'api/v1/users?fields=name,email,posts'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + [ + 'name', + 'email', + 'id' + ] + ], + 'meta' => [ + 'paging' => [ + 'links' => [ + 'next' + ], + 'total' + ], + 'time' + ] + ]); + $this->assertTrue(is_array($responseContent->data[0]->posts)); + } + + /** @test */ + public function test_get_all_users_with_filters() + { + $response = $this->call('GET', 'api/v1/users?filters=id gt 5'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + [ + 'name', + 'id' + ] + ], + 'meta' => [ + 'paging' => [ + 'links' => [ + 'next' + ], + 'total' + ], + 'time' + ] + ]); + $this->assertTrue($responseContent->data[0]->id >= 5); + } + + /** @test */ + public function test_get_all_users_with_filters_returns_error_for_unfilterable_fields() + { + $response = $this->call('GET', 'api/v1/users?filters=email lk "Luc"'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 400); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'error' => [ + 'message', + 'code' + ] + ]); + } + + public function test_get_all_users_with_limit() + { + $response = $this->call('GET', 'api/v1/users?limit=5'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + [ + 'name', + 'id' + ] + ], + 'meta' => [ + 'paging' => [ + 'links' => [ + 'next' + ], + 'total' + ], + 'time' + ] + ]); + $this->assertEquals(count($responseContent->data), 5); + } + + public function test_get_all_users_with_limit_returns_error_for_invalid_limit() + { + $response = $this->call('GET', 'api/v1/users?limit=0'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 400); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'error' => [ + 'message', + 'code' + ] + ]); + } + + public function test_get_all_users_with_limit_returns_error_for_negative_limit() + { + $response = $this->call('GET', 'api/v1/users?limit=-5'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 400); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'error' => [ + 'message', + 'code' + ] + ]); + } + + public function test_get_all_users_with_order() + { + $response = $this->call('GET', 'api/v1/users?order=id desc'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + [ + 'name', + 'id' + ] + ], + 'meta' => [ + 'paging' => [ + 'links' => [ + 'next' + ], + 'total' + ], + 'time' + ] + ]); + $this->assertEquals($responseContent->data[0]->id, 50); + } + + /** @test */ + public function test_get_single_user() + { + $response = $this->call('GET', 'api/v1/users/15'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + 'name', + 'id' + ], + 'meta' => [ + 'time' + ] + ]); + $this->assertEquals($responseContent->data->id, 15); + } + + /** @test */ + public function test_get_single_user_returns_error_for_users_that_do_not_exist() + { + $response = $this->call('GET', 'api/v1/users/1500'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 404); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'error' => [ + 'message', + 'code' + ] + ]); + } + + /** @test */ + public function test_get_single_user_with_one_to_one_relation_endpoint() + { + $response = $this->call('GET', 'api/v1/users/15/address'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + 'line_1', + 'line_2', + 'city', + 'state', + 'country', + 'zip_code', + 'id' + ], + 'meta' => [ + 'time' + ] + ]); + } + + /** @test */ + public function test_get_single_user_with_one_to_many_relation_endpoint() + { + $response = $this->call('GET', 'api/v1/users/15/posts'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + [ + 'title', + 'content', + 'id' + ] + ], + 'meta' => [ + 'time' + ] + ]); + } + + /** @test */ + public function test_create_user() + { + $response = $this->call( + 'POST', + 'api/v1/users', + [ + 'name' => 'Dummy User', + 'email' => 'dummy@test.com', + 'password' => 'secret' + ] + ); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals(201, $response->status()); + $id = $responseContent->data->id; + $response = $responseContent = null; + + // Verify newly created user + $response = $this->call('GET', 'api/v1/users/' . $id); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJson([ + 'data' => [ + 'name' => 'Dummy User', + 'id' => $id + ] + ]); + } + + /** @test */ + public function test_update_user() + { + $response = $this->call( + 'PUT', + 'api/v1/users/15', + [ + 'name' => 'Dummy1 User', + 'email' => 'dummy1@test.com', + ] + ); + + $this->assertEquals(200, $response->status()); + $response = null; + + // Verify newly created user + $response = $this->call('GET', 'api/v1/users/15'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJson([ + 'data' => [ + 'name' => 'Dummy1 User', + 'id' => 15 + ] + ]); + } + + public function test_delete_user() + { + $response = $this->call('DELETE', 'api/v1/users/25'); + $this->assertEquals(200, $response->status()); + + $response = $this->call('GET', 'api/v1/users/25'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 404); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'error' => [ + 'message', + 'code' + ] + ]); + } +} \ No newline at end of file From 2bb29d19469e56df8a0324c400b98ec8656c833f Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 3 May 2018 23:12:58 +0530 Subject: [PATCH 26/35] Added Comment Model and Added Support for Deeper Relations API Calls --- tests/APITest.php | 68 +++++++++++++++++++++++++++++++++++----- tests/Models/Comment.php | 40 +++++++++++++++++++++++ tests/Models/Post.php | 5 +++ tests/Models/User.php | 5 +++ tests/TestCase.php | 20 ++++++++++++ 5 files changed, 130 insertions(+), 8 deletions(-) create mode 100644 tests/Models/Comment.php diff --git a/tests/APITest.php b/tests/APITest.php index de6b578..80dc3af 100644 --- a/tests/APITest.php +++ b/tests/APITest.php @@ -12,7 +12,7 @@ public function test_get_all_users() $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ 'data' => [ - [ + '*' => [ 'name', 'id' ] @@ -37,7 +37,7 @@ public function test_get_all_users_with_fields() $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ 'data' => [ - [ + '*' => [ 'name', 'email', 'id' @@ -65,7 +65,7 @@ public function test_get_all_users_with_related_fields_one_to_one() $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ 'data' => [ - [ + '*' => [ 'name', 'email', 'address', @@ -95,10 +95,17 @@ public function test_get_all_users_with_related_fields_one_to_many() $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ 'data' => [ - [ + '*' => [ 'name', 'email', - 'id' + 'id', + 'posts' => [ + '*' => [ + 'title', + 'content', + 'id' + ] + ] ] ], 'meta' => [ @@ -114,6 +121,51 @@ public function test_get_all_users_with_related_fields_one_to_many() $this->assertTrue(is_array($responseContent->data[0]->posts)); } + /** @test */ + public function test_get_all_users_with_second_level_relationships() + { + $response = $this->call('GET', 'api/v1/users?fields=name,address,posts{title,content},posts:comments{content},posts:comments:author{name}'); + $responseContent = json_decode($response->getContent()); + + $this->assertEquals($response->status(), 200); + $this->assertEquals('application/json', $response->headers->get('Content-Type')); + $response->assertJsonStructure([ + 'data' => [ + '*' => [ + 'name', + 'id', + 'posts' => [ + '*' => [ + 'title', + 'content', + 'id', + 'comments' => [ + '*' => [ + 'content', + 'user_id', + 'id', + 'author' => [ + 'name', + 'id' + ] + ] + ] + ] + ] + ] + ], + 'meta' => [ + 'paging' => [ + 'links' => [ + 'next' + ], + 'total' + ], + 'time' + ] + ]); + } + /** @test */ public function test_get_all_users_with_filters() { @@ -124,7 +176,7 @@ public function test_get_all_users_with_filters() $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ 'data' => [ - [ + '*' => [ 'name', 'id' ] @@ -167,7 +219,7 @@ public function test_get_all_users_with_limit() $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ 'data' => [ - [ + '*' => [ 'name', 'id' ] @@ -224,7 +276,7 @@ public function test_get_all_users_with_order() $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ 'data' => [ - [ + '*' => [ 'name', 'id' ] diff --git a/tests/Models/Comment.php b/tests/Models/Comment.php new file mode 100644 index 0000000..90565b9 --- /dev/null +++ b/tests/Models/Comment.php @@ -0,0 +1,40 @@ +belongsTo('Asahasrabuddhe\LaravelAPI\Tests\Models\Post'); + } + + public function author() + { + return $this->belongsTo('Asahasrabuddhe\LaravelAPI\Tests\Models\User', 'user_id', 'id'); + } +} diff --git a/tests/Models/Post.php b/tests/Models/Post.php index aa0745f..6418d59 100644 --- a/tests/Models/Post.php +++ b/tests/Models/Post.php @@ -13,4 +13,9 @@ public function user() { return $this->belongsTo('Asahasrabuddhe\LaravelAPI\Tests\Models\User'); } + + public function comments() + { + return $this->hasMany('Asahasrabuddhe\LaravelAPI\Tests\Models\Comment'); + } } diff --git a/tests/Models/User.php b/tests/Models/User.php index bdf5072..6b63275 100644 --- a/tests/Models/User.php +++ b/tests/Models/User.php @@ -44,4 +44,9 @@ public function posts() { return $this->hasMany('Asahasrabuddhe\LaravelAPI\Tests\Models\Post'); } + + public function comments() + { + return $this->hasMany('Asahasrabuddhe\LaravelAPI\Tests\Models\Comment'); + } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 28527d0..2b54448 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -12,6 +12,7 @@ use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\AddressController; use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\PostController; use Asahasrabuddhe\LaravelAPI\Routing\BaseRouter; +use Asahasrabuddhe\LaravelAPI\Tests\Models\Comment; abstract class TestCase extends BaseTestCase { @@ -45,6 +46,7 @@ protected function setUp() $this->app->make(BaseRouter::class)->resource('users', UserController::class); $this->app->make(BaseRouter::class)->resource('posts', PostController::class); + $this->app->make(BaseRouter::class)->resource('address', AddressController::class); $this->app->make(BaseRouter::class)->resource('comments', CommentController::class); } @@ -106,6 +108,16 @@ protected function migrateDatabase() $table->foreign('user_id')->references('id')->on('users'); $table->timestamps(); }); + + $schemaBuilder->create('comments', function (Blueprint $table) { + $table->increments('id'); + $table->text('content'); + $table->integer('post_id')->unsigned(); + $table->foreign('post_id')->references('id')->on('posts'); + $table->integer('user_id')->unsigned(); + $table->foreign('user_id')->references('id')->on('users'); + $table->timestamps(); + }); } protected function seedDatabase() @@ -139,5 +151,13 @@ protected function seedDatabase() 'user_id' => $faker->numberBetween(1, 50), ]); } + + for ($i = 1; $i <= 400; $i++) { + Comment::create([ + 'content' => $faker->text($maxNbChars = 100), + 'post_id' => $faker->numberBetween(1, 200), + 'user_id' => $faker->numberBetween(1, 50), + ]); + } } } From 7aa038653f42b81b2675604757af28fe41a59a3a Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrbauddhe Date: Thu, 3 May 2018 17:46:25 +0000 Subject: [PATCH 27/35] Apply fixes from StyleCI --- src/Handlers/ExceptionHandler.php | 2 +- tests/APITest.php | 202 +++++++++---------- tests/Http/Controllers/AddressController.php | 2 +- tests/Http/Controllers/PostController.php | 2 +- tests/Http/Controllers/UserController.php | 2 +- tests/Models/Comment.php | 80 ++++---- tests/RequestParserTest.php | 4 +- tests/TestCase.php | 6 +- 8 files changed, 150 insertions(+), 150 deletions(-) diff --git a/src/Handlers/ExceptionHandler.php b/src/Handlers/ExceptionHandler.php index 115b66d..39598c0 100644 --- a/src/Handlers/ExceptionHandler.php +++ b/src/Handlers/ExceptionHandler.php @@ -11,8 +11,8 @@ use Asahasrabuddhe\LaravelAPI\Exceptions\ValidationException; use Asahasrabuddhe\LaravelAPI\Exceptions\UnauthorizedException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\UnknownFieldException; use Asahasrabuddhe\LaravelAPI\Exceptions\ResourceNotFoundException; +use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\UnknownFieldException; class ExceptionHandler extends Handler { diff --git a/tests/APITest.php b/tests/APITest.php index 80dc3af..1908862 100644 --- a/tests/APITest.php +++ b/tests/APITest.php @@ -14,18 +14,18 @@ public function test_get_all_users() 'data' => [ '*' => [ 'name', - 'id' - ] + 'id', + ], ], 'meta' => [ 'paging' => [ 'links' => [ - 'next' + 'next', ], - 'total' + 'total', ], - 'time' - ] + 'time', + ], ]); } @@ -40,25 +40,25 @@ public function test_get_all_users_with_fields() '*' => [ 'name', 'email', - 'id' - ] + 'id', + ], ], 'meta' => [ 'paging' => [ 'links' => [ - 'next' + 'next', ], - 'total' + 'total', ], - 'time' - ] + 'time', + ], ]); } /** @test */ public function test_get_all_users_with_related_fields_one_to_one() { - $response = $this->call('GET', 'api/v1/users?fields=name,email,address'); + $response = $this->call('GET', 'api/v1/users?fields=name,email,address'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -69,18 +69,18 @@ public function test_get_all_users_with_related_fields_one_to_one() 'name', 'email', 'address', - 'id' - ] + 'id', + ], ], 'meta' => [ 'paging' => [ 'links' => [ - 'next' + 'next', ], - 'total' + 'total', ], - 'time' - ] + 'time', + ], ]); $this->assertFalse(is_array($responseContent->data[0]->address)); } @@ -88,7 +88,7 @@ public function test_get_all_users_with_related_fields_one_to_one() /** @test */ public function test_get_all_users_with_related_fields_one_to_many() { - $response = $this->call('GET', 'api/v1/users?fields=name,email,posts'); + $response = $this->call('GET', 'api/v1/users?fields=name,email,posts'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -103,20 +103,20 @@ public function test_get_all_users_with_related_fields_one_to_many() '*' => [ 'title', 'content', - 'id' - ] - ] - ] + 'id', + ], + ], + ], ], 'meta' => [ 'paging' => [ 'links' => [ - 'next' + 'next', ], - 'total' + 'total', ], - 'time' - ] + 'time', + ], ]); $this->assertTrue(is_array($responseContent->data[0]->posts)); } @@ -124,7 +124,7 @@ public function test_get_all_users_with_related_fields_one_to_many() /** @test */ public function test_get_all_users_with_second_level_relationships() { - $response = $this->call('GET', 'api/v1/users?fields=name,address,posts{title,content},posts:comments{content},posts:comments:author{name}'); + $response = $this->call('GET', 'api/v1/users?fields=name,address,posts{title,content},posts:comments{content},posts:comments:author{name}'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -146,30 +146,30 @@ public function test_get_all_users_with_second_level_relationships() 'id', 'author' => [ 'name', - 'id' - ] - ] - ] - ] - ] - ] + 'id', + ], + ], + ], + ], + ], + ], ], 'meta' => [ 'paging' => [ 'links' => [ - 'next' + 'next', ], - 'total' + 'total', ], - 'time' - ] + 'time', + ], ]); } /** @test */ public function test_get_all_users_with_filters() { - $response = $this->call('GET', 'api/v1/users?filters=id gt 5'); + $response = $this->call('GET', 'api/v1/users?filters=id gt 5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -178,18 +178,18 @@ public function test_get_all_users_with_filters() 'data' => [ '*' => [ 'name', - 'id' - ] + 'id', + ], ], 'meta' => [ 'paging' => [ 'links' => [ - 'next' + 'next', ], - 'total' + 'total', ], - 'time' - ] + 'time', + ], ]); $this->assertTrue($responseContent->data[0]->id >= 5); } @@ -197,7 +197,7 @@ public function test_get_all_users_with_filters() /** @test */ public function test_get_all_users_with_filters_returns_error_for_unfilterable_fields() { - $response = $this->call('GET', 'api/v1/users?filters=email lk "Luc"'); + $response = $this->call('GET', 'api/v1/users?filters=email lk "Luc"'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -205,14 +205,14 @@ public function test_get_all_users_with_filters_returns_error_for_unfilterable_f $response->assertJsonStructure([ 'error' => [ 'message', - 'code' - ] + 'code', + ], ]); } public function test_get_all_users_with_limit() { - $response = $this->call('GET', 'api/v1/users?limit=5'); + $response = $this->call('GET', 'api/v1/users?limit=5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -221,25 +221,25 @@ public function test_get_all_users_with_limit() 'data' => [ '*' => [ 'name', - 'id' - ] + 'id', + ], ], 'meta' => [ 'paging' => [ 'links' => [ - 'next' + 'next', ], - 'total' + 'total', ], - 'time' - ] + 'time', + ], ]); $this->assertEquals(count($responseContent->data), 5); } public function test_get_all_users_with_limit_returns_error_for_invalid_limit() { - $response = $this->call('GET', 'api/v1/users?limit=0'); + $response = $this->call('GET', 'api/v1/users?limit=0'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -247,14 +247,14 @@ public function test_get_all_users_with_limit_returns_error_for_invalid_limit() $response->assertJsonStructure([ 'error' => [ 'message', - 'code' - ] + 'code', + ], ]); } public function test_get_all_users_with_limit_returns_error_for_negative_limit() { - $response = $this->call('GET', 'api/v1/users?limit=-5'); + $response = $this->call('GET', 'api/v1/users?limit=-5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -262,14 +262,14 @@ public function test_get_all_users_with_limit_returns_error_for_negative_limit() $response->assertJsonStructure([ 'error' => [ 'message', - 'code' - ] + 'code', + ], ]); } public function test_get_all_users_with_order() { - $response = $this->call('GET', 'api/v1/users?order=id desc'); + $response = $this->call('GET', 'api/v1/users?order=id desc'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -278,18 +278,18 @@ public function test_get_all_users_with_order() 'data' => [ '*' => [ 'name', - 'id' - ] + 'id', + ], ], 'meta' => [ 'paging' => [ 'links' => [ - 'next' + 'next', ], - 'total' + 'total', ], - 'time' - ] + 'time', + ], ]); $this->assertEquals($responseContent->data[0]->id, 50); } @@ -297,7 +297,7 @@ public function test_get_all_users_with_order() /** @test */ public function test_get_single_user() { - $response = $this->call('GET', 'api/v1/users/15'); + $response = $this->call('GET', 'api/v1/users/15'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -305,11 +305,11 @@ public function test_get_single_user() $response->assertJsonStructure([ 'data' => [ 'name', - 'id' + 'id', ], 'meta' => [ - 'time' - ] + 'time', + ], ]); $this->assertEquals($responseContent->data->id, 15); } @@ -317,7 +317,7 @@ public function test_get_single_user() /** @test */ public function test_get_single_user_returns_error_for_users_that_do_not_exist() { - $response = $this->call('GET', 'api/v1/users/1500'); + $response = $this->call('GET', 'api/v1/users/1500'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 404); @@ -325,15 +325,15 @@ public function test_get_single_user_returns_error_for_users_that_do_not_exist() $response->assertJsonStructure([ 'error' => [ 'message', - 'code' - ] + 'code', + ], ]); } /** @test */ public function test_get_single_user_with_one_to_one_relation_endpoint() { - $response = $this->call('GET', 'api/v1/users/15/address'); + $response = $this->call('GET', 'api/v1/users/15/address'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -346,18 +346,18 @@ public function test_get_single_user_with_one_to_one_relation_endpoint() 'state', 'country', 'zip_code', - 'id' + 'id', ], 'meta' => [ - 'time' - ] + 'time', + ], ]); } /** @test */ public function test_get_single_user_with_one_to_many_relation_endpoint() { - $response = $this->call('GET', 'api/v1/users/15/posts'); + $response = $this->call('GET', 'api/v1/users/15/posts'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -367,12 +367,12 @@ public function test_get_single_user_with_one_to_many_relation_endpoint() [ 'title', 'content', - 'id' - ] + 'id', + ], ], 'meta' => [ - 'time' - ] + 'time', + ], ]); } @@ -383,19 +383,19 @@ public function test_create_user() 'POST', 'api/v1/users', [ - 'name' => 'Dummy User', - 'email' => 'dummy@test.com', - 'password' => 'secret' + 'name' => 'Dummy User', + 'email' => 'dummy@test.com', + 'password' => 'secret', ] ); $responseContent = json_decode($response->getContent()); $this->assertEquals(201, $response->status()); - $id = $responseContent->data->id; + $id = $responseContent->data->id; $response = $responseContent = null; // Verify newly created user - $response = $this->call('GET', 'api/v1/users/' . $id); + $response = $this->call('GET', 'api/v1/users/' . $id); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -403,8 +403,8 @@ public function test_create_user() $response->assertJson([ 'data' => [ 'name' => 'Dummy User', - 'id' => $id - ] + 'id' => $id, + ], ]); } @@ -415,7 +415,7 @@ public function test_update_user() 'PUT', 'api/v1/users/15', [ - 'name' => 'Dummy1 User', + 'name' => 'Dummy1 User', 'email' => 'dummy1@test.com', ] ); @@ -424,7 +424,7 @@ public function test_update_user() $response = null; // Verify newly created user - $response = $this->call('GET', 'api/v1/users/15'); + $response = $this->call('GET', 'api/v1/users/15'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -432,8 +432,8 @@ public function test_update_user() $response->assertJson([ 'data' => [ 'name' => 'Dummy1 User', - 'id' => 15 - ] + 'id' => 15, + ], ]); } @@ -442,7 +442,7 @@ public function test_delete_user() $response = $this->call('DELETE', 'api/v1/users/25'); $this->assertEquals(200, $response->status()); - $response = $this->call('GET', 'api/v1/users/25'); + $response = $this->call('GET', 'api/v1/users/25'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 404); @@ -450,8 +450,8 @@ public function test_delete_user() $response->assertJsonStructure([ 'error' => [ 'message', - 'code' - ] + 'code', + ], ]); } -} \ No newline at end of file +} diff --git a/tests/Http/Controllers/AddressController.php b/tests/Http/Controllers/AddressController.php index b4996bb..2d137cd 100644 --- a/tests/Http/Controllers/AddressController.php +++ b/tests/Http/Controllers/AddressController.php @@ -8,4 +8,4 @@ class AddressController extends BaseController { protected $model = Address::class; -} \ No newline at end of file +} diff --git a/tests/Http/Controllers/PostController.php b/tests/Http/Controllers/PostController.php index 31887b2..863fbac 100644 --- a/tests/Http/Controllers/PostController.php +++ b/tests/Http/Controllers/PostController.php @@ -8,4 +8,4 @@ class PostController extends BaseController { protected $model = Post::class; -} \ No newline at end of file +} diff --git a/tests/Http/Controllers/UserController.php b/tests/Http/Controllers/UserController.php index af750f8..e90e20c 100644 --- a/tests/Http/Controllers/UserController.php +++ b/tests/Http/Controllers/UserController.php @@ -8,4 +8,4 @@ class UserController extends BaseController { protected $model = User::class; -} \ No newline at end of file +} diff --git a/tests/Models/Comment.php b/tests/Models/Comment.php index 90565b9..d431d56 100644 --- a/tests/Models/Comment.php +++ b/tests/Models/Comment.php @@ -1,40 +1,40 @@ -belongsTo('Asahasrabuddhe\LaravelAPI\Tests\Models\Post'); - } - - public function author() - { - return $this->belongsTo('Asahasrabuddhe\LaravelAPI\Tests\Models\User', 'user_id', 'id'); - } -} +belongsTo('Asahasrabuddhe\LaravelAPI\Tests\Models\Post'); + } + + public function author() + { + return $this->belongsTo('Asahasrabuddhe\LaravelAPI\Tests\Models\User', 'user_id', 'id'); + } +} diff --git a/tests/RequestParserTest.php b/tests/RequestParserTest.php index b09de91..debc4f0 100644 --- a/tests/RequestParserTest.php +++ b/tests/RequestParserTest.php @@ -4,6 +4,7 @@ use Illuminate\Http\Request; use Asahasrabuddhe\LaravelAPI\RequestParser; +use Asahasrabuddhe\LaravelAPI\Tests\Models\Post; use Asahasrabuddhe\LaravelAPI\Tests\Models\User; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\UnknownFieldException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOffsetException; @@ -11,7 +12,6 @@ use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\FieldCannotBeFilteredException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidFilterDefinitionException; use Asahasrabuddhe\LaravelAPI\Exceptions\Parse\InvalidOrderingDefinitionException; -use Asahasrabuddhe\LaravelAPI\Tests\Models\Post; class RequestParserTest extends TestCase { @@ -122,7 +122,7 @@ public function parses_fields_from_request() public function parses_fields_from_resource() { $_GET = []; - + request()->merge($_GET); $parser = new RequestParser(Post::class); diff --git a/tests/TestCase.php b/tests/TestCase.php index 2b54448..9a77180 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -6,13 +6,13 @@ use Illuminate\Database\Schema\Blueprint; use Asahasrabuddhe\LaravelAPI\Tests\Models\Post; use Asahasrabuddhe\LaravelAPI\Tests\Models\User; +use Asahasrabuddhe\LaravelAPI\Routing\BaseRouter; use Orchestra\Testbench\TestCase as BaseTestCase; use Asahasrabuddhe\LaravelAPI\Tests\Models\Address; +use Asahasrabuddhe\LaravelAPI\Tests\Models\Comment; +use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\PostController; use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\UserController; use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\AddressController; -use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\PostController; -use Asahasrabuddhe\LaravelAPI\Routing\BaseRouter; -use Asahasrabuddhe\LaravelAPI\Tests\Models\Comment; abstract class TestCase extends BaseTestCase { From 2bf90f1e46240d1d370415ea5b7ecb7768523ed0 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Fri, 4 May 2018 13:36:22 +0530 Subject: [PATCH 28/35] Use facades for testing routes --- tests/APITest.php | 40 ++++++++++++++++++++-------------------- tests/TestCase.php | 7 ++++--- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/tests/APITest.php b/tests/APITest.php index de6b578..f68ce63 100644 --- a/tests/APITest.php +++ b/tests/APITest.php @@ -7,7 +7,7 @@ class APITest extends TestCase /** @test */ public function test_get_all_users() { - $response = $this->call('GET', 'api/v1/users'); + $response = $this->call('GET', '/api/v1/users'); $this->assertEquals($response->status(), 200); $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ @@ -32,7 +32,7 @@ public function test_get_all_users() /** @test */ public function test_get_all_users_with_fields() { - $response = $this->call('GET', 'api/v1/users?fields=name,email'); + $response = $this->call('GET', '/api/v1/users?fields=name,email'); $this->assertEquals($response->status(), 200); $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ @@ -58,7 +58,7 @@ public function test_get_all_users_with_fields() /** @test */ public function test_get_all_users_with_related_fields_one_to_one() { - $response = $this->call('GET', 'api/v1/users?fields=name,email,address'); + $response = $this->call('GET', '/api/v1/users?fields=name,email,address'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -88,7 +88,7 @@ public function test_get_all_users_with_related_fields_one_to_one() /** @test */ public function test_get_all_users_with_related_fields_one_to_many() { - $response = $this->call('GET', 'api/v1/users?fields=name,email,posts'); + $response = $this->call('GET', '/api/v1/users?fields=name,email,posts'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -117,7 +117,7 @@ public function test_get_all_users_with_related_fields_one_to_many() /** @test */ public function test_get_all_users_with_filters() { - $response = $this->call('GET', 'api/v1/users?filters=id gt 5'); + $response = $this->call('GET', '/api/v1/users?filters=id gt 5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -145,7 +145,7 @@ public function test_get_all_users_with_filters() /** @test */ public function test_get_all_users_with_filters_returns_error_for_unfilterable_fields() { - $response = $this->call('GET', 'api/v1/users?filters=email lk "Luc"'); + $response = $this->call('GET', '/api/v1/users?filters=email lk "Luc"'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -160,7 +160,7 @@ public function test_get_all_users_with_filters_returns_error_for_unfilterable_f public function test_get_all_users_with_limit() { - $response = $this->call('GET', 'api/v1/users?limit=5'); + $response = $this->call('GET', '/api/v1/users?limit=5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -187,7 +187,7 @@ public function test_get_all_users_with_limit() public function test_get_all_users_with_limit_returns_error_for_invalid_limit() { - $response = $this->call('GET', 'api/v1/users?limit=0'); + $response = $this->call('GET', '/api/v1/users?limit=0'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -202,7 +202,7 @@ public function test_get_all_users_with_limit_returns_error_for_invalid_limit() public function test_get_all_users_with_limit_returns_error_for_negative_limit() { - $response = $this->call('GET', 'api/v1/users?limit=-5'); + $response = $this->call('GET', '/api/v1/users?limit=-5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -217,7 +217,7 @@ public function test_get_all_users_with_limit_returns_error_for_negative_limit() public function test_get_all_users_with_order() { - $response = $this->call('GET', 'api/v1/users?order=id desc'); + $response = $this->call('GET', '/api/v1/users?order=id desc'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -245,7 +245,7 @@ public function test_get_all_users_with_order() /** @test */ public function test_get_single_user() { - $response = $this->call('GET', 'api/v1/users/15'); + $response = $this->call('GET', '/api/v1/users/15'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -265,7 +265,7 @@ public function test_get_single_user() /** @test */ public function test_get_single_user_returns_error_for_users_that_do_not_exist() { - $response = $this->call('GET', 'api/v1/users/1500'); + $response = $this->call('GET', '/api/v1/users/1500'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 404); @@ -281,7 +281,7 @@ public function test_get_single_user_returns_error_for_users_that_do_not_exist() /** @test */ public function test_get_single_user_with_one_to_one_relation_endpoint() { - $response = $this->call('GET', 'api/v1/users/15/address'); + $response = $this->call('GET', '/api/v1/users/15/address'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -305,7 +305,7 @@ public function test_get_single_user_with_one_to_one_relation_endpoint() /** @test */ public function test_get_single_user_with_one_to_many_relation_endpoint() { - $response = $this->call('GET', 'api/v1/users/15/posts'); + $response = $this->call('GET', '/api/v1/users/15/posts'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -329,7 +329,7 @@ public function test_create_user() { $response = $this->call( 'POST', - 'api/v1/users', + '/api/v1/users', [ 'name' => 'Dummy User', 'email' => 'dummy@test.com', @@ -343,7 +343,7 @@ public function test_create_user() $response = $responseContent = null; // Verify newly created user - $response = $this->call('GET', 'api/v1/users/' . $id); + $response = $this->call('GET', '/api/v1/users/' . $id); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -361,7 +361,7 @@ public function test_update_user() { $response = $this->call( 'PUT', - 'api/v1/users/15', + '/api/v1/users/15', [ 'name' => 'Dummy1 User', 'email' => 'dummy1@test.com', @@ -372,7 +372,7 @@ public function test_update_user() $response = null; // Verify newly created user - $response = $this->call('GET', 'api/v1/users/15'); + $response = $this->call('GET', '/api/v1/users/15'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -387,10 +387,10 @@ public function test_update_user() public function test_delete_user() { - $response = $this->call('DELETE', 'api/v1/users/25'); + $response = $this->call('DELETE', '/api/v1/users/25'); $this->assertEquals(200, $response->status()); - $response = $this->call('GET', 'api/v1/users/25'); + $response = $this->call('GET', '/api/v1/users/25'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 404); diff --git a/tests/TestCase.php b/tests/TestCase.php index 28527d0..eb6016c 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -12,6 +12,7 @@ use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\AddressController; use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\PostController; use Asahasrabuddhe\LaravelAPI\Routing\BaseRouter; +use Asahasrabuddhe\LaravelAPI\Facades\ApiRoute; abstract class TestCase extends BaseTestCase { @@ -43,9 +44,9 @@ protected function setUp() $this->seedDatabase(); - $this->app->make(BaseRouter::class)->resource('users', UserController::class); - $this->app->make(BaseRouter::class)->resource('posts', PostController::class); - $this->app->make(BaseRouter::class)->resource('comments', CommentController::class); + ApiRoute::resource('users', UserController::class); + ApiRoute::resource('posts', PostController::class); + ApiRoute::resource('comments', CommentController::class); } /** From c3723b2586d802573047e65d0ee334bafe3135db Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 7 May 2018 10:36:23 +0530 Subject: [PATCH 29/35] Code Cleanup --- src/BaseResponse.php | 54 -------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/src/BaseResponse.php b/src/BaseResponse.php index 3112fac..32f036f 100644 --- a/src/BaseResponse.php +++ b/src/BaseResponse.php @@ -7,60 +7,6 @@ class BaseResponse { - /** - * Response message. - * - * @var string - */ - private $message = null; - - /** - * Data to send in response. - * - * @var array - */ - private $data = null; - - /** - * Get response message. - * - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Set response message. - * - * @param string $message - */ - public function setMessage($message) - { - $this->message = $message; - } - - /** - * Get response data. - * - * @return array - */ - public function getData() - { - return $this->data; - } - - /** - * Set response data. - * - * @param array $data - */ - public function setData($data) - { - $this->data = $data; - } - /** * Make new success response. * From f44831838565bbc058f9d1ece7e5b451c0c15dc8 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 7 May 2018 10:36:30 +0530 Subject: [PATCH 30/35] Dependencies Updated --- composer.lock | 1599 ++++++++++++++++++++++++------------------------- 1 file changed, 799 insertions(+), 800 deletions(-) diff --git a/composer.lock b/composer.lock index 1d4832c..1ed5063 100644 --- a/composer.lock +++ b/composer.lock @@ -4,715 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "e0d6b68303ad656e053301ed1832e820", - "packages": [ - { - "name": "guzzlehttp/guzzle", - "version": "6.3.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.3-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2018-04-22T15:46:56+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-12-20T10:07:11+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2017-03-20T17:10:46+00:00" - }, - { - "name": "php-coveralls/php-coveralls", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3eaf7eb689cdf6b86801a3843940d974dc657068", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.0", - "php": "^5.5 || ^7.0", - "psr/log": "^1.0", - "symfony/config": "^2.1 || ^3.0 || ^4.0", - "symfony/console": "^2.1 || ^3.0 || ^4.0", - "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", - "symfony/yaml": "^2.0 || ^3.0 || ^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "bin/php-coveralls" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCoveralls\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp", - "role": "Original creator" - }, - { - "name": "Takashi Matsuo", - "email": "tmatsuo@google.com" - }, - { - "name": "Google Inc" - }, - { - "name": "Dariusz Ruminski", - "email": "dariusz.ruminski@gmail.com", - "homepage": "https://github.com/keradus" - }, - { - "name": "Contributors", - "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/php-coveralls/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "time": "2017-12-08T14:28:16+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "symfony/config", - "version": "v4.0.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/7c19370ab04e9ac05b74a504198e165f5ccf6dd8", - "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/filesystem": "~3.4|~4.0" - }, - "conflict": { - "symfony/finder": "<3.4" - }, - "require-dev": { - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2018-03-19T22:35:49+00:00" - }, - { - "name": "symfony/console", - "version": "v4.0.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", - "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v4.0.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", - "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-01-30T19:27:44+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v4.0.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6795ffa2f8eebedac77f045aa62c0c10b2763042", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2018-02-19T16:50:22+00:00" - }, - { - "name": "symfony/yaml", - "version": "v4.0.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/8b34ebb5989df61cbd77eff29a02c4db9ac1069c", - "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" - } - ], + "content-hash": "c5ca2ed3549633094de92aaef4761040", + "packages": [], "packages-dev": [ { "name": "doctrine/inflector", @@ -1091,18 +384,199 @@ ], "time": "2017-08-15T16:48:10+00:00" }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22T15:46:56+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2017-03-20T17:10:46+00:00" + }, { "name": "laravel/framework", - "version": "v5.6.17", + "version": "v5.6.20", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "0f787c763ae8fb9fae0c8c809830ba4fa81e2d9d" + "reference": "3c11e7acc6ad14dd86e2f9e4bf3230010c3e611c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/0f787c763ae8fb9fae0c8c809830ba4fa81e2d9d", - "reference": "0f787c763ae8fb9fae0c8c809830ba4fa81e2d9d", + "url": "https://api.github.com/repos/laravel/framework/zipball/3c11e7acc6ad14dd86e2f9e4bf3230010c3e611c", + "reference": "3c11e7acc6ad14dd86e2f9e4bf3230010c3e611c", "shasum": "" }, "require": { @@ -1228,7 +702,7 @@ "framework", "laravel" ], - "time": "2018-04-17T12:51:04+00:00" + "time": "2018-05-02T15:22:18+00:00" }, { "name": "league/flysystem", @@ -1726,35 +1200,118 @@ "require": { "php": "^5.6 || ^7.0" }, - "type": "library", + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, + { + "name": "php-coveralls/php-coveralls", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3eaf7eb689cdf6b86801a3843940d974dc657068", + "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.0", + "php": "^5.5 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", + "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/php-coveralls" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "PhpCoveralls\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp", + "role": "Original creator" }, { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" + "name": "Takashi Matsuo", + "email": "tmatsuo@google.com" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "name": "Google Inc" + }, + { + "name": "Dariusz Ruminski", + "email": "dariusz.ruminski@gmail.com", + "homepage": "https://github.com/keradus" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" } ], - "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2017-12-08T14:28:16+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1973,16 +1530,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.0.3", + "version": "6.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "774a82c0c5da4c1c7701790c262035d235ab7856" + "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/774a82c0c5da4c1c7701790c262035d235ab7856", - "reference": "774a82c0c5da4c1c7701790c262035d235ab7856", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/52187754b0eed0b8159f62a6fa30073327e8c2ca", + "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca", "shasum": "" }, "require": { @@ -2032,7 +1589,7 @@ "testing", "xunit" ], - "time": "2018-04-06T15:39:20+00:00" + "time": "2018-04-29T14:59:09+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2222,16 +1779,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.1.4", + "version": "7.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb" + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6d51299e307dc510149e0b7cd1931dd11770e1cb", - "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ca64dba53b88aba6af32aebc6b388068db95c435", + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435", "shasum": "" }, "require": { @@ -2250,7 +1807,7 @@ "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.0", "phpunit/phpunit-mock-objects": "^6.1.1", - "sebastian/comparator": "^2.1 || ^3.0", + "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", @@ -2298,7 +1855,7 @@ "testing", "xunit" ], - "time": "2018-04-18T13:41:53+00:00" + "time": "2018-04-29T15:09:19+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -2405,6 +1962,103 @@ ], "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, { "name": "psr/simple-cache", "version": "1.0.1", @@ -3111,22 +2765,156 @@ "shasum": "" }, "require": { - "egulias/email-validator": "~2.0", - "php": ">=7.0.0" + "egulias/email-validator": "~2.0", + "php": ">=7.0.0" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.3@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.0-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.symfony.com", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2017-09-30T22:39:41+00:00" + }, + { + "name": "symfony/config", + "version": "v4.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/7c19370ab04e9ac05b74a504198e165f5ccf6dd8", + "reference": "7c19370ab04e9ac05b74a504198e165f5ccf6dd8", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/filesystem": "~3.4|~4.0" + }, + "conflict": { + "symfony/finder": "<3.4" + }, + "require-dev": { + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2018-03-19T22:35:49+00:00" + }, + { + "name": "symfony/console", + "version": "v4.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", + "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" }, "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "~3.3@dev" + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { - "files": [ - "lib/swift_required.php" + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3134,26 +2922,22 @@ "MIT" ], "authors": [ - { - "name": "Chris Corbyn" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "http://swiftmailer.symfony.com", - "keywords": [ - "email", - "mail", - "mailer" - ], - "time": "2017-09-30T22:39:41+00:00" + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-04-30T01:23:47+00:00" }, { "name": "symfony/css-selector", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -3206,16 +2990,16 @@ }, { "name": "symfony/debug", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "5961d02d48828671f5d8a7805e06579d692f6ede" + "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/5961d02d48828671f5d8a7805e06579d692f6ede", - "reference": "5961d02d48828671f5d8a7805e06579d692f6ede", + "url": "https://api.github.com/repos/symfony/debug/zipball/e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e", + "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e", "shasum": "" }, "require": { @@ -3258,11 +3042,11 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" + "time": "2018-04-30T16:59:37+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -3323,9 +3107,58 @@ "homepage": "https://symfony.com", "time": "2018-04-06T07:35:43+00:00" }, + { + "name": "symfony/filesystem", + "version": "v4.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", + "reference": "5d2d655b2c72fc4d9bf7e9bf14f72a447b940f21", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2018-02-22T10:50:29+00:00" + }, { "name": "symfony/finder", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -3374,16 +3207,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "d0864a82e5891ab61d31eecbaa48bed5a09b8e6c" + "reference": "014487772c22d893168e5d628a13e882009fea29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d0864a82e5891ab61d31eecbaa48bed5a09b8e6c", - "reference": "d0864a82e5891ab61d31eecbaa48bed5a09b8e6c", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/014487772c22d893168e5d628a13e882009fea29", + "reference": "014487772c22d893168e5d628a13e882009fea29", "shasum": "" }, "require": { @@ -3423,20 +3256,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" + "time": "2018-04-30T01:05:59+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "6dd620d96d64456075536ffe3c6c4658dd689021" + "reference": "8333264b6de323ea27a08627d5396aa564fb9c25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6dd620d96d64456075536ffe3c6c4658dd689021", - "reference": "6dd620d96d64456075536ffe3c6c4658dd689021", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8333264b6de323ea27a08627d5396aa564fb9c25", + "reference": "8333264b6de323ea27a08627d5396aa564fb9c25", "shasum": "" }, "require": { @@ -3509,20 +3342,79 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-04-06T16:25:03+00:00" + "time": "2018-04-30T19:45:57+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "3296adf6a6454a050679cde90f95350ad604b171" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", + "reference": "3296adf6a6454a050679cde90f95350ad604b171", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.7.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422" + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/8eca20c8a369e069d4f4c2ac9895144112867422", - "reference": "8eca20c8a369e069d4f4c2ac9895144112867422", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", + "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", "shasum": "" }, "require": { @@ -3531,7 +3423,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -3564,11 +3456,11 @@ "portable", "shim" ], - "time": "2018-01-31T17:43:24+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/process", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -3617,16 +3509,16 @@ }, { "name": "symfony/routing", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0663036dd57dbfd4e9ff29f75bbd5dd3253ebe71" + "reference": "1dfbfdf060bbc80da8dedc062050052e694cd027" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0663036dd57dbfd4e9ff29f75bbd5dd3253ebe71", - "reference": "0663036dd57dbfd4e9ff29f75bbd5dd3253ebe71", + "url": "https://api.github.com/repos/symfony/routing/zipball/1dfbfdf060bbc80da8dedc062050052e694cd027", + "reference": "1dfbfdf060bbc80da8dedc062050052e694cd027", "shasum": "" }, "require": { @@ -3691,20 +3583,69 @@ "uri", "url" ], - "time": "2018-04-04T13:50:32+00:00" + "time": "2018-04-20T06:20:23+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v4.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6795ffa2f8eebedac77f045aa62c0c10b2763042", + "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2018-02-19T16:50:22+00:00" }, { "name": "symfony/translation", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938" + "reference": "ad3abf08eb3450491d8d76513100ef58194cd13e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e20a9b7f9f62cb33a11638b345c248e7d510c938", - "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938", + "url": "https://api.github.com/repos/symfony/translation/zipball/ad3abf08eb3450491d8d76513100ef58194cd13e", + "reference": "ad3abf08eb3450491d8d76513100ef58194cd13e", "shasum": "" }, "require": { @@ -3725,7 +3666,7 @@ "symfony/yaml": "~3.4|~4.0" }, "suggest": { - "psr/log": "To use logging capability in translator", + "psr/log-implementation": "To use logging capability in translator", "symfony/config": "", "symfony/yaml": "" }, @@ -3759,20 +3700,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" + "time": "2018-04-30T01:23:47+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.0.8", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "e1b4d008100f4d203cc38b0d793ad6252d8d8af0" + "reference": "3c34cf3f4bbac9e003d9325225e9ef1a49180a18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e1b4d008100f4d203cc38b0d793ad6252d8d8af0", - "reference": "e1b4d008100f4d203cc38b0d793ad6252d8d8af0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3c34cf3f4bbac9e003d9325225e9ef1a49180a18", + "reference": "3c34cf3f4bbac9e003d9325225e9ef1a49180a18", "shasum": "" }, "require": { @@ -3828,7 +3769,65 @@ "debug", "dump" ], - "time": "2018-04-04T05:10:37+00:00" + "time": "2018-04-26T16:12:06+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "275ad099e4cbe612a2acbca14a16dd1c5311324d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/275ad099e4cbe612a2acbca14a16dd1c5311324d", + "reference": "275ad099e4cbe612a2acbca14a16dd1c5311324d", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-04-08T08:49:08+00:00" }, { "name": "theseer/tokenizer", From 373a3922bbc95c16fa7b41d404d9a1d3b38c47b7 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 7 May 2018 10:55:06 +0530 Subject: [PATCH 31/35] Travis Cache Support --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cf68b15..fc10b66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,8 @@ after_success: - bash <(curl -s https://codecov.io/bash) -t 03ae5c0f-95ef-4671-a35b-0a9cea99f56c after_script: - - php vendor/bin/php-coveralls -v \ No newline at end of file + - php vendor/bin/php-coveralls -v + +cache: + directories: + - vendor \ No newline at end of file From a7eafc25456ac91c9accc7ca14698758b3307a4b Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 7 May 2018 11:57:04 +0530 Subject: [PATCH 32/35] Use proper DI --- src/Routing/BaseRouter.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Routing/BaseRouter.php b/src/Routing/BaseRouter.php index 7a433d0..ad6fe1a 100644 --- a/src/Routing/BaseRouter.php +++ b/src/Routing/BaseRouter.php @@ -20,11 +20,7 @@ class BaseRouter extends Router */ public function resource($name, $controller, array $options = []) { - if ($this->container && $this->container->bound('Asahasrabuddhe\LaravelAPI\Routing\ResourceRegistrar')) { - $registrar = $this->container->make('Asahasrabuddhe\LaravelAPI\Routing\ResourceRegistrar'); - } else { - $registrar = new ResourceRegistrar($this); - } + $registrar = app()->make(ResourceRegistrar::class); $registrar->register($name, $controller, $options); } From 9352038aef5e7e35feb16f8ea1eaad37cb94e35e Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 7 May 2018 11:57:20 +0530 Subject: [PATCH 33/35] Add config for custom version and api prefix --- tests/APITest.php | 42 +++++++++++++++++++++--------------------- tests/TestCase.php | 2 ++ 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/tests/APITest.php b/tests/APITest.php index 82218cd..b088d6d 100644 --- a/tests/APITest.php +++ b/tests/APITest.php @@ -7,7 +7,7 @@ class APITest extends TestCase /** @test */ public function test_get_all_users() { - $response = $this->call('GET', '/api/v1/users'); + $response = $this->call('GET', '/t_api/t1/users'); $this->assertEquals($response->status(), 200); $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ @@ -32,7 +32,7 @@ public function test_get_all_users() /** @test */ public function test_get_all_users_with_fields() { - $response = $this->call('GET', '/api/v1/users?fields=name,email'); + $response = $this->call('GET', '/t_api/t1/users?fields=name,email'); $this->assertEquals($response->status(), 200); $this->assertEquals('application/json', $response->headers->get('Content-Type')); $response->assertJsonStructure([ @@ -58,7 +58,7 @@ public function test_get_all_users_with_fields() /** @test */ public function test_get_all_users_with_related_fields_one_to_one() { - $response = $this->call('GET', '/api/v1/users?fields=name,email,address'); + $response = $this->call('GET', '/t_api/t1/users?fields=name,email,address'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -88,7 +88,7 @@ public function test_get_all_users_with_related_fields_one_to_one() /** @test */ public function test_get_all_users_with_related_fields_one_to_many() { - $response = $this->call('GET', '/api/v1/users?fields=name,email,posts'); + $response = $this->call('GET', '/t_api/t1/users?fields=name,email,posts'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -124,7 +124,7 @@ public function test_get_all_users_with_related_fields_one_to_many() /** @test */ public function test_get_all_users_with_second_level_relationships() { - $response = $this->call('GET', '/api/v1/users?fields=name,address,posts{title,content},posts:comments{content},posts:comments:author{name}'); + $response = $this->call('GET', '/t_api/t1/users?fields=name,address,posts{title,content},posts:comments{content},posts:comments:author{name}'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -169,7 +169,7 @@ public function test_get_all_users_with_second_level_relationships() /** @test */ public function test_get_all_users_with_filters() { - $response = $this->call('GET', '/api/v1/users?filters=id gt 5'); + $response = $this->call('GET', '/t_api/t1/users?filters=id gt 5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -197,7 +197,7 @@ public function test_get_all_users_with_filters() /** @test */ public function test_get_all_users_with_filters_returns_error_for_unfilterable_fields() { - $response = $this->call('GET', '/api/v1/users?filters=email lk "Luc"'); + $response = $this->call('GET', '/t_api/t1/users?filters=email lk "Luc"'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -212,7 +212,7 @@ public function test_get_all_users_with_filters_returns_error_for_unfilterable_f public function test_get_all_users_with_limit() { - $response = $this->call('GET', '/api/v1/users?limit=5'); + $response = $this->call('GET', '/t_api/t1/users?limit=5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -239,7 +239,7 @@ public function test_get_all_users_with_limit() public function test_get_all_users_with_limit_returns_error_for_invalid_limit() { - $response = $this->call('GET', '/api/v1/users?limit=0'); + $response = $this->call('GET', '/t_api/t1/users?limit=0'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -254,7 +254,7 @@ public function test_get_all_users_with_limit_returns_error_for_invalid_limit() public function test_get_all_users_with_limit_returns_error_for_negative_limit() { - $response = $this->call('GET', '/api/v1/users?limit=-5'); + $response = $this->call('GET', '/t_api/t1/users?limit=-5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -269,7 +269,7 @@ public function test_get_all_users_with_limit_returns_error_for_negative_limit() public function test_get_all_users_with_order() { - $response = $this->call('GET', '/api/v1/users?order=id desc'); + $response = $this->call('GET', '/t_api/t1/users?order=id desc'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -297,7 +297,7 @@ public function test_get_all_users_with_order() /** @test */ public function test_get_single_user() { - $response = $this->call('GET', '/api/v1/users/15'); + $response = $this->call('GET', '/t_api/t1/users/15'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -317,7 +317,7 @@ public function test_get_single_user() /** @test */ public function test_get_single_user_returns_error_for_users_that_do_not_exist() { - $response = $this->call('GET', '/api/v1/users/1500'); + $response = $this->call('GET', '/t_api/t1/users/1500'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 404); @@ -333,7 +333,7 @@ public function test_get_single_user_returns_error_for_users_that_do_not_exist() /** @test */ public function test_get_single_user_with_one_to_one_relation_endpoint() { - $response = $this->call('GET', '/api/v1/users/15/address'); + $response = $this->call('GET', '/t_api/t1/users/15/address'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -357,7 +357,7 @@ public function test_get_single_user_with_one_to_one_relation_endpoint() /** @test */ public function test_get_single_user_with_one_to_many_relation_endpoint() { - $response = $this->call('GET', '/api/v1/users/15/posts'); + $response = $this->call('GET', '/t_api/t1/users/15/posts'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -381,7 +381,7 @@ public function test_create_user() { $response = $this->call( 'POST', - '/api/v1/users', + '/t_api/t1/users', [ 'name' => 'Dummy User', 'email' => 'dummy@test.com', @@ -395,7 +395,7 @@ public function test_create_user() $response = $responseContent = null; // Verify newly created user - $response = $this->call('GET', '/api/v1/users/' . $id); + $response = $this->call('GET', '/t_api/t1/users/' . $id); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -413,7 +413,7 @@ public function test_update_user() { $response = $this->call( 'PUT', - '/api/v1/users/15', + '/t_api/t1/users/15', [ 'name' => 'Dummy1 User', 'email' => 'dummy1@test.com', @@ -424,7 +424,7 @@ public function test_update_user() $response = null; // Verify newly created user - $response = $this->call('GET', '/api/v1/users/15'); + $response = $this->call('GET', '/t_api/t1/users/15'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -439,10 +439,10 @@ public function test_update_user() public function test_delete_user() { - $response = $this->call('DELETE', '/api/v1/users/25'); + $response = $this->call('DELETE', '/t_api/t1/users/25'); $this->assertEquals(200, $response->status()); - $response = $this->call('GET', '/api/v1/users/25'); + $response = $this->call('GET', '/t_api/t1/users/25'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 404); diff --git a/tests/TestCase.php b/tests/TestCase.php index 31fe974..0635198 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -66,6 +66,8 @@ protected function getEnvironmentSetUp($app) 'prefix' => '', ]); $app['config']->set('api.perPage', 10); + $app['config']->set('api.prefix', 't_api'); + $app['config']->set('api.version', 't1'); } protected function migrateDatabase() From 265e118bfc04a0d134baa7df0d6d2d056576f6ad Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 7 May 2018 12:05:54 +0530 Subject: [PATCH 34/35] Improve Coverage for Routing --- src/Routing/BaseRouter.php | 6 +++++- tests/TestCase.php | 14 ++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Routing/BaseRouter.php b/src/Routing/BaseRouter.php index ad6fe1a..7a433d0 100644 --- a/src/Routing/BaseRouter.php +++ b/src/Routing/BaseRouter.php @@ -20,7 +20,11 @@ class BaseRouter extends Router */ public function resource($name, $controller, array $options = []) { - $registrar = app()->make(ResourceRegistrar::class); + if ($this->container && $this->container->bound('Asahasrabuddhe\LaravelAPI\Routing\ResourceRegistrar')) { + $registrar = $this->container->make('Asahasrabuddhe\LaravelAPI\Routing\ResourceRegistrar'); + } else { + $registrar = new ResourceRegistrar($this); + } $registrar->register($name, $controller, $options); } diff --git a/tests/TestCase.php b/tests/TestCase.php index 0635198..813987e 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -10,9 +10,6 @@ use Orchestra\Testbench\TestCase as BaseTestCase; use Asahasrabuddhe\LaravelAPI\Tests\Models\Address; use Asahasrabuddhe\LaravelAPI\Tests\Models\Comment; -use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\PostController; -use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\UserController; -use Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers\AddressController; use Asahasrabuddhe\LaravelAPI\Facades\ApiRoute; abstract class TestCase extends BaseTestCase @@ -45,9 +42,14 @@ protected function setUp() $this->seedDatabase(); - ApiRoute::resource('users', UserController::class); - ApiRoute::resource('posts', PostController::class); - ApiRoute::resource('comments', CommentController::class); + ApiRoute::group([ + 'middleware' => ['api'], + 'namespace' => 'Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers' + ], function() { + ApiRoute::resource('users', 'UserController'); + ApiRoute::resource('posts', 'PostController'); + ApiRoute::resource('comments', 'CommentController'); + }); } /** From 6a676c1306afac1115ef252a3c29c6944c7526a9 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrbauddhe Date: Sat, 12 May 2018 08:11:03 +0000 Subject: [PATCH 35/35] Apply fixes from StyleCI --- tests/APITest.php | 30 +++++++++++++++--------------- tests/TestCase.php | 7 +++---- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/tests/APITest.php b/tests/APITest.php index b088d6d..2cf67cf 100644 --- a/tests/APITest.php +++ b/tests/APITest.php @@ -58,7 +58,7 @@ public function test_get_all_users_with_fields() /** @test */ public function test_get_all_users_with_related_fields_one_to_one() { - $response = $this->call('GET', '/t_api/t1/users?fields=name,email,address'); + $response = $this->call('GET', '/t_api/t1/users?fields=name,email,address'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -88,7 +88,7 @@ public function test_get_all_users_with_related_fields_one_to_one() /** @test */ public function test_get_all_users_with_related_fields_one_to_many() { - $response = $this->call('GET', '/t_api/t1/users?fields=name,email,posts'); + $response = $this->call('GET', '/t_api/t1/users?fields=name,email,posts'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -169,7 +169,7 @@ public function test_get_all_users_with_second_level_relationships() /** @test */ public function test_get_all_users_with_filters() { - $response = $this->call('GET', '/t_api/t1/users?filters=id gt 5'); + $response = $this->call('GET', '/t_api/t1/users?filters=id gt 5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -197,7 +197,7 @@ public function test_get_all_users_with_filters() /** @test */ public function test_get_all_users_with_filters_returns_error_for_unfilterable_fields() { - $response = $this->call('GET', '/t_api/t1/users?filters=email lk "Luc"'); + $response = $this->call('GET', '/t_api/t1/users?filters=email lk "Luc"'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -212,7 +212,7 @@ public function test_get_all_users_with_filters_returns_error_for_unfilterable_f public function test_get_all_users_with_limit() { - $response = $this->call('GET', '/t_api/t1/users?limit=5'); + $response = $this->call('GET', '/t_api/t1/users?limit=5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -239,7 +239,7 @@ public function test_get_all_users_with_limit() public function test_get_all_users_with_limit_returns_error_for_invalid_limit() { - $response = $this->call('GET', '/t_api/t1/users?limit=0'); + $response = $this->call('GET', '/t_api/t1/users?limit=0'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -254,7 +254,7 @@ public function test_get_all_users_with_limit_returns_error_for_invalid_limit() public function test_get_all_users_with_limit_returns_error_for_negative_limit() { - $response = $this->call('GET', '/t_api/t1/users?limit=-5'); + $response = $this->call('GET', '/t_api/t1/users?limit=-5'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 400); @@ -269,7 +269,7 @@ public function test_get_all_users_with_limit_returns_error_for_negative_limit() public function test_get_all_users_with_order() { - $response = $this->call('GET', '/t_api/t1/users?order=id desc'); + $response = $this->call('GET', '/t_api/t1/users?order=id desc'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -297,7 +297,7 @@ public function test_get_all_users_with_order() /** @test */ public function test_get_single_user() { - $response = $this->call('GET', '/t_api/t1/users/15'); + $response = $this->call('GET', '/t_api/t1/users/15'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -317,7 +317,7 @@ public function test_get_single_user() /** @test */ public function test_get_single_user_returns_error_for_users_that_do_not_exist() { - $response = $this->call('GET', '/t_api/t1/users/1500'); + $response = $this->call('GET', '/t_api/t1/users/1500'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 404); @@ -333,7 +333,7 @@ public function test_get_single_user_returns_error_for_users_that_do_not_exist() /** @test */ public function test_get_single_user_with_one_to_one_relation_endpoint() { - $response = $this->call('GET', '/t_api/t1/users/15/address'); + $response = $this->call('GET', '/t_api/t1/users/15/address'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -357,7 +357,7 @@ public function test_get_single_user_with_one_to_one_relation_endpoint() /** @test */ public function test_get_single_user_with_one_to_many_relation_endpoint() { - $response = $this->call('GET', '/t_api/t1/users/15/posts'); + $response = $this->call('GET', '/t_api/t1/users/15/posts'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -395,7 +395,7 @@ public function test_create_user() $response = $responseContent = null; // Verify newly created user - $response = $this->call('GET', '/t_api/t1/users/' . $id); + $response = $this->call('GET', '/t_api/t1/users/' . $id); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -424,7 +424,7 @@ public function test_update_user() $response = null; // Verify newly created user - $response = $this->call('GET', '/t_api/t1/users/15'); + $response = $this->call('GET', '/t_api/t1/users/15'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 200); @@ -442,7 +442,7 @@ public function test_delete_user() $response = $this->call('DELETE', '/t_api/t1/users/25'); $this->assertEquals(200, $response->status()); - $response = $this->call('GET', '/t_api/t1/users/25'); + $response = $this->call('GET', '/t_api/t1/users/25'); $responseContent = json_decode($response->getContent()); $this->assertEquals($response->status(), 404); diff --git a/tests/TestCase.php b/tests/TestCase.php index 813987e..b270c80 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -4,13 +4,12 @@ use Illuminate\Support\Facades\DB; use Illuminate\Database\Schema\Blueprint; +use Asahasrabuddhe\LaravelAPI\Facades\ApiRoute; use Asahasrabuddhe\LaravelAPI\Tests\Models\Post; use Asahasrabuddhe\LaravelAPI\Tests\Models\User; -use Asahasrabuddhe\LaravelAPI\Routing\BaseRouter; use Orchestra\Testbench\TestCase as BaseTestCase; use Asahasrabuddhe\LaravelAPI\Tests\Models\Address; use Asahasrabuddhe\LaravelAPI\Tests\Models\Comment; -use Asahasrabuddhe\LaravelAPI\Facades\ApiRoute; abstract class TestCase extends BaseTestCase { @@ -44,8 +43,8 @@ protected function setUp() ApiRoute::group([ 'middleware' => ['api'], - 'namespace' => 'Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers' - ], function() { + 'namespace' => 'Asahasrabuddhe\LaravelAPI\Tests\Http\Controllers', + ], function () { ApiRoute::resource('users', 'UserController'); ApiRoute::resource('posts', 'PostController'); ApiRoute::resource('comments', 'CommentController');