Laravel 10.x Shift (#14995)

* Apply code style

* Remove explicit call to register policies

* Shift core files

* Shift config files

* Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.

* Bump Laravel dependencies

* Add type hints for Laravel 10

* Shift cleanup

* wip

* wip

* sync translation

* Sync back config

* Public Path Binding

* QueryException

* monolog

* db::raw

* monolog

* db::raw

* fix larastan collections

* fix phpstan bug looping forever

* larastan errors

* larastan: fix column type

* styleci

* initialize array

* fixes

* fixes

---------

Co-authored-by: Shift <shift@laravelshift.com>
This commit is contained in:
Jellyfrog
2023-05-24 22:21:54 +02:00
committed by GitHub
parent dd3ed41319
commit 2b3575a5e9
437 changed files with 1904 additions and 1913 deletions

View File

@@ -3,9 +3,9 @@
namespace App\Listeners;
use App\Models\User;
use DB;
use Illuminate\Auth\Events\Login;
use Illuminate\Auth\Events\Logout;
use Illuminate\Support\Facades\DB;
use Request;
class AuthEventListener

View File

@@ -24,7 +24,7 @@ class CheckAlerts
* @param DevicePolled $event
* @return void
*/
public function handle(DevicePolled $event)
public function handle(DevicePolled $event): void
{
Log::info('#### Start Alerts ####');
$start = microtime(true);

View File

@@ -22,7 +22,7 @@ class LegacyQueryListener
* @param \Illuminate\Database\Events\StatementPrepared $event
* @return void
*/
public function handle(StatementPrepared $event)
public function handle(StatementPrepared $event): void
{
global $PDO_FETCH_ASSOC;

View File

@@ -5,7 +5,7 @@ namespace App\Listeners;
use App\Events\UserCreated;
use App\Models\Notification;
use App\Models\NotificationAttrib;
use DB;
use Illuminate\Support\Facades\DB;
class MarkNotificationsRead
{
@@ -25,7 +25,7 @@ class MarkNotificationsRead
* @param UserCreated $event
* @return void
*/
public function handle(UserCreated $event)
public function handle(UserCreated $event): void
{
$user = $event->user;
// mark pre-existing notifications as read

View File

@@ -24,7 +24,7 @@ class QueryDebugListener
* @param \Illuminate\Database\Events\QueryExecuted $query
* @return void
*/
public function handle(QueryExecuted $query)
public function handle(QueryExecuted $query): void
{
if (Debug::queryDebugIsEnabled()) {
// collect bindings and make them a little more readable

View File

@@ -24,7 +24,7 @@ class QueryMetricListener
* @param \Illuminate\Database\Events\QueryExecuted $event
* @return void
*/
public function handle(QueryExecuted $event)
public function handle(QueryExecuted $event): void
{
$type = strtolower(substr($event->sql, 0, strpos($event->sql, ' ')));
app(MeasurementManager::class)->recordDb(Measurement::make($type, $event->time ? $event->time / 100 : 0));

View File

@@ -25,7 +25,7 @@ class UpdateDeviceGroups
* @param DevicePolled $event
* @return void
*/
public function handle(DevicePolled $event)
public function handle(DevicePolled $event): void
{
Log::info('### Start Device Groups ###');
$dg_start = microtime(true);