1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-08 19:32:29 +01:00

update to laravel 6.8

This commit is contained in:
devfake 2019-12-21 14:47:53 +01:00
parent fcf629ffc3
commit 73f0e685c7
20 changed files with 494 additions and 246 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ Homestead.json
Homestead.yaml
/backend/.env
/bin/.worker.pid
/backend/.phpunit.result.cache
*/.DS_Store
/public/assets/app.css

View File

@ -10,7 +10,7 @@
use App\Services\Storage;
use App\Setting;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Request;
use Symfony\Component\HttpFoundation\Response;
class ExportImportController {
@ -52,14 +52,14 @@
/**
* Reset item table and restore backup.
* Downloads every poster image new.
*
*
* @return Response
*/
public function import()
{
increaseTimeLimit();
$file = Input::file('import');
$file = Request::file('import');
$extension = $file->getClientOriginalExtension();
@ -86,22 +86,22 @@
ImportItem::dispatch(json_encode($item));
}
}
logInfo("Import Movies done.");
}
private function importEpisodes($data)
{
logInfo("Import Tv Shows");
if(isset($data->episodes)) {
$this->episodes->truncate();
foreach(array_chunk($data->episodes, 50) as $chunk) {
ImportEpisode::dispatch(json_encode($chunk));
}
}
logInfo("Import Tv Shows done.");
}
@ -109,10 +109,10 @@
{
if(isset($data->alternative_titles)) {
$this->alternativeTitles->truncate();
foreach($data->alternative_titles as $title) {
$title = collect($title)->except('id')->toArray();
$this->alternativeTitles->create($title);
}
}
@ -121,12 +121,12 @@
private function importSettings($data)
{
if(isset($data->settings)) {
$this->settings->truncate();
foreach($data->settings as $setting) {
$setting = collect($setting)->except('id')->toArray();
$this->settings->create($setting);
}
}

View File

@ -5,7 +5,7 @@
use App\Services\Models\AlternativeTitleService;
use App\Services\Models\EpisodeService;
use App\Services\Models\ItemService;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Request;
use Symfony\Component\HttpFoundation\Response;
class ItemController {
@ -31,17 +31,17 @@
public function search()
{
return $this->itemService->search(Input::get('q'));
return $this->itemService->search(Request::input('q'));
}
public function changeRating($itemId)
{
return $this->itemService->changeRating($itemId, Input::get('rating'));
return $this->itemService->changeRating($itemId, Request::input('rating'));
}
public function add()
{
return $this->itemService->create(Input::get('item'));
return $this->itemService->create(Request::input('item'));
}
public function watchlist()
@ -61,7 +61,7 @@
public function refresh($itemId)
{
$this->itemService->refresh($itemId);
return response([], Response::HTTP_OK);
}
@ -88,9 +88,9 @@
public function toggleSeason()
{
$tmdbId = Input::get('tmdb_id');
$season = Input::get('season');
$seen = Input::get('seen');
$tmdbId = Request::input('tmdb_id');
$season = Request::input('season');
$seen = Request::input('seen');
$this->episodeService->toggleSeason($tmdbId, $season, $seen);
}

View File

@ -9,7 +9,7 @@
use GuzzleHttp\Client;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Request;
class SettingController {
@ -83,13 +83,13 @@
public function updateSettings()
{
Cache::flush();
$this->setting->first()->update([
'show_genre' => Input::get('genre'),
'show_date' => Input::get('date'),
'episode_spoiler_protection' => Input::get('spoiler'),
'show_watchlist_everywhere' => Input::get('watchlist'),
'show_ratings' => Input::get('ratings'),
'show_genre' => Request::input('genre'),
'show_date' => Request::input('date'),
'episode_spoiler_protection' => Request::input('spoiler'),
'show_watchlist_everywhere' => Request::input('watchlist'),
'show_ratings' => Request::input('ratings'),
]);
}
@ -99,28 +99,28 @@
public function updateRefresh()
{
$this->setting->first()->update([
'refresh_automatically' => Input::get('refresh'),
'refresh_automatically' => Request::input('refresh'),
]);
}
/**
* Update reminders mail.
*/
public function updateRemindersSendTo()
{
$this->setting->first()->update([
'reminders_send_to' => Input::get('reminders_send_to'),
'reminders_send_to' => Request::input('reminders_send_to'),
]);
}
/**
* Update reminder options.
*/
public function updateReminderOptions()
{
$this->setting->first()->update([
'daily_reminder' => Input::get('daily'),
'weekly_reminder' => Input::get('weekly'),
'daily_reminder' => Request::input('daily'),
'weekly_reminder' => Request::input('weekly'),
]);
}
}

View File

@ -4,6 +4,7 @@
use App\Services\TMDB;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Request;
class TMDBController {
@ -16,14 +17,14 @@
public function search()
{
return $this->tmdb->search(Input::get('q'));
return $this->tmdb->search(Request::input('q'));
}
public function suggestions($tmdbId, $mediaType)
{
return $this->tmdb->suggestions($mediaType, $tmdbId);
}
public function genre($genre)
{
return $this->tmdb->byGenre($genre);

View File

@ -4,7 +4,7 @@
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Request;
class UserController {
@ -22,8 +22,8 @@
*/
public function login()
{
$username = Input::get('username');
$password = Input::get('password');
$username = Request::input('username');
$password = Request::input('password');
if($this->auth->attempt(['username' => $username, 'password' => $password], true)) {
return response('Success', 200);
@ -49,8 +49,8 @@
*/
public function changeUserData()
{
$username = Input::get('username');
$password = Input::get('password');
$username = Request::input('username');
$password = Request::input('password');
$user = Auth::user();
$user->username = $username;

View File

@ -66,7 +66,7 @@
$item = $this->model->store($data);
$this->episodeService->create($item);
$this->genreService->sync($item, $data['genre_ids']);
$this->genreService->sync($item, $data['genre_ids'] ?? []);
$this->alternativeTitleService->create($item);
$this->storage->downloadImages($item->poster, $item->backdrop);

View File

@ -17,7 +17,9 @@
function getSlug($title)
{
return str_slug($title) != '' ? str_slug($title) : 'no-slug-available';
$slug = Illuminate\Support\Str::slug($title);
return $slug != '' ? $slug : 'no-slug-available';
}
// There is no 'EN' region in TMDb.
@ -25,7 +27,7 @@
{
return strtolower($translation) == 'en' ? 'us' : $translation;
}
function logInfo($message, $context = [])
{
if( ! app()->runningUnitTests()) {

View File

@ -13,21 +13,20 @@
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"doctrine/dbal": "^2.8",
"php": "^7.2",
"doctrine/dbal": "^2.10",
"fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^6.3",
"imangazaliev/didom": "^1.13",
"laravel/framework": "5.8.*",
"laravel/tinker": "^1.0",
"morrislaptop/laravel-queue-clear": "^1.1",
"imangazaliev/didom": "^1.14",
"laravel/framework": "6.8.*",
"laravel/tinker": "^2.0",
"ext-json": "*"
},
"require-dev": {
"filp/whoops": "~2.0",
"facade/ignition": "^1.4",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "^7.0",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^8.0",
"symfony/css-selector": "3.3.*",
"symfony/dom-crawler": "3.3.*"
},

553
backend/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "94b1feda1b235290e48cc8d130df2f67",
"content-hash": "dada4b2a17be8a294e4dfdff69da5815",
"packages": [
{
"name": "dnoegel/php-xdg-base-dir",
@ -958,43 +958,43 @@
},
{
"name": "laravel/framework",
"version": "v5.8.36",
"version": "v6.8.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "ccf857af50897eda43ceaf12e318cf214e0e4e95"
"reference": "0372d48452fe30bdb18cd4d30c78d41ef03461f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/ccf857af50897eda43ceaf12e318cf214e0e4e95",
"reference": "ccf857af50897eda43ceaf12e318cf214e0e4e95",
"url": "https://api.github.com/repos/laravel/framework/zipball/0372d48452fe30bdb18cd4d30c78d41ef03461f7",
"reference": "0372d48452fe30bdb18cd4d30c78d41ef03461f7",
"shasum": ""
},
"require": {
"doctrine/inflector": "^1.1",
"dragonmantank/cron-expression": "^2.0",
"egulias/email-validator": "^2.0",
"egulias/email-validator": "^2.1.10",
"erusev/parsedown": "^1.7",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"league/flysystem": "^1.0.8",
"monolog/monolog": "^1.12",
"nesbot/carbon": "^1.26.3 || ^2.0",
"monolog/monolog": "^1.12|^2.0",
"nesbot/carbon": "^2.0",
"opis/closure": "^3.1",
"php": "^7.1.3",
"php": "^7.2",
"psr/container": "^1.0",
"psr/simple-cache": "^1.0",
"ramsey/uuid": "^3.7",
"swiftmailer/swiftmailer": "^6.0",
"symfony/console": "^4.2",
"symfony/debug": "^4.2",
"symfony/finder": "^4.2",
"symfony/http-foundation": "^4.2",
"symfony/http-kernel": "^4.2",
"symfony/process": "^4.2",
"symfony/routing": "^4.2",
"symfony/var-dumper": "^4.2",
"symfony/console": "^4.3.4",
"symfony/debug": "^4.3.4",
"symfony/finder": "^4.3.4",
"symfony/http-foundation": "^4.3.4",
"symfony/http-kernel": "^4.3.4",
"symfony/process": "^4.3.4",
"symfony/routing": "^4.3.4",
"symfony/var-dumper": "^4.3.4",
"tijsverkoyen/css-to-inline-styles": "^2.2.1",
"vlucas/phpdotenv": "^3.3"
},
@ -1034,47 +1034,45 @@
"require-dev": {
"aws/aws-sdk-php": "^3.0",
"doctrine/dbal": "^2.6",
"filp/whoops": "^2.1.4",
"filp/whoops": "^2.4",
"guzzlehttp/guzzle": "^6.3",
"league/flysystem-cached-adapter": "^1.0",
"mockery/mockery": "^1.0",
"mockery/mockery": "^1.2.3",
"moontoast/math": "^1.1",
"orchestra/testbench-core": "3.8.*",
"orchestra/testbench-core": "^4.0",
"pda/pheanstalk": "^4.0",
"phpunit/phpunit": "^7.5|^8.0",
"phpunit/phpunit": "^8.3",
"predis/predis": "^1.1.1",
"symfony/css-selector": "^4.2",
"symfony/dom-crawler": "^4.2",
"symfony/cache": "^4.3",
"true/punycode": "^2.1"
},
"suggest": {
"aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).",
"aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
"ext-memcached": "Required to use the memcache cache driver.",
"ext-pcntl": "Required to use all features of the queue worker.",
"ext-posix": "Required to use all features of the queue worker.",
"filp/whoops": "Required for friendly error pages in development (^2.1.4).",
"ext-redis": "Required to use the Redis cache and queue drivers.",
"filp/whoops": "Required for friendly error pages in development (^2.4).",
"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).",
"guzzlehttp/guzzle": "Required to use the Mailgun mail driver 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).",
"moontoast/math": "Required to use ordered UUIDs (^1.1).",
"nexmo/client": "Required to use the Nexmo transport (^1.0).",
"pda/pheanstalk": "Required to use the beanstalk queue driver (^4.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.2).",
"symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.2).",
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.1).",
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).",
"symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).",
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).",
"wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.8-dev"
"dev-master": "6.x-dev"
}
},
"autoload": {
@ -1102,40 +1100,40 @@
"framework",
"laravel"
],
"time": "2019-12-17T16:00:14+00:00"
"time": "2019-12-19T18:09:06+00:00"
},
{
"name": "laravel/tinker",
"version": "v1.0.10",
"version": "v2.0.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/tinker.git",
"reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7"
"reference": "6c2f1a1873180f3ecece0ba34ff9146847bf8dec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/tinker/zipball/ad571aacbac1539c30d480908f9d0c9614eaf1a7",
"reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7",
"url": "https://api.github.com/repos/laravel/tinker/zipball/6c2f1a1873180f3ecece0ba34ff9146847bf8dec",
"reference": "6c2f1a1873180f3ecece0ba34ff9146847bf8dec",
"shasum": ""
},
"require": {
"illuminate/console": "~5.1|^6.0",
"illuminate/contracts": "~5.1|^6.0",
"illuminate/support": "~5.1|^6.0",
"php": ">=5.5.9",
"psy/psysh": "0.7.*|0.8.*|0.9.*",
"symfony/var-dumper": "~3.0|~4.0"
"illuminate/console": "^6.0|^7.0",
"illuminate/contracts": "^6.0|^7.0",
"illuminate/support": "^6.0|^7.0",
"php": "^7.2",
"psy/psysh": "^0.9",
"symfony/var-dumper": "^4.0|^5.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0|~5.0"
"phpunit/phpunit": "^8.0"
},
"suggest": {
"illuminate/database": "The Illuminate Database package (~5.1)."
"illuminate/database": "The Illuminate Database package (^6.0|^7.0)."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "2.x-dev"
},
"laravel": {
"providers": [
@ -1165,7 +1163,7 @@
"laravel",
"psysh"
],
"time": "2019-08-07T15:10:45+00:00"
"time": "2019-11-26T17:57:28+00:00"
},
{
"name": "league/flysystem",
@ -1253,21 +1251,21 @@
},
{
"name": "monolog/monolog",
"version": "1.25.3",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1"
"reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1",
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c861fcba2ca29404dc9e617eedd9eff4616986b8",
"reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0"
"php": "^7.2",
"psr/log": "^1.0.1"
},
"provide": {
"psr/log-implementation": "1.0.0"
@ -1275,33 +1273,36 @@
"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",
"elasticsearch/elasticsearch": "^6.0",
"graylog2/gelf-php": "^1.4.2",
"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",
"phpspec/prophecy": "^1.6.1",
"phpunit/phpunit": "^8.3",
"predis/predis": "^1.1",
"rollbar/rollbar": "^1.3",
"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",
"elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"ext-mbstring": "Allow to work properly with unicode symbols",
"ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
"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"
"ruflin/elastica": "Allow sending log messages to an Elastic Search server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "2.x-dev"
}
},
"autoload": {
@ -1327,48 +1328,7 @@
"logging",
"psr-3"
],
"time": "2019-12-20T14:15:16+00:00"
},
{
"name": "morrislaptop/laravel-queue-clear",
"version": "v1.2.0",
"source": {
"type": "git",
"url": "https://github.com/morrislaptop/laravel-queue-clear.git",
"reference": "58c8b64e0f6e9f190fa687b8e44b442a649cbc98"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/morrislaptop/laravel-queue-clear/zipball/58c8b64e0f6e9f190fa687b8e44b442a649cbc98",
"reference": "58c8b64e0f6e9f190fa687b8e44b442a649cbc98",
"shasum": ""
},
"require": {
"illuminate/support": ">=5.0.0",
"php": ">=5.4.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Morrislaptop\\LaravelQueueClear\\LaravelQueueClearServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Morrislaptop\\LaravelQueueClear\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"authors": [
{
"name": "Craig Morris",
"email": "craig.michael.morris@gmail.com"
}
],
"description": "Command for wiping your queues clear",
"time": "2019-08-05T15:21:24+00:00"
"time": "2019-12-20T14:22:59+00:00"
},
{
"name": "nesbot/carbon",
@ -3642,6 +3602,175 @@
],
"time": "2019-10-21T16:45:58+00:00"
},
{
"name": "facade/flare-client-php",
"version": "1.3.1",
"source": {
"type": "git",
"url": "https://github.com/facade/flare-client-php.git",
"reference": "24444ea0e1556f0a4b5fc8e61802caf72ae9a408"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/facade/flare-client-php/zipball/24444ea0e1556f0a4b5fc8e61802caf72ae9a408",
"reference": "24444ea0e1556f0a4b5fc8e61802caf72ae9a408",
"shasum": ""
},
"require": {
"facade/ignition-contracts": "~1.0",
"illuminate/pipeline": "~5.5|~5.6|~5.7|~5.8|^6.0",
"php": "^7.1",
"symfony/http-foundation": "~3.3|~4.1",
"symfony/var-dumper": "^3.4|^4.0|^5.0"
},
"require-dev": {
"larapack/dd": "^1.1",
"phpunit/phpunit": "^7.5.16",
"spatie/phpunit-snapshot-assertions": "^2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Facade\\FlareClient\\": "src"
},
"files": [
"src/helpers.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Send PHP errors to Flare",
"homepage": "https://github.com/facade/flare-client-php",
"keywords": [
"exception",
"facade",
"flare",
"reporting"
],
"time": "2019-12-15T18:28:38+00:00"
},
{
"name": "facade/ignition",
"version": "1.13.0",
"source": {
"type": "git",
"url": "https://github.com/facade/ignition.git",
"reference": "1d2103aefecc9c4e6975bcc77fc5eceb330adb33"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/facade/ignition/zipball/1d2103aefecc9c4e6975bcc77fc5eceb330adb33",
"reference": "1d2103aefecc9c4e6975bcc77fc5eceb330adb33",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"facade/flare-client-php": "^1.3",
"facade/ignition-contracts": "^1.0",
"filp/whoops": "^2.4",
"illuminate/support": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6.0",
"monolog/monolog": "^1.12 || ^2.0",
"php": "^7.1",
"scrivo/highlight.php": "^9.15",
"symfony/console": "^3.4 || ^4.0",
"symfony/var-dumper": "^3.4 || ^4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.14",
"mockery/mockery": "^1.2",
"orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0"
},
"suggest": {
"laravel/telescope": "^2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"laravel": {
"providers": [
"Facade\\Ignition\\IgnitionServiceProvider"
],
"aliases": {
"Flare": "Facade\\Ignition\\Facades\\Flare"
}
}
},
"autoload": {
"psr-4": {
"Facade\\Ignition\\": "src"
},
"files": [
"src/helpers.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A beautiful error page for Laravel applications.",
"homepage": "https://github.com/facade/ignition",
"keywords": [
"error",
"flare",
"laravel",
"page"
],
"time": "2019-11-27T11:17:18+00:00"
},
{
"name": "facade/ignition-contracts",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/facade/ignition-contracts.git",
"reference": "f445db0fb86f48e205787b2592840dd9c80ded28"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/facade/ignition-contracts/zipball/f445db0fb86f48e205787b2592840dd9c80ded28",
"reference": "f445db0fb86f48e205787b2592840dd9c80ded28",
"shasum": ""
},
"require": {
"php": "^7.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Facade\\IgnitionContracts\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://flareapp.io",
"role": "Developer"
}
],
"description": "Solution contracts for Ignition",
"homepage": "https://github.com/facade/ignition-contracts",
"keywords": [
"contracts",
"flare",
"ignition"
],
"time": "2019-08-30T14:06:08+00:00"
},
{
"name": "filp/whoops",
"version": "2.5.1",
@ -4232,40 +4361,40 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "6.1.4",
"version": "7.0.10",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d"
"reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
"reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf",
"reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
"php": "^7.1",
"phpunit/php-file-iterator": "^2.0",
"php": "^7.2",
"phpunit/php-file-iterator": "^2.0.2",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-token-stream": "^3.0",
"phpunit/php-token-stream": "^3.1.1",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
"sebastian/environment": "^3.1 || ^4.0",
"sebastian/environment": "^4.2.2",
"sebastian/version": "^2.0.1",
"theseer/tokenizer": "^1.1"
"theseer/tokenizer": "^1.1.3"
},
"require-dev": {
"phpunit/phpunit": "^7.0"
"phpunit/phpunit": "^8.2.2"
},
"suggest": {
"ext-xdebug": "^2.6.0"
"ext-xdebug": "^2.7.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.1-dev"
"dev-master": "7.0-dev"
}
},
"autoload": {
@ -4291,7 +4420,7 @@
"testing",
"xunit"
],
"time": "2018-10-31T16:06:48+00:00"
"time": "2019-11-20T13:55:58+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -4484,53 +4613,52 @@
},
{
"name": "phpunit/phpunit",
"version": "7.5.18",
"version": "8.5.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "fcf6c4bfafaadc07785528b06385cce88935474d"
"reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fcf6c4bfafaadc07785528b06385cce88935474d",
"reference": "fcf6c4bfafaadc07785528b06385cce88935474d",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3ee1c1fd6fc264480c25b6fb8285edefe1702dab",
"reference": "3ee1c1fd6fc264480c25b6fb8285edefe1702dab",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.1",
"doctrine/instantiator": "^1.2.0",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"myclabs/deep-copy": "^1.7",
"phar-io/manifest": "^1.0.2",
"phar-io/version": "^2.0",
"php": "^7.1",
"phpspec/prophecy": "^1.7",
"phpunit/php-code-coverage": "^6.0.7",
"phpunit/php-file-iterator": "^2.0.1",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.9.1",
"phar-io/manifest": "^1.0.3",
"phar-io/version": "^2.0.1",
"php": "^7.2",
"phpspec/prophecy": "^1.8.1",
"phpunit/php-code-coverage": "^7.0.7",
"phpunit/php-file-iterator": "^2.0.2",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-timer": "^2.1",
"sebastian/comparator": "^3.0",
"sebastian/diff": "^3.0",
"sebastian/environment": "^4.0",
"sebastian/exporter": "^3.1",
"sebastian/global-state": "^2.0",
"phpunit/php-timer": "^2.1.2",
"sebastian/comparator": "^3.0.2",
"sebastian/diff": "^3.0.2",
"sebastian/environment": "^4.2.2",
"sebastian/exporter": "^3.1.1",
"sebastian/global-state": "^3.0.0",
"sebastian/object-enumerator": "^3.0.3",
"sebastian/resource-operations": "^2.0",
"sebastian/resource-operations": "^2.0.1",
"sebastian/type": "^1.1.3",
"sebastian/version": "^2.0.1"
},
"conflict": {
"phpunit/phpunit-mock-objects": "*"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
"ext-soap": "*",
"ext-xdebug": "*",
"phpunit/php-invoker": "^2.0"
"phpunit/php-invoker": "^2.0.0"
},
"bin": [
"phpunit"
@ -4538,7 +4666,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "7.5-dev"
"dev-master": "8.5-dev"
}
},
"autoload": {
@ -4564,7 +4692,75 @@
"testing",
"xunit"
],
"time": "2019-12-06T05:14:37+00:00"
"time": "2019-12-06T05:41:38+00:00"
},
{
"name": "scrivo/highlight.php",
"version": "v9.17.1.0",
"source": {
"type": "git",
"url": "https://github.com/scrivo/highlight.php.git",
"reference": "5451a9ad6d638559cf2a092880f935c39776134e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scrivo/highlight.php/zipball/5451a9ad6d638559cf2a092880f935c39776134e",
"reference": "5451a9ad6d638559cf2a092880f935c39776134e",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"php": ">=5.4"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.7",
"symfony/finder": "^3.4",
"symfony/var-dumper": "^3.4"
},
"suggest": {
"ext-dom": "Needed to make use of the features in the utilities namespace"
},
"type": "library",
"autoload": {
"psr-0": {
"Highlight\\": "",
"HighlightUtilities\\": ""
},
"files": [
"HighlightUtilities/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Geert Bergman",
"homepage": "http://www.scrivo.org/",
"role": "Project Author"
},
{
"name": "Vladimir Jimenez",
"homepage": "https://allejo.io",
"role": "Maintainer"
},
{
"name": "Martin Folkers",
"homepage": "https://twobrain.io",
"role": "Contributor"
}
],
"description": "Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js",
"keywords": [
"code",
"highlight",
"highlight.js",
"highlight.php",
"syntax"
],
"time": "2019-12-13T21:54:06+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@ -4853,23 +5049,26 @@
},
{
"name": "sebastian/global-state",
"version": "2.0.0",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
"reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
"reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
"reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
"shasum": ""
},
"require": {
"php": "^7.0"
"php": "^7.2",
"sebastian/object-reflector": "^1.1.1",
"sebastian/recursion-context": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
"ext-dom": "*",
"phpunit/phpunit": "^8.0"
},
"suggest": {
"ext-uopz": "*"
@ -4877,7 +5076,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
"dev-master": "3.0-dev"
}
},
"autoload": {
@ -4900,7 +5099,7 @@
"keywords": [
"global state"
],
"time": "2017-04-27T15:39:26+00:00"
"time": "2019-02-01T05:30:01+00:00"
},
{
"name": "sebastian/object-enumerator",
@ -5089,6 +5288,52 @@
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"time": "2018-10-04T04:07:39+00:00"
},
{
"name": "sebastian/type",
"version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3",
"reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3",
"shasum": ""
},
"require": {
"php": "^7.2"
},
"require-dev": {
"phpunit/phpunit": "^8.2"
},
"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",
"role": "lead"
}
],
"description": "Collection of value objects that represent the types of the PHP type system",
"homepage": "https://github.com/sebastianbergmann/type",
"time": "2019-07-02T08:10:15+00:00"
},
{
"name": "sebastian/version",
"version": "2.0.1",
@ -5283,7 +5528,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^7.1.3",
"php": "^7.2",
"ext-json": "*"
},
"platform-dev": []

View File

@ -8,7 +8,7 @@
return [
'username' => $faker->name,
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
'remember_token' => Illuminate\Support\Str::random(10),
];
});

View File

@ -19,7 +19,7 @@
private $alternativeTitles;
public function setUp()
public function setUp(): void
{
parent::setUp();

View File

@ -17,8 +17,8 @@ class CalendarTest extends TestCase {
use Mocks;
private $calendar;
public function setUp()
public function setUp(): void
{
parent::setUp();
@ -29,11 +29,11 @@ class CalendarTest extends TestCase {
public function it_should_contain_and_format_tv_shows()
{
$this->createTv();
$items = $this->calendar->items();
$this->assertCount(4, $items);
foreach($items as $item) {
$this->assertArrayHasKey('startDate', $item);
$this->assertArrayHasKey('id', $item);
@ -41,33 +41,33 @@ class CalendarTest extends TestCase {
$this->assertArrayHasKey('type', $item);
$this->assertArrayHasKey('classes', $item);
$this->assertArrayHasKey('title', $item);
$this->assertEquals('tv', $item['type']);
$this->assertEquals('tv watchlist-0', $item['classes']);
}
}
/** @test */
public function it_should_format_tv_shows_on_watchlist()
{
$this->createTv(['watchlist' => true]);
$items = $this->calendar->items();
foreach($items as $item) {
$this->assertEquals('tv watchlist-1', $item['classes']);
}
}
/** @test */
public function it_should_contain_and_format_movies()
{
$this->createMovie();
$items = $this->calendar->items();
$this->assertCount(1, $items);
foreach($items as $item) {
$this->assertArrayHasKey('startDate', $item);
$this->assertArrayHasKey('id', $item);
@ -75,19 +75,19 @@ class CalendarTest extends TestCase {
$this->assertArrayHasKey('type', $item);
$this->assertArrayHasKey('classes', $item);
$this->assertArrayHasKey('title', $item);
$this->assertEquals('movies', $item['type']);
$this->assertEquals('movies watchlist-0', $item['classes']);
}
}
/** @test */
public function it_should_format_movies_on_watchlist()
{
$this->createMovie(['watchlist' => true]);
$items = $this->calendar->items();
foreach($items as $item) {
$this->assertEquals('movies watchlist-1', $item['classes']);
}

View File

@ -22,7 +22,7 @@
private $episodeService;
private $item;
public function setUp()
public function setUp(): void
{
parent::setUp();

View File

@ -1,5 +1,5 @@
<?php
namespace Tests\Services;
use Illuminate\Foundation\Testing\RefreshDatabase;
@ -26,7 +26,7 @@
private $episode;
private $user;
public function setUp()
public function setUp(): void
{
parent::setUp();

View File

@ -1,7 +1,7 @@
<?php
namespace Tests\Services;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
use App\Item;
@ -20,7 +20,7 @@
private $item;
private $itemService;
public function setUp()
public function setUp(): void
{
parent::setUp();
@ -162,7 +162,7 @@
$this->assertNotNull($item1);
$this->assertNull($item2);
}
/** @test */
public function it_should_parse_correct_imdb_id()
{

View File

@ -26,7 +26,7 @@
protected $user;
public function setUp()
public function setUp(): void
{
parent::setUp();
@ -78,28 +78,28 @@
$this->assertCount(38, AlternativeTitle::all());
$this->assertCount(1, Setting::all());
}
/** @test */
public function it_should_import_from_old_backup_file()
{
$oldBackupFile = json_decode(file_get_contents(__DIR__ . '/../fixtures/flox/export.json'));
$this->import($oldBackupFile);
}
/** @test */
public function it_should_import_from_new_backup_file()
{
$newBackupFile = json_decode(file_get_contents(__DIR__ . '/../fixtures/flox/export-new-version.json'));
$this->import($newBackupFile);
}
private function import($data)
{
$this->createStorageDownloadsMock();
$this->createRefreshAllMock();
$itemService = app(ItemService::class);
if(isset($data->items)) {

View File

@ -14,7 +14,7 @@
protected $user;
public function setUp()
public function setUp(): void
{
parent::setUp();
@ -47,7 +47,7 @@
$this->assertEquals(1, $newSettings->show_watchlist_everywhere);
$this->assertEquals('hover', $newSettings->show_ratings);
}
/** @test */
public function user_can_change_refresh()
{
@ -62,7 +62,7 @@
$this->assertEquals(0, $oldSettings->refresh_automatically);
$this->assertEquals(1, $newSettings->refresh_automatically);
}
/** @test */
public function user_can_change_reminders_send_to()
{
@ -77,7 +77,7 @@
$this->assertNull($oldSettings->reminders_send_to);
$this->assertEquals('jon@snow.io', $newSettings->reminders_send_to);
}
/** @test */
public function user_can_change_reminder_options()
{

View File

@ -13,10 +13,10 @@
protected $user;
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->user = factory(User::class)->create();
}

View File

@ -1,7 +1,7 @@
<?php
namespace Tests\Api;
use App\Episode;
use App\Item;
use Illuminate\Foundation\Testing\RefreshDatabase;
@ -17,7 +17,7 @@
private $episode;
private $movie;
public function setUp()
public function setUp(): void
{
parent::setUp();