From 07526e6693ca58b6e391f664e3141bc3535a730b Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 25 Feb 2020 16:26:38 -0500 Subject: [PATCH] Conclude the update to laravel 6.12.0, including the removal of tinx as it's no longer maintained --- app/Exceptions/Handler.php | 6 +- app/Http/Middleware/Authenticate.php | 2 +- app/Providers/RouteServiceProvider.php | 7 +++ composer.json | 1 - composer.lock | 82 +++++--------------------- config/database.php | 8 +-- config/logging.php | 6 +- config/session.php | 2 +- database/factories/UserFactory.php | 1 + phpunit.xml | 2 + resources/lang/en/passwords.php | 2 +- resources/lang/en/validation.php | 4 +- tests/Unit/ExampleTest.php | 3 +- 13 files changed, 46 insertions(+), 80 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 043cad6..364621e 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -31,6 +31,8 @@ class Handler extends ExceptionHandler * * @param \Exception $exception * @return void + * + * @throws \Exception */ public function report(Exception $exception) { @@ -42,7 +44,9 @@ class Handler extends ExceptionHandler * * @param \Illuminate\Http\Request $request * @param \Exception $exception - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response + * + * @throws \Exception */ public function render($request, Exception $exception) { diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index a4be5c5..704089a 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -10,7 +10,7 @@ class Authenticate extends Middleware * Get the path the user should be redirected to when they are not authenticated. * * @param \Illuminate\Http\Request $request - * @return string + * @return string|null */ protected function redirectTo($request) { diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 548e4be..f46ba78 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -16,6 +16,13 @@ class RouteServiceProvider extends ServiceProvider */ protected $namespace = 'App\Http\Controllers'; + /** + * The path to the "home" route for your application. + * + * @var string + */ + public const HOME = '/dashboard'; + /** * Define your route model bindings, pattern filters, etc. * diff --git a/composer.json b/composer.json index ea0399f..874baf8 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,6 @@ "license": "MIT", "require": { "php": "^7.2", - "ajthinking/tinx": "^2.4", "doctrine/dbal": "^2.6", "erusev/parsedown": "~1.6", "fideloper/proxy": "^4.0", diff --git a/composer.lock b/composer.lock index 122d845..223be5f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,59 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c456fcfe9c2d7e2e737bbd91ebdc1ee1", + "content-hash": "970a7f7543a80cb4e788008e8555589a", "packages": [ - { - "name": "ajthinking/tinx", - "version": "v2.6.0", - "source": { - "type": "git", - "url": "https://github.com/furey/tinx.git", - "reference": "1521cf0a8035d8192ac317f39e1a09b3222b9cf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/furey/tinx/zipball/1521cf0a8035d8192ac317f39e1a09b3222b9cf0", - "reference": "1521cf0a8035d8192ac317f39e1a09b3222b9cf0", - "shasum": "" - }, - "require": { - "illuminate/container": "^5.2|^6.0", - "laravel/tinker": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.4|^7.0" - }, - "type": "laravel", - "extra": { - "laravel": { - "providers": [ - "Ajthinking\\Tinx\\TinxServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Ajthinking\\Tinx\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anders Jürisoo", - "email": "jurisoo@hotmail.com" - }, - { - "name": "James Furey", - "homepage": "https://github.com/furey" - } - ], - "description": "Reload your Laravel Tinker session from inside Tinker, plus magic shortcuts for first(), find(), where(), and more!", - "time": "2019-10-03T14:56:43+00:00" - }, { "name": "composer/semver", "version": "1.5.1", @@ -1216,36 +1165,37 @@ }, { "name": "laravel/tinker", - "version": "v1.0.10", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7" + "reference": "37579c93271ec30ef099dd633ec7c2de5e5fb112" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/ad571aacbac1539c30d480908f9d0c9614eaf1a7", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7", + "url": "https://api.github.com/repos/laravel/tinker/zipball/37579c93271ec30ef099dd633ec7c2de5e5fb112", + "reference": "37579c93271ec30ef099dd633ec7c2de5e5fb112", "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" + "mockery/mockery": "^1.3.1", + "phpunit/phpunit": "^8.0|^9.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": [ @@ -1275,7 +1225,7 @@ "laravel", "psysh" ], - "time": "2019-08-07T15:10:45+00:00" + "time": "2020-02-05T15:00:44+00:00" }, { "name": "league/commonmark", diff --git a/config/database.php b/config/database.php index 199382d..b42d9b3 100644 --- a/config/database.php +++ b/config/database.php @@ -130,16 +130,16 @@ return [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), - 'database' => env('REDIS_DB', 0), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_DB', '0'), ], 'cache' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), - 'database' => env('REDIS_CACHE_DB', 1), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_CACHE_DB', '1'), ], ], diff --git a/config/logging.php b/config/logging.php index 0df8212..088c204 100644 --- a/config/logging.php +++ b/config/logging.php @@ -37,7 +37,7 @@ return [ 'channels' => [ 'stack' => [ 'driver' => 'stack', - 'channels' => ['daily'], + 'channels' => ['single'], 'ignore_exceptions' => false, ], @@ -95,6 +95,10 @@ return [ 'driver' => 'monolog', 'handler' => NullHandler::class, ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], ], ]; diff --git a/config/session.php b/config/session.php index 5366745..23d1e45 100644 --- a/config/session.php +++ b/config/session.php @@ -190,7 +190,7 @@ return [ | take place, and can be used to mitigate CSRF attacks. By default, we | do not enable this as other CSRF protection services are in place. | - | Supported: "lax", "strict" + | Supported: "lax", "strict", "none" | */ diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 084535f..741edea 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -1,6 +1,7 @@ + + diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php index 86f1082..724de4b 100644 --- a/resources/lang/en/passwords.php +++ b/resources/lang/en/passwords.php @@ -15,8 +15,8 @@ return [ 'reset' => 'Your password has been reset!', 'sent' => 'We have e-mailed your password reset link!', + 'throttled' => 'Please wait before retrying.', 'token' => 'This password reset token is invalid.', 'user' => "We can't find a user with that e-mail address.", - 'throttled' => 'Please wait before retrying.', ]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index ce1d80d..a65914f 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -40,7 +40,7 @@ return [ 'dimensions' => 'The :attribute has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute must end with one of the following: :values', + 'ends_with' => 'The :attribute must end with one of the following: :values.', 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', @@ -110,7 +110,7 @@ return [ 'string' => 'The :attribute must be :size characters.', 'array' => 'The :attribute must contain :size items.', ], - 'starts_with' => 'The :attribute must start with one of the following: :values', + 'starts_with' => 'The :attribute must start with one of the following: :values.', 'string' => 'The :attribute must be a string.', 'timezone' => 'The :attribute must be a valid zone.', 'unique' => 'The :attribute has already been taken.', diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 266ef35..358cfc8 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -2,8 +2,7 @@ namespace Tests\Unit; -use Illuminate\Foundation\Testing\RefreshDatabase; -use Tests\TestCase; +use PHPUnit\Framework\TestCase; class ExampleTest extends TestCase {