Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Update to Laravel 5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
marky291 committed Jul 20, 2019
1 parent add5dcd commit d77bc08
Show file tree
Hide file tree
Showing 35 changed files with 207 additions and 626 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120


REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
Expand All @@ -33,6 +34,11 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/storage/*.key
/vendor
.env
.env.backup
.idea
.phpunit.result.cache
Homestead.json
Expand Down
13 changes: 13 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
php:
preset: laravel
disabled:
- unused_use
finder:
not-name:
- index.php
- server.php
js:
finder:
not-name:
- webpack.mix.js
css: true
2 changes: 1 addition & 1 deletion app/Http/Controllers/API/ListingFilteringController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ListingFilteringController extends Controller
*/
public function filters($expTitle = 'all', $modeType = 'all', $tagName = 'all', $orderBy = 'all', $paginate = 7)
{
return Cache::remember("filter:{$expTitle}:{$modeType}:{$tagName}:{$orderBy}:{$paginate}", 120, function () use ($expTitle,$modeType,$tagName,$orderBy,$paginate) {
return Cache::remember("filter:{$expTitle}:{$modeType}:{$tagName}:{$orderBy}:{$paginate}", 60, static function () use ($expTitle,$modeType,$tagName,$orderBy,$paginate) {
/**
* All listings need a ranking, that can be sortable.
*/
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function validator(array $data)
return Validator::make($data, [
'username' => ['required', 'string', 'min:5', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:6', 'confirmed'],
'password' => ['required', 'string', 'min:8', 'confirmed'],
'avatarUrl' => ['string'],
]);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\App\Http\Middleware\TrustProxies::class,
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
];

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TrustProxies extends Middleware
/**
* The trusted proxies for this application.
*
* @var array
* @var array|string
*/
protected $proxies;

Expand Down
1 change: 1 addition & 0 deletions app/Listings/Listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* @method static create(array $validated)
* @method static make(array $validated)
* @method static whereName(string $name)
* @method static orderBy(string $string)
*/
class Listing extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion app/Listings/ListingRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ListingRepository
{
public static function LatestEntriesCache(int $count)
{
return Cache::remember('listing:latest-entries', 30, static function () use ($count) {
return Cache::remember('listing:latest-entries', now()->addMinutes(10), static function () use ($count) {
return ListingResource::collection(Listing::orderBy('created_at')->limit($count)->get());
});
}
Expand Down
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@
"require": {
"php": "^7.1.3",
"ext-json": "*",
"faustbrian/laravel-reportable": "^2.3",
"fideloper/proxy": "^4.0",
"gstt/laravel-achievements": "^1.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"martinlindhe/laravel-vue-i18n-generator": "^0.1.39",
"predis/predis": "^1.1",
"laravel/tinker": "^1.0",
"laravel/framework": "5.8.*",
"fideloper/proxy": "^4.0",
"spatie/laravel-permission": "^2.37",
"timehunter/laravel-google-recaptcha-v3": "~2.2.19"
"gstt/laravel-achievements": "^1.0",
"faustbrian/laravel-reportable": "^2.3",
"timehunter/laravel-google-recaptcha-v3": "~2.2.19",
"martinlindhe/laravel-vue-i18n-generator": "^0.1.39"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.2",
"beyondcode/laravel-dump-server": "^1.0",
"doctrine/dbal": "^2.9",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.5"
},
"config": {
"optimize-autoloader": true,
Expand Down
Loading

0 comments on commit d77bc08

Please sign in to comment.