diff --git a/app/DatabaseHandler.php b/app/DatabaseHandler.php new file mode 100644 index 0000000..206f445 --- /dev/null +++ b/app/DatabaseHandler.php @@ -0,0 +1,26 @@ +where('fingerprint', $fingerprint)) { + return DB::table($table)->get(); + } + + DB::table('anime')->insert($data); + } + + public static function getMappedTableName(string $controller) + { + return config('controller-to-table-mapping.'.$controller); + } + + public function prepare(array $response) + { + } +} \ No newline at end of file diff --git a/app/Exceptions/GithubReport.php b/app/Exceptions/GithubReport.php index e2a552e..e13af7e 100755 --- a/app/Exceptions/GithubReport.php +++ b/app/Exceptions/GithubReport.php @@ -82,10 +82,12 @@ class GithubReport $report->jikanVersion = Versions::getVersion('jikan-me/jikan'); $report->phpVersion = PHP_VERSION; - try { - $report->redisRunning = trim(app('redis')->ping()) === 'PONG' ? "Connected" : "Disconnected"; - } catch (ConnectionException $e) { - $report->redisRunning = false; + if (env('CACHING') && env('CACHE_DRIVER') === 'redis') { + try { + $report->redisRunning = trim(app('redis')->ping()) === 'PONG' ? "Connected" : "Disconnected"; + } catch (ConnectionException $e) { + $report->redisRunning = false; + } } $report->instanceType = 'UNKNOWN'; diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index f938659..766e6f8 100755 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -161,6 +161,10 @@ class Handler extends ExceptionHandler */ private function set404Cache(Request $request, BadResponseException $e) { + if (!env('CACHING')) { + return; + } + $fingerprint = "request:404:".sha1(env('APP_URL') . $request->getRequestUri()); if (Cache::has($fingerprint)) { diff --git a/app/Http/Controllers/V4/Controller.php b/app/Http/Controllers/V4/Controller.php index b75bf31..16a7ed9 100755 --- a/app/Http/Controllers/V4/Controller.php +++ b/app/Http/Controllers/V4/Controller.php @@ -31,7 +31,7 @@ class Controller extends BaseController */ public function __construct(MalClient $jikan) { - $this->serializer = SerializerFactory::createV3(); + $this->serializer = SerializerFactory::createV4(); $this->jikan = $jikan; } } diff --git a/app/Http/Controllers/V4/MangaController.php b/app/Http/Controllers/V4/MangaController.php index 64d0dc4..a1aafdc 100755 --- a/app/Http/Controllers/V4/MangaController.php +++ b/app/Http/Controllers/V4/MangaController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers\V4; +use App\Http\HttpHelper; use Jikan\Request\Manga\MangaCharactersRequest; use Jikan\Request\Manga\MangaForumRequest; use Jikan\Request\Manga\MangaMoreInfoRequest; @@ -23,9 +24,8 @@ class MangaController extends Controller $mangaSerialized = HttpHelper::serializeEmptyObjectsControllerLevel( json_decode($mangaSerialized, true) ); - $mangaSerialized = json_encode($mangaSerialized); - return response($this->serializer->serialize($manga, 'json')); + return response($this->serializer->serialize($mangaSerialized, 'json')); } public function characters(int $id) @@ -61,7 +61,7 @@ class MangaController extends Controller public function moreInfo(int $id) { $manga = ['moreinfo' => $this->jikan->getMangaMoreInfo(new MangaMoreInfoRequest($id))]; - return response(json_encode($manga)); + return response($this->serializer->serialize($manga, 'json')); } public function recommendations(int $id) diff --git a/app/Http/Controllers/V4/UserController.php b/app/Http/Controllers/V4/UserController.php index c81302a..bd37a59 100755 --- a/app/Http/Controllers/V4/UserController.php +++ b/app/Http/Controllers/V4/UserController.php @@ -16,8 +16,8 @@ class UserController extends Controller { public function profile(string $username) { - $person = $this->jikan->getUserProfile(new UserProfileRequest($username)); - return response($this->serializer->serialize($person, 'json')); + $user = $this->jikan->getUserProfile(new UserProfileRequest($username)); + return response($this->serializer->serialize($user, 'json')); } public function history(string $username, ?string $type = null) diff --git a/app/Http/Middleware/JikanResponseHandler.php b/app/Http/Middleware/CacheResolver.php old mode 100755 new mode 100644 similarity index 92% rename from app/Http/Middleware/JikanResponseHandler.php rename to app/Http/Middleware/CacheResolver.php index 7446050..cd0189e --- a/app/Http/Middleware/JikanResponseHandler.php +++ b/app/Http/Middleware/CacheResolver.php @@ -1,19 +1,5 @@ header('auth') === env('APP_KEY')) { return $next($request); } diff --git a/app/Http/Middleware/DatabaseResolver.php b/app/Http/Middleware/DatabaseResolver.php new file mode 100644 index 0000000..0e82d88 --- /dev/null +++ b/app/Http/Middleware/DatabaseResolver.php @@ -0,0 +1,166 @@ +header('auth') === env('APP_KEY')) { + return $next($request); + } + + if (empty($request->segments())) { + return $next($request); + } + + if (!isset($request->segments()[1])) { + return $next($request); + } + + if (\in_array('meta', $request->segments())) { + return $next($request); + } + + $this->requestUriHash = HttpHelper::getRequestUriHash($request); + $this->requestType = HttpHelper::requestType($request); + $this->requestCacheTtl = HttpHelper::requestCacheExpiry($this->requestType); + $this->fingerprint = HttpHelper::resolveRequestFingerprint($request); + $this->cacheExpiryFingerprint = "ttl:{$this->fingerprint}"; + + $this->route = explode('\\', $request->route()[1]['uses']); + $this->route = end($this->route); + + $db = new DatabaseHandler(); + $table = $db::getMappedTableName($this->route); + + $this->requestCached = DB::table($table)->where('request_hash', $this->fingerprint)->exists(); + + // Cache if it doesn't exist + if (!$this->requestCached) { + $response = $next($request); + + if (HttpHelper::hasError($response)) { + return $response; + } + + DB::table($table)->insert(array_merge( + [ + 'expireAfterSeconds' => $this->requestCacheTtl, + 'request_hash' => $this->fingerprint + ], + json_decode($response->original, true) + )); + } + + + // Return response + $meta = $this->generateMeta($request); + + $cache = DB::table($table)->where('request_hash', $this->fingerprint)->get(); + $cacheMutable = json_decode($cache, true)[0]; + $cacheMutable = $this->cacheMutation($cacheMutable); + + $response = array_merge($meta, $cacheMutable); + unset($response['createdAt'], $response['expireAfterSeconds'], $response['_id']); + + // Build and return response + return response() + ->json( + $response + ) + ->setEtag( + md5($cache) + ) + ->withHeaders([ + 'X-Request-Hash' => $this->fingerprint, + 'X-Request-Cached' => $this->requestCached, + 'X-Request-Cache-Ttl' => (int) $this->requestCacheExpiry - time() + ]) + ->setExpires((new \DateTime())->setTimestamp($this->requestCacheExpiry)); + } + + private function generateMeta(Request $request) : array + { + $version = HttpHelper::requestAPIVersion($request); + + $meta = [ + 'request_hash' => $this->fingerprint, + 'request_cached' => $this->requestCached, + 'request_cache_expiry' => (int) $this->requestCacheExpiry - time() + ]; + + switch ($version) { + case 2: + $meta = array_merge([ + 'DEPRECIATION_NOTICE' => 'THIS VERSION WILL BE DEPRECIATED ON JULY 01st, 2019.', + ], $meta); + break; + case 4: + // remove cache data from JSON response as it's sent as headers + unset($meta['request_cached'], $meta['request_cache_expiry']); + $meta = array_merge([ + 'DEVELOPMENT_NOTICE' => 'THIS VERSION IS IN TESTING. DO NOT USE FOR PRODUCTION.', + 'MIGRATION' => 'https://github.com/jikan-me/jikan-rest/blob/master/MIGRATION.MD', + ], $meta); + break; + } + + return $meta; + } + + private function cacheMutation(array $data) : array + { + if (!($this->requestType === 'anime' || $this->requestType === 'manga')) { + return $data; + } + + // Fix JSON response for empty related object + if (isset($data['related']) && \count($data['related']) === 0) { + $data['related'] = new \stdClass(); + } + + return $data; + } +} diff --git a/app/Http/Middleware/EtagMiddleware.php b/app/Http/Middleware/EtagMiddleware.php index f91cc6b..9d3d674 100644 --- a/app/Http/Middleware/EtagMiddleware.php +++ b/app/Http/Middleware/EtagMiddleware.php @@ -17,6 +17,10 @@ class EtagMiddleware */ public function handle($request, Closure $next) { + if (!env('CACHING')) { + return $next($request); + } + if ($request->header('auth') === env('APP_KEY')) { return $next($request); } diff --git a/app/Http/Middleware/JikanResponseLegacy.php b/app/Http/Middleware/JikanResponseLegacy.php index bcfc9eb..90d0411 100755 --- a/app/Http/Middleware/JikanResponseLegacy.php +++ b/app/Http/Middleware/JikanResponseLegacy.php @@ -1,14 +1,5 @@ header('auth') === env('APP_KEY')) { return $next($request); } + if (!env('CACHING')) { + return $next($request); + } + // Microcaching should not work alongside redis caching if (!env('MICROCACHING', false) || env('CACHE_DRIVER', 'file') === 'redis') { return $next($request); diff --git a/app/Jobs/UpdateCacheJob.php b/app/Jobs/UpdateCacheJob.php index 90bb82a..b2ff4b8 100755 --- a/app/Jobs/UpdateCacheJob.php +++ b/app/Jobs/UpdateCacheJob.php @@ -71,7 +71,7 @@ class UpdateCacheJob extends Job ); $cache = json_decode($response->getBody()->getContents(), true); - unset($cache['request_hash'], $cache['request_cached'], $cache['request_cache_expiry']); + unset($cache['fingerprint'], $cache['request_cached'], $cache['request_cache_expiry']); $cache = json_encode($cache); diff --git a/app/Providers/SerializerFactory.php b/app/Providers/SerializerFactory.php index fcf54a9..d154283 100755 --- a/app/Providers/SerializerFactory.php +++ b/app/Providers/SerializerFactory.php @@ -77,6 +77,40 @@ class SerializerFactory return $serializer; } + public static function createV4(): Serializer + { + $serializer = (new SerializerBuilder()) + ->addMetadataDir(__DIR__.'/../../storage/app/metadata.v4') + ->configureHandlers( + function (HandlerRegistry $registry) { + $registry->registerHandler( + 'serialization', + MalUrl::class, + 'json', + \Closure::fromCallable('self::convertMalUrl') + ); + + $registry->registerHandler( + 'serialization', + DateRange::class, + 'json', + \Closure::fromCallable('self::convertDateRange') + ); + + $registry->registerHandler( + 'serialization', + \DateTimeImmutable::class, + 'json', + \Closure::fromCallable('self::convertDateTimeImmutable') + ); + } + ) + ->build(); + $serializer->setSerializationContextFactory(new SerializationContextFactory()); + + return $serializer; + } + private static function convertMalUrl($visitor, MalUrl $obj, array $type): array { return [ diff --git a/bootstrap/app.php b/bootstrap/app.php index 610741f..3e67924 100755 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -31,6 +31,8 @@ $app = new Laravel\Lumen\Application( realpath(__DIR__.'/../') ); +$app->register(Jenssegers\Mongodb\MongodbServiceProvider::class); + $app->withFacades(); $app->withEloquent(); @@ -71,10 +73,11 @@ $app->routeMiddleware([ 'blacklist' => App\Http\Middleware\Blacklist::class, 'slave-auth' => App\Http\Middleware\SlaveAuthentication::class, 'meta' => App\Http\Middleware\Meta::class, - 'jikan-response' => App\Http\Middleware\JikanResponseHandler::class, + 'cache-resolver' => App\Http\Middleware\CacheResolver::class, 'throttle' => App\Http\Middleware\Throttle::class, 'etag' => \App\Http\Middleware\EtagMiddleware::class, - 'microcaching' => \App\Http\Middleware\MicroCaching::class + 'microcaching' => \App\Http\Middleware\MicroCaching::class, + 'database-resolver' => \App\Http\Middleware\DatabaseResolver::class ]); /* @@ -90,9 +93,13 @@ $app->routeMiddleware([ $app->configure('database'); $app->configure('queue'); -$app->configure('cache'); +$app->configure('controller-to-table-mapping'); + +if (env('CACHING')) { + $app->configure('cache'); + $app->register(Illuminate\Redis\RedisServiceProvider::class); +} -$app->register(Illuminate\Redis\RedisServiceProvider::class); $app->register(Flipbox\LumenGenerator\LumenGeneratorServiceProvider::class); $guzzleClient = new \GuzzleHttp\Client(); @@ -119,13 +126,14 @@ $app->instance('JikanParser', $jikan); */ $commonMiddleware = [ - 'blacklist', - 'slave-auth', - 'meta', - 'etag', - 'microcaching', - 'jikan-response', - 'throttle' +// 'blacklist', +// 'slave-auth', +// 'meta', +// 'etag', + 'database-resolver', +// 'microcaching', +// 'cache-resolver', +// 'throttle' ]; $app->router->group( diff --git a/composer.json b/composer.json index 65c737e..b8fd5ff 100755 --- a/composer.json +++ b/composer.json @@ -6,20 +6,22 @@ "type": "project", "require": { "php": "^7.2.5", - "laravel/lumen-framework": "^7.0", - "vlucas/phpdotenv": "^4", - "danielmewes/php-rql": "dev-master", - "illuminate/redis": "^7", - "predis/predis": "^1.1", - "voku/anti-xss": "^4.0", - "divineomega/cachetphp": "^0.2.0", - "jms/serializer": "^1.13", - "symfony/yaml": "^4.1", - "fabpot/goutte": "3.2.3", - "jikan-me/jikan": "^3.0", "ext-json": "*", + "ext-mongodb": "*", + "danielmewes/php-rql": "dev-master", + "divineomega/cachetphp": "^0.2.0", + "fabpot/goutte": "3.2.3", + "flipbox/lumen-generator": "^6", + "illuminate/redis": "^7", + "jenssegers/mongodb": "^4.0", + "jikan-me/jikan": "^3.0", + "jms/serializer": "^1.13", + "laravel/lumen-framework": "^7.0", "ocramius/package-versions": "^1.4", - "flipbox/lumen-generator": "^6" + "predis/predis": "^1.1", + "symfony/yaml": "^4.1", + "vlucas/phpdotenv": "^4", + "voku/anti-xss": "^4.0" }, "require-dev": { "fzaninotto/faker": "^1.9.1", diff --git a/composer.lock b/composer.lock index 9667a58..ef42518 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "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": "638207511d5aea2a0a6918af8936112f", + "content-hash": "6d42be876cc0e4c456de620bd8aa6321", "packages": [ { "name": "brick/math", @@ -308,33 +308,37 @@ }, { "name": "doctrine/inflector", - "version": "1.3.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" + "reference": "18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7", + "reference": "18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -363,15 +367,21 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "keywords": [ "inflection", - "pluralize", - "singularize", - "string" + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" ], - "time": "2019-10-30T19:59:35+00:00" + "time": "2020-05-11T11:25:59+00:00" }, { "name": "doctrine/instantiator", @@ -660,16 +670,16 @@ }, { "name": "flipbox/lumen-generator", - "version": "6.0.8", + "version": "6.0.10", "source": { "type": "git", "url": "https://github.com/flipboxstudio/lumen-generator.git", - "reference": "a6791a4b9f37ca9f6d920b2834f03b6feecca66d" + "reference": "8a93f0b96c87122f56be008aa5f3b47e810f2fe5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/flipboxstudio/lumen-generator/zipball/a6791a4b9f37ca9f6d920b2834f03b6feecca66d", - "reference": "a6791a4b9f37ca9f6d920b2834f03b6feecca66d", + "url": "https://api.github.com/repos/flipboxstudio/lumen-generator/zipball/8a93f0b96c87122f56be008aa5f3b47e810f2fe5", + "reference": "8a93f0b96c87122f56be008aa5f3b47e810f2fe5", "shasum": "" }, "require": { @@ -695,7 +705,7 @@ } ], "description": "A Lumen Generator You Are Missing", - "time": "2020-04-06T09:08:14+00:00" + "time": "2020-05-12T12:20:17+00:00" }, { "name": "guzzlehttp/guzzle", @@ -888,7 +898,7 @@ }, { "name": "illuminate/auth", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/auth.git", @@ -939,7 +949,7 @@ }, { "name": "illuminate/broadcasting", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/broadcasting.git", @@ -990,7 +1000,7 @@ }, { "name": "illuminate/bus", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/bus.git", @@ -1038,16 +1048,16 @@ }, { "name": "illuminate/cache", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/cache.git", - "reference": "babc18be417aaa2b8a71fdabbb818a818ede0970" + "reference": "88ba9ccf6c9373ecf4cf39f43b4e6f3f313d8bab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/babc18be417aaa2b8a71fdabbb818a818ede0970", - "reference": "babc18be417aaa2b8a71fdabbb818a818ede0970", + "url": "https://api.github.com/repos/illuminate/cache/zipball/88ba9ccf6c9373ecf4cf39f43b4e6f3f313d8bab", + "reference": "88ba9ccf6c9373ecf4cf39f43b4e6f3f313d8bab", "shasum": "" }, "require": { @@ -1085,11 +1095,11 @@ ], "description": "The Illuminate Cache package.", "homepage": "https://laravel.com", - "time": "2020-03-09T13:23:43+00:00" + "time": "2020-05-08T20:55:59+00:00" }, { "name": "illuminate/config", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/config.git", @@ -1133,16 +1143,16 @@ }, { "name": "illuminate/console", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/console.git", - "reference": "3056c8d5069115c0bc86a5dc70b22710d427e259" + "reference": "7d6f2543a50609ad059316fda93fddc0d728fdf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/3056c8d5069115c0bc86a5dc70b22710d427e259", - "reference": "3056c8d5069115c0bc86a5dc70b22710d427e259", + "url": "https://api.github.com/repos/illuminate/console/zipball/7d6f2543a50609ad059316fda93fddc0d728fdf1", + "reference": "7d6f2543a50609ad059316fda93fddc0d728fdf1", "shasum": "" }, "require": { @@ -1183,11 +1193,11 @@ ], "description": "The Illuminate Console package.", "homepage": "https://laravel.com", - "time": "2020-04-24T09:01:47+00:00" + "time": "2020-05-03T16:42:53+00:00" }, { "name": "illuminate/container", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", @@ -1231,16 +1241,16 @@ }, { "name": "illuminate/contracts", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "69a40779d8fc43e3f43da973b9c0c20bdbd81203" + "reference": "5681c90368ffafaaa2e12c42112e344281466f23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/69a40779d8fc43e3f43da973b9c0c20bdbd81203", - "reference": "69a40779d8fc43e3f43da973b9c0c20bdbd81203", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/5681c90368ffafaaa2e12c42112e344281466f23", + "reference": "5681c90368ffafaaa2e12c42112e344281466f23", "shasum": "" }, "require": { @@ -1271,20 +1281,20 @@ ], "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com", - "time": "2020-04-09T15:01:22+00:00" + "time": "2020-05-06T13:37:50+00:00" }, { "name": "illuminate/database", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/database.git", - "reference": "f6612491482825e39fa21259bb630b1955728697" + "reference": "21ed76da138a943b1e3e94decf070699f7f4020c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/f6612491482825e39fa21259bb630b1955728697", - "reference": "f6612491482825e39fa21259bb630b1955728697", + "url": "https://api.github.com/repos/illuminate/database/zipball/21ed76da138a943b1e3e94decf070699f7f4020c", + "reference": "21ed76da138a943b1e3e94decf070699f7f4020c", "shasum": "" }, "require": { @@ -1333,11 +1343,11 @@ "orm", "sql" ], - "time": "2020-04-24T16:48:51+00:00" + "time": "2020-05-12T09:27:51+00:00" }, { "name": "illuminate/encryption", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/encryption.git", @@ -1384,7 +1394,7 @@ }, { "name": "illuminate/events", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", @@ -1429,7 +1439,7 @@ }, { "name": "illuminate/filesystem", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", @@ -1482,7 +1492,7 @@ }, { "name": "illuminate/hashing", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/hashing.git", @@ -1526,16 +1536,16 @@ }, { "name": "illuminate/http", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/http.git", - "reference": "d9f6088b0296fa41c0a4afa6a2ec27a156d4917e" + "reference": "e1ea16fbc835c0cb9461457aea49b04dad593c2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/d9f6088b0296fa41c0a4afa6a2ec27a156d4917e", - "reference": "d9f6088b0296fa41c0a4afa6a2ec27a156d4917e", + "url": "https://api.github.com/repos/illuminate/http/zipball/e1ea16fbc835c0cb9461457aea49b04dad593c2e", + "reference": "e1ea16fbc835c0cb9461457aea49b04dad593c2e", "shasum": "" }, "require": { @@ -1574,11 +1584,11 @@ ], "description": "The Illuminate Http package.", "homepage": "https://laravel.com", - "time": "2020-04-24T17:19:43+00:00" + "time": "2020-05-12T14:31:35+00:00" }, { "name": "illuminate/log", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/log.git", @@ -1623,16 +1633,16 @@ }, { "name": "illuminate/pagination", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/pagination.git", - "reference": "e25872e11652eb8cd22f6949c4cbb968e7849c6e" + "reference": "55a6a2c2510e2e339d4f1c85a0a27b950e9394fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/pagination/zipball/e25872e11652eb8cd22f6949c4cbb968e7849c6e", - "reference": "e25872e11652eb8cd22f6949c4cbb968e7849c6e", + "url": "https://api.github.com/repos/illuminate/pagination/zipball/55a6a2c2510e2e339d4f1c85a0a27b950e9394fd", + "reference": "55a6a2c2510e2e339d4f1c85a0a27b950e9394fd", "shasum": "" }, "require": { @@ -1664,11 +1674,11 @@ ], "description": "The Illuminate Pagination package.", "homepage": "https://laravel.com", - "time": "2020-04-06T13:31:42+00:00" + "time": "2020-05-11T14:27:15+00:00" }, { "name": "illuminate/pipeline", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/pipeline.git", @@ -1712,7 +1722,7 @@ }, { "name": "illuminate/queue", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/queue.git", @@ -1772,7 +1782,7 @@ }, { "name": "illuminate/redis", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/redis.git", @@ -1820,16 +1830,16 @@ }, { "name": "illuminate/session", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/session.git", - "reference": "4285f5208e0a59286763c591281d5d6e66e66b84" + "reference": "84433173ff3f68edf88ec4e33df4d5fed7f52d94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/session/zipball/4285f5208e0a59286763c591281d5d6e66e66b84", - "reference": "4285f5208e0a59286763c591281d5d6e66e66b84", + "url": "https://api.github.com/repos/illuminate/session/zipball/84433173ff3f68edf88ec4e33df4d5fed7f52d94", + "reference": "84433173ff3f68edf88ec4e33df4d5fed7f52d94", "shasum": "" }, "require": { @@ -1867,24 +1877,24 @@ ], "description": "The Illuminate Session package.", "homepage": "https://laravel.com", - "time": "2020-01-07T13:49:44+00:00" + "time": "2020-05-04T21:09:16+00:00" }, { "name": "illuminate/support", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "8cf661b620279503f2ca64447de04a34624a7d5a" + "reference": "5458d0d0048f185b3d4a911e5d21d2bb2fb336ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/8cf661b620279503f2ca64447de04a34624a7d5a", - "reference": "8cf661b620279503f2ca64447de04a34624a7d5a", + "url": "https://api.github.com/repos/illuminate/support/zipball/5458d0d0048f185b3d4a911e5d21d2bb2fb336ca", + "reference": "5458d0d0048f185b3d4a911e5d21d2bb2fb336ca", "shasum": "" }, "require": { - "doctrine/inflector": "^1.1", + "doctrine/inflector": "^1.4|^2.0", "ext-json": "*", "ext-mbstring": "*", "illuminate/contracts": "^7.0", @@ -1929,20 +1939,20 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2020-04-23T17:41:14+00:00" + "time": "2020-05-12T14:31:35+00:00" }, { "name": "illuminate/testing", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/testing.git", - "reference": "5ec43e2778a5454b31b886f2ed4f4b2d291419fd" + "reference": "b155126294326f0178d13321a99a018287992061" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/testing/zipball/5ec43e2778a5454b31b886f2ed4f4b2d291419fd", - "reference": "5ec43e2778a5454b31b886f2ed4f4b2d291419fd", + "url": "https://api.github.com/repos/illuminate/testing/zipball/b155126294326f0178d13321a99a018287992061", + "reference": "b155126294326f0178d13321a99a018287992061", "shasum": "" }, "require": { @@ -1980,11 +1990,11 @@ ], "description": "The Illuminate Testing package.", "homepage": "https://laravel.com", - "time": "2020-04-16T17:12:54+00:00" + "time": "2020-05-11T14:22:05+00:00" }, { "name": "illuminate/translation", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/translation.git", @@ -2030,16 +2040,16 @@ }, { "name": "illuminate/validation", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/validation.git", - "reference": "24cf7ff8e4a274a42eb86c94796dc01dec9e5760" + "reference": "01ad907e208ce52039d024e72562d8ed19b9342b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/validation/zipball/24cf7ff8e4a274a42eb86c94796dc01dec9e5760", - "reference": "24cf7ff8e4a274a42eb86c94796dc01dec9e5760", + "url": "https://api.github.com/repos/illuminate/validation/zipball/01ad907e208ce52039d024e72562d8ed19b9342b", + "reference": "01ad907e208ce52039d024e72562d8ed19b9342b", "shasum": "" }, "require": { @@ -2079,20 +2089,20 @@ ], "description": "The Illuminate Validation package.", "homepage": "https://laravel.com", - "time": "2020-04-23T19:11:28+00:00" + "time": "2020-05-12T14:19:28+00:00" }, { "name": "illuminate/view", - "version": "v7.8.1", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "ba94a763eabc1728263efc5f248ee881ba00cd0a" + "reference": "5100e8f18a94f145e7f076511b76966b3351431a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/ba94a763eabc1728263efc5f248ee881ba00cd0a", - "reference": "ba94a763eabc1728263efc5f248ee881ba00cd0a", + "url": "https://api.github.com/repos/illuminate/view/zipball/5100e8f18a94f145e7f076511b76966b3351431a", + "reference": "5100e8f18a94f145e7f076511b76966b3351431a", "shasum": "" }, "require": { @@ -2127,20 +2137,89 @@ ], "description": "The Illuminate View package.", "homepage": "https://laravel.com", - "time": "2020-04-13T14:19:00+00:00" + "time": "2020-05-11T14:03:04+00:00" }, { - "name": "jikan-me/jikan", - "version": "v3.0.0-alpha.1", + "name": "jenssegers/mongodb", + "version": "4.0.0-alpha.1", "source": { "type": "git", - "url": "https://github.com/jikan-me/jikan.git", - "reference": "b1d374dda7d928a209307323c9e1812575bfa21a" + "url": "https://github.com/jenssegers/laravel-mongodb.git", + "reference": "ec89233a1892a86234731368578e445b9f07c6a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jikan-me/jikan/zipball/b1d374dda7d928a209307323c9e1812575bfa21a", - "reference": "b1d374dda7d928a209307323c9e1812575bfa21a", + "url": "https://api.github.com/repos/jenssegers/laravel-mongodb/zipball/ec89233a1892a86234731368578e445b9f07c6a6", + "reference": "ec89233a1892a86234731368578e445b9f07c6a6", + "shasum": "" + }, + "require": { + "illuminate/container": "^7.0", + "illuminate/database": "^7.0", + "illuminate/events": "^7.0", + "illuminate/support": "^7.0", + "mongodb/mongodb": "^1.6" + }, + "require-dev": { + "cedx/coveralls": "^11.2", + "doctrine/dbal": "^2.6", + "mockery/mockery": "^1.3.1", + "orchestra/testbench": "^5.0", + "phpunit/phpunit": "^8.4" + }, + "suggest": { + "jenssegers/mongodb-sentry": "Add Sentry support to Laravel-MongoDB", + "jenssegers/mongodb-session": "Add MongoDB session support to Laravel-MongoDB" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Jenssegers\\Mongodb\\MongodbServiceProvider", + "Jenssegers\\Mongodb\\MongodbQueueServiceProvider" + ] + } + }, + "autoload": { + "psr-0": { + "Jenssegers\\Mongodb": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jens Segers", + "homepage": "https://jenssegers.com" + } + ], + "description": "A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)", + "homepage": "https://github.com/jenssegers/laravel-mongodb", + "keywords": [ + "database", + "eloquent", + "laravel", + "model", + "moloquent", + "mongo", + "mongodb" + ], + "time": "2020-03-10T19:41:49+00:00" + }, + { + "name": "jikan-me/jikan", + "version": "v3.0.0-alpha.4", + "source": { + "type": "git", + "url": "https://github.com/jikan-me/jikan.git", + "reference": "c5f4052c40454bf3a7c5a092fed6ed24650426cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jikan-me/jikan/zipball/c5f4052c40454bf3a7c5a092fed6ed24650426cb", + "reference": "c5f4052c40454bf3a7c5a092fed6ed24650426cb", "shasum": "" }, "require": { @@ -2177,7 +2256,7 @@ } ], "description": "Jikan is an unofficial MyAnimeList API", - "time": "2020-04-24T10:49:49+00:00" + "time": "2020-05-20T07:44:20+00:00" }, { "name": "jms/metadata", @@ -2355,16 +2434,16 @@ }, { "name": "laravel/lumen-framework", - "version": "v7.1.0", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/laravel/lumen-framework.git", - "reference": "d961a18d66f1369355f431ccc64edfe45122fa50" + "reference": "38f42c1399650b6c2286de7e9831e7174cfd14e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/lumen-framework/zipball/d961a18d66f1369355f431ccc64edfe45122fa50", - "reference": "d961a18d66f1369355f431ccc64edfe45122fa50", + "url": "https://api.github.com/repos/laravel/lumen-framework/zipball/38f42c1399650b6c2286de7e9831e7174cfd14e8", + "reference": "38f42c1399650b6c2286de7e9831e7174cfd14e8", "shasum": "" }, "require": { @@ -2442,7 +2521,75 @@ "laravel", "lumen" ], - "time": "2020-04-21T19:22:35+00:00" + "time": "2020-05-05T18:17:08+00:00" + }, + { + "name": "mongodb/mongodb", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/mongodb/mongo-php-library.git", + "reference": "dc43ba25fb593d6a2988e6a535b6f5386eda5b15" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/dc43ba25fb593d6a2988e6a535b6f5386eda5b15", + "reference": "dc43ba25fb593d6a2988e6a535b6f5386eda5b15", + "shasum": "" + }, + "require": { + "ext-hash": "*", + "ext-json": "*", + "ext-mongodb": "^1.7", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.27 || ^6.4 || ^8.3", + "sebastian/comparator": "^1.0 || ^2.0 || ^3.0", + "squizlabs/php_codesniffer": "^3.4", + "symfony/phpunit-bridge": "^4.4@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "MongoDB\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Andreas Braun", + "email": "andreas.braun@mongodb.com" + }, + { + "name": "Jeremy Mikola", + "email": "jmikola@gmail.com" + }, + { + "name": "Katherine Walker", + "email": "katherine.walker@mongodb.com" + } + ], + "description": "MongoDB driver library", + "homepage": "https://jira.mongodb.org/browse/PHPLIB", + "keywords": [ + "database", + "driver", + "mongodb", + "persistence" + ], + "time": "2020-02-04T18:16:35+00:00" }, { "name": "monolog/monolog", @@ -2527,21 +2674,22 @@ }, { "name": "nesbot/carbon", - "version": "2.32.2", + "version": "2.34.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "f10e22cf546704fab1db4ad4b9dedbc5c797a0dc" + "reference": "52ea68aebbad8a3b27b5d24e4c66ebe1933f8399" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f10e22cf546704fab1db4ad4b9dedbc5c797a0dc", - "reference": "f10e22cf546704fab1db4ad4b9dedbc5c797a0dc", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/52ea68aebbad8a3b27b5d24e4c66ebe1933f8399", + "reference": "52ea68aebbad8a3b27b5d24e4c66ebe1933f8399", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { @@ -2559,7 +2707,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "2.x-dev", + "dev-3.x": "3.x-dev" }, "laravel": { "providers": [ @@ -2594,7 +2743,7 @@ "datetime", "time" ], - "time": "2020-03-31T13:43:19+00:00" + "time": "2020-05-12T19:53:34+00:00" }, { "name": "nikic/fast-route", @@ -3201,16 +3350,16 @@ }, { "name": "psy/psysh", - "version": "v0.10.3", + "version": "v0.10.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "2bde2fa03e05dff0aee834598b951d6fc7c6fe02" + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/2bde2fa03e05dff0aee834598b951d6fc7c6fe02", - "reference": "2bde2fa03e05dff0aee834598b951d6fc7c6fe02", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", "shasum": "" }, "require": { @@ -3269,7 +3418,7 @@ "interactive", "shell" ], - "time": "2020-04-07T06:44:48+00:00" + "time": "2020-05-03T19:32:03+00:00" }, { "name": "ralouphie/getallheaders", @@ -3455,7 +3604,7 @@ }, { "name": "symfony/browser-kit", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", @@ -3514,7 +3663,7 @@ }, { "name": "symfony/console", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", @@ -3590,7 +3739,7 @@ }, { "name": "symfony/css-selector", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -3643,7 +3792,7 @@ }, { "name": "symfony/dom-crawler", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", @@ -3704,7 +3853,7 @@ }, { "name": "symfony/error-handler", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", @@ -3759,7 +3908,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -3887,7 +4036,7 @@ }, { "name": "symfony/finder", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -3936,16 +4085,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "26fb006a2c7b6cdd23d52157b05f8414ffa417b6" + "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/26fb006a2c7b6cdd23d52157b05f8414ffa417b6", - "reference": "26fb006a2c7b6cdd23d52157b05f8414ffa417b6", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e47fdf8b24edc12022ba52923150ec6484d7f57d", + "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d", "shasum": "" }, "require": { @@ -3987,20 +4136,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2020-03-30T14:14:32+00:00" + "time": "2020-04-18T20:50:06+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "ad574c55d451127cab1c45b4ac51bf283e340cf0" + "reference": "3565e51eecd06106304baba5ccb7ba89db2d7d2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ad574c55d451127cab1c45b4ac51bf283e340cf0", - "reference": "ad574c55d451127cab1c45b4ac51bf283e340cf0", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3565e51eecd06106304baba5ccb7ba89db2d7d2b", + "reference": "3565e51eecd06106304baba5ccb7ba89db2d7d2b", "shasum": "" }, "require": { @@ -4016,6 +4165,7 @@ "symfony/browser-kit": "<4.4", "symfony/cache": "<5.0", "symfony/config": "<5.0", + "symfony/console": "<4.4", "symfony/dependency-injection": "<4.4", "symfony/doctrine-bridge": "<5.0", "symfony/form": "<5.0", @@ -4083,20 +4233,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2020-03-30T15:04:59+00:00" + "time": "2020-04-28T18:53:25+00:00" }, { "name": "symfony/mime", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "481b7d6da88922fb1e0d86a943987722b08f3955" + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/481b7d6da88922fb1e0d86a943987722b08f3955", - "reference": "481b7d6da88922fb1e0d86a943987722b08f3955", + "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b", + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b", "shasum": "" }, "require": { @@ -4145,20 +4295,20 @@ "mime", "mime-type" ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-04-17T03:29:44+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", "shasum": "" }, "require": { @@ -4170,7 +4320,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -4203,20 +4353,20 @@ "polyfill", "portable" ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:14:59+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8" + "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", - "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c4de7601eefbf25f9d47190abe07f79fe0a27424", + "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424", "shasum": "" }, "require": { @@ -4228,7 +4378,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -4262,20 +4412,20 @@ "portable", "shim" ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b6786f69dd7b062390582f20520ab4918283217e" + "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b6786f69dd7b062390582f20520ab4918283217e", - "reference": "b6786f69dd7b062390582f20520ab4918283217e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e094b0770f7833fdf257e6ba4775be4e258230b2", + "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2", "shasum": "" }, "require": { @@ -4287,7 +4437,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -4322,20 +4472,20 @@ "portable", "shim" ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" + "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a", + "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a", "shasum": "" }, "require": { @@ -4349,7 +4499,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -4384,20 +4534,20 @@ "portable", "shim" ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "e62715f03f90dd8d2f3eb5daa21b4d19d71aebde" + "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/e62715f03f90dd8d2f3eb5daa21b4d19d71aebde", - "reference": "e62715f03f90dd8d2f3eb5daa21b4d19d71aebde", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/1357b1d168eb7f68ad6a134838e46b0b159444a9", + "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9", "shasum": "" }, "require": { @@ -4409,7 +4559,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -4447,20 +4597,20 @@ "portable", "shim" ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:14:59+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + "reference": "fa79b11539418b02fc5e1897267673ba2c19419c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c", + "reference": "fa79b11539418b02fc5e1897267673ba2c19419c", "shasum": "" }, "require": { @@ -4472,7 +4622,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -4506,20 +4656,20 @@ "portable", "shim" ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "37b0976c78b94856543260ce09b460a7bc852747" + "reference": "f048e612a3905f34931127360bdd2def19a5e582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", - "reference": "37b0976c78b94856543260ce09b460a7bc852747", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", + "reference": "f048e612a3905f34931127360bdd2def19a5e582", "shasum": "" }, "require": { @@ -4528,7 +4678,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -4561,20 +4711,20 @@ "portable", "shim" ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" + "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc", + "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc", "shasum": "" }, "require": { @@ -4583,7 +4733,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -4619,20 +4769,20 @@ "portable", "shim" ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/process", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e" + "reference": "3179f68dff5bad14d38c4114a1dab98030801fd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e", - "reference": "c5ca4a0fc16a0c888067d43fbcfe1f8a53d8e70e", + "url": "https://api.github.com/repos/symfony/process/zipball/3179f68dff5bad14d38c4114a1dab98030801fd7", + "reference": "3179f68dff5bad14d38c4114a1dab98030801fd7", "shasum": "" }, "require": { @@ -4668,7 +4818,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-04-15T15:59:10+00:00" }, { "name": "symfony/service-contracts", @@ -4730,16 +4880,16 @@ }, { "name": "symfony/translation", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "99b831770e10807dca0979518e2c89edffef5978" + "reference": "c3879db7a68fe3e12b41263b05879412c87b27fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/99b831770e10807dca0979518e2c89edffef5978", - "reference": "99b831770e10807dca0979518e2c89edffef5978", + "url": "https://api.github.com/repos/symfony/translation/zipball/c3879db7a68fe3e12b41263b05879412c87b27fd", + "reference": "c3879db7a68fe3e12b41263b05879412c87b27fd", "shasum": "" }, "require": { @@ -4803,7 +4953,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-04-12T16:45:47+00:00" }, { "name": "symfony/translation-contracts", @@ -4864,16 +5014,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "f74a126acd701392eef2492a17228d42552c86b5" + "reference": "09de28632f16f81058a85fcf318397218272a07b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/f74a126acd701392eef2492a17228d42552c86b5", - "reference": "f74a126acd701392eef2492a17228d42552c86b5", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/09de28632f16f81058a85fcf318397218272a07b", + "reference": "09de28632f16f81058a85fcf318397218272a07b", "shasum": "" }, "require": { @@ -4935,20 +5085,20 @@ "debug", "dump" ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-04-12T16:45:47+00:00" }, { "name": "symfony/yaml", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ef166890d821518106da3560086bfcbeb4fadfec" + "reference": "b385dce1c0e9f839b384af90188638819433e252" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ef166890d821518106da3560086bfcbeb4fadfec", - "reference": "ef166890d821518106da3560086bfcbeb4fadfec", + "url": "https://api.github.com/repos/symfony/yaml/zipball/b385dce1c0e9f839b384af90188638819433e252", + "reference": "b385dce1c0e9f839b384af90188638819433e252", "shasum": "" }, "require": { @@ -4994,24 +5144,24 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2020-03-30T11:41:10+00:00" + "time": "2020-04-28T17:55:16+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v4.1.4", + "version": "v4.1.5", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "feb6dad5ae24b1380827aee1629b730080fde500" + "reference": "539bb6927c101a5605d31d11a2d17185a2ce2bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/feb6dad5ae24b1380827aee1629b730080fde500", - "reference": "feb6dad5ae24b1380827aee1629b730080fde500", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/539bb6927c101a5605d31d11a2d17185a2ce2bf1", + "reference": "539bb6927c101a5605d31d11a2d17185a2ce2bf1", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0", + "php": "^5.5.9 || ^7.0 || ^8.0", "phpoption/phpoption": "^1.7.2", "symfony/polyfill-ctype": "^1.9" }, @@ -5058,7 +5208,7 @@ "env", "environment" ], - "time": "2020-04-12T15:20:09+00:00" + "time": "2020-05-02T14:08:57+00:00" }, { "name": "voku/anti-xss", @@ -5168,16 +5318,16 @@ }, { "name": "voku/portable-utf8", - "version": "5.4.41", + "version": "5.4.43", "source": { "type": "git", "url": "https://github.com/voku/portable-utf8.git", - "reference": "e34247dce28f9aebebd2d752d8813b91de689aec" + "reference": "ca43fcf0d953909217565d6cbfa923053de0acdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-utf8/zipball/e34247dce28f9aebebd2d752d8813b91de689aec", - "reference": "e34247dce28f9aebebd2d752d8813b91de689aec", + "url": "https://api.github.com/repos/voku/portable-utf8/zipball/ca43fcf0d953909217565d6cbfa923053de0acdc", + "reference": "ca43fcf0d953909217565d6cbfa923053de0acdc", "shasum": "" }, "require": { @@ -5203,8 +5353,7 @@ "type": "library", "autoload": { "psr-4": { - "voku\\": "src/voku/", - "voku\\tests\\": "tests/" + "voku\\": "src/voku/" }, "files": [ "bootstrap.php" @@ -5238,7 +5387,7 @@ "utf-8", "utf8" ], - "time": "2020-03-06T01:23:48+00:00" + "time": "2020-05-14T00:59:19+00:00" } ], "packages-dev": [ @@ -5557,24 +5706,21 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~6" - }, "type": "library", "extra": { "branch-alias": { @@ -5605,7 +5751,7 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-04-27T09:25:28+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -6817,7 +6963,8 @@ "prefer-lowest": false, "platform": { "php": "^7.2.5", - "ext-json": "*" + "ext-json": "*", + "ext-mongodb": "*" }, "platform-dev": [] } diff --git a/config/controller-to-table-mapping.php b/config/controller-to-table-mapping.php new file mode 100644 index 0000000..89eb024 --- /dev/null +++ b/config/controller-to-table-mapping.php @@ -0,0 +1,90 @@ + 'anime', + 'AnimeController@characters_staff' => 'anime_characters_staff', + 'AnimeController@episodes' => 'anime_episodes', + 'AnimeController@episode' => 'anime_episode', + 'AnimeController@news' => 'anime_news', + 'AnimeController@forum' => 'anime_forum', + 'AnimeController@videos' => 'anime_videos', + 'AnimeController@pictures' => 'anime_pictures', + 'AnimeController@stats' => 'anime_stats', + 'AnimeController@moreInfo' => 'anime_moreinfo', + 'AnimeController@recommendations' => 'anime_recommendations', + 'AnimeController@userupdates' => 'anime_userupdates', + 'AnimeController@reviews' => 'anime_reviews', + + 'MangaController@main' => 'manga', + 'MangaController@characters' => 'manga_characters', + 'MangaController@news' => 'manga_news', + 'MangaController@forum' => 'manga_forum', + 'MangaController@pictures' => 'manga_pictures', + 'MangaController@stats' => 'manga_stats', + 'MangaController@moreInfo' => 'manga_moreinfo', + 'MangaController@recommendations' => 'manga_recommendations', + 'MangaController@userupdates' => 'manga_userupdates', + 'MangaController@reviews' => 'manga_reviews', + + 'CharacterController@main' => 'characters', + 'CharacterController@pictures' => 'characters_pictures', + + 'PersonController@main' => 'people', + 'PersonController@pictures' => 'people_pictures', + + 'SeasonController@archive' => 'season_archive', + 'SeasonController@later' => 'season_later', + 'SeasonController@main' => 'season', + + 'ScheduleController@main' => 'schedule', + + 'ProducerController@main' => 'producers', + 'ProducerController@resource' => 'producers_anime', + + 'MagazineController@main' => 'magazines', + 'MagazineController@resource' => 'magazines_manga', + + 'UserController@recentlyOnline' => 'users_recently_online', + 'UserController@profile' => 'users', + 'UserController@history' => 'users_history', + 'UserController@friends' => 'users_friends', + 'UserController@animelist' => 'users_animelist', + 'UserController@mangalist' => 'users_mangalist', + 'UserController@recommendations' => 'users_recommendations', + 'UserController@reviews' => 'users_reviews', + 'UserController@clubs' => 'users_clubs', + + 'GenreController@animeListing' => 'genres', + 'GenreController@mangaListing' => 'genres', + 'GenreController@anime' => 'genres_anime', + 'GenreController@manga' => 'genres_manga', + + 'TopController@anime' => 'top_anime', + 'TopController@manga' => 'top_manga', + 'TopController@characters' => 'top_characters', + 'TopController@people' => 'top_people', + 'ReviewsController@bestVoted' => 'top_reviews', + + 'SearchController@anime' => 'search_anime', + 'SearchController@manga' => 'search_manga', + 'SearchController@character' => 'search_characters', + 'SearchController@people' => 'search_people', + 'SearchController@users' => 'search_users', + 'SearchController@userById' => 'search_users_by_id', + + 'ClubController@main' => 'clubs', + 'ClubController@members' => 'clubs_members', + + 'ReviewsController@anime' => 'reviews', + 'ReviewsController@manga' => 'reviews', + + 'RecommendationsController@anime' => 'recommendations', + 'RecommendationsController@manga' => 'recommendations', + + 'WatchController@recentEpisodes' => 'watch', + 'WatchController@popularEpisodes' => 'watch', + 'WatchController@recentPromos' => 'watch', + 'WatchController@popularPromos' => 'watch', + +]; \ No newline at end of file diff --git a/config/database.php b/config/database.php index ed6bf12..18fffc2 100755 --- a/config/database.php +++ b/config/database.php @@ -1,6 +1,26 @@ env('DB_CONNECTION', 'mongodb'), + + 'connections' => [ + 'mongodb' => [ + /* + 'driver' => 'mongodb', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', 27017), + 'username' => env('DB_USERNAME', ''), + 'password' => env('DB_PASSWORD', ''), + 'options' => [ + 'db' => env('MONGODB_AUTHDATABASE', '') + ] + */ + 'driver' => 'mongodb', + 'dsn'=> "mongodb+srv://".env('DB_USERNAME', 'jikan').":".env('DB_PASSWORD', '')."@".env('MONGODB_DSN', ''), + 'database' => env('DB_DATABASE', ''), + ] + ], + 'redis' => [ 'client' => 'predis', 'default' => [ @@ -9,5 +29,7 @@ return [ 'port' => env('REDIS_PORT', 6379), 'database' => 0 ] - ] + ], + + 'migrations' => 'migrations' ]; diff --git a/database/migrations/2020_05_21_051725_create_index.php b/database/migrations/2020_05_21_051725_create_index.php new file mode 100644 index 0000000..9a953b8 --- /dev/null +++ b/database/migrations/2020_05_21_051725_create_index.php @@ -0,0 +1,44 @@ +index('request_hash', 'request_hash'); + $table->timestamps(); + $table->integer('expireAfterSeconds'); + }); + + $mapped[] = $table; + } + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + + } +} diff --git a/routes/web.v4.php b/routes/web.v4.php index 115779f..425f5e6 100755 --- a/routes/web.v4.php +++ b/routes/web.v4.php @@ -146,7 +146,7 @@ $router->group( $router->group( [ - 'prefix' => 'character/{id:[0-9]+}' + 'prefix' => 'characters/{id:[0-9]+}' ], function () use ($router) { $router->get('/', [ @@ -161,7 +161,7 @@ $router->group( $router->group( [ - 'prefix' => 'person/{id:[0-9]+}' + 'prefix' => 'people/{id:[0-9]+}' ], function () use ($router) { $router->get('/', [ @@ -334,7 +334,7 @@ $router->group( 'uses' => 'SearchController@manga' ]); - $router->get('/character[/{page:[0-9]+}]', [ + $router->get('/characters[/{page:[0-9]+}]', [ 'uses' => 'SearchController@character' ]); diff --git a/storage/app/metadata.v4/Jikan.Model.Genre.AnimeGenre.yml b/storage/app/metadata.v4/Jikan.Model.Genre.AnimeGenre.yml new file mode 100644 index 0000000..56a82de --- /dev/null +++ b/storage/app/metadata.v4/Jikan.Model.Genre.AnimeGenre.yml @@ -0,0 +1,5 @@ +Jikan\Model\Genre\AnimeGenre: + exclusion_policy: NONE + properties: + malUrl: + serialized_name: meta \ No newline at end of file diff --git a/storage/app/metadata.v4/Jikan.Model.Genre.MangaGenre.yml b/storage/app/metadata.v4/Jikan.Model.Genre.MangaGenre.yml new file mode 100644 index 0000000..2cf6152 --- /dev/null +++ b/storage/app/metadata.v4/Jikan.Model.Genre.MangaGenre.yml @@ -0,0 +1,5 @@ +Jikan\Model\Genre\MangaGenre: + exclusion_policy: NONE + properties: + malUrl: + serialized_name: meta \ No newline at end of file