diff --git a/app/Console/Commands/AdminCreate.php b/app/Console/Commands/AdminCreate.php index 1c53218..28f3e00 100644 --- a/app/Console/Commands/AdminCreate.php +++ b/app/Console/Commands/AdminCreate.php @@ -7,6 +7,7 @@ use App\Models\User; class AdminCreate extends Command { + /** * The name and signature of the console command. * @@ -21,16 +22,6 @@ class AdminCreate extends Command */ protected $description = 'Create Admin User'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - /** * Execute the console command. * diff --git a/app/Console/Commands/UserCreate.php b/app/Console/Commands/UserCreate.php index 9210b03..c52723b 100644 --- a/app/Console/Commands/UserCreate.php +++ b/app/Console/Commands/UserCreate.php @@ -35,19 +35,19 @@ class UserCreate extends Command * * @return int */ + // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh public function handle() { $sitename = $this->ask('For which site would you like to create a user ?'); $site = Site::where('name', 'LIKE', "%$sitename%")->first(); - if ($site) { - if (!$this->confirm(sprintf('Would you like to use %s ? ', $site->name))) { - $this->info('Command cancelled'); - return 0; - } - } else { + if (!$site) { $this->error(sprintf('Site %s not found cancelled', $sitename)); return 0; } + if (!$this->confirm(sprintf('Would you like to use %s ? ', $site->name))) { + $this->info('Command cancelled'); + return 0; + } $name = null; while (is_null($name)) { try { diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 0d6f956..12d9ed1 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -28,7 +28,6 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - // $schedule->command('inspire')->hourly(); } /** diff --git a/app/Enums/CrudAction.php b/app/Enums/CrudAction.php deleted file mode 100644 index a059ded..0000000 --- a/app/Enums/CrudAction.php +++ /dev/null @@ -1,49 +0,0 @@ - 0, - 'view' => 1, - 'create' => 2, - 'update' => 3, - 'delete' => 4, - ]; - } - - protected static function labels(): array - { - return [ - 'viewAny' => trans('Liste'), - 'view' => trans('Voir'), - 'create' => trans('Créer'), - 'update' => trans('Éditer'), - 'delete' => trans('Supprimer'), - ]; - } -} diff --git a/app/Enums/CrudType.php b/app/Enums/CrudType.php deleted file mode 100644 index f0b8a1f..0000000 --- a/app/Enums/CrudType.php +++ /dev/null @@ -1,59 +0,0 @@ - 0, - 'int' => 1, - 'string' => 2, - 'text' => 3, - 'json' => 4, - 'image' => 5, - 'email' => 6, - 'password' => 7, - 'float' => 8, - 'enum' => 9, - 'belongsTo' => 10, - 'belongsToMany' => 11 - ]; - } - - protected static function labels(): array - { - return [ - 'boolean' => trans('Booléen'), - 'int' => trans('Nombre'), - 'string' => trans('Chaîne de charactères simple'), - 'text' => trans('Texte'), - 'json' => trans('Json'), - 'image' => trans('Image'), - 'email' => trans('Chaîne de charactères email'), - 'password' => trans('Mot de passe'), - 'float' => trans('Nombre à virgule flotante'), - 'enum' => trans('Énumération'), - 'belongsTo' => trans('Clé étrangère'), - 'belongsToMany' => trans('Relation Belongs To Many') - ]; - } -} diff --git a/app/Exceptions/CrudException.php b/app/Exceptions/CrudException.php deleted file mode 100644 index cdf73a9..0000000 --- a/app/Exceptions/CrudException.php +++ /dev/null @@ -1,9 +0,0 @@ -user(); - } } diff --git a/app/Http/Controllers/CrudController.php b/app/Http/Controllers/CrudController.php deleted file mode 100644 index bc747e5..0000000 --- a/app/Http/Controllers/CrudController.php +++ /dev/null @@ -1,262 +0,0 @@ -authorizeResource(static::$modelClass); - - $modelClass = static::$modelClass; - if (is_null($modelClass) or !class_exists($modelClass)) { - throw new CrudException(sprintf( - '%s needs the modelClass prop to be a class, %s %s given', - __CLASS__, - gettype($modelClass), - $modelClass - )); - } - if (!is_subclass_of($modelClass, Model::class)) { - throw new CrudException(sprintf( - '%s needs the model prop to be a class the extends %s', - __CLASS__, - Model::class - )); - } - if (!request()->ajax() and !app()->runningInConsole()) { - self::shareCrudModelsClassesToView(); - $this->shareModelClassToView(); - $this->shareModelHasImageToView(); - $this->shareModelTableToView(); - $this->shareModelPropsToView(); - } - } - - public function index(CrudIndexRequest $request) - { - /** @var \Illuminate\Database\Eloquent\Builder */ - $models = static::$modelClass::query(); - - // Search on crud Label column - if ($request->search) { - $model = static::$modelClass; - $col = (new $model())->crudLabelColumn; - $models = $models->where($col, 'LIKE', "%$request->search%"); - } - - // Sort columns - $tableName = (new static::$modelClass())->getTable(); - if ($request->rst) { - Session::remove("crud.$tableName.sort_col"); - Session::remove("crud.$tableName.sort_way"); - } - if ($request->sort_col) { - Session::put("crud.$tableName.sort_col", $request->sort_col); - Session::save(); - } - if ($request->sort_way) { - Session::put("crud.$tableName.sort_way", $request->sort_way); - Session::save(); - } - - if ( - Session::has("crud.$tableName.sort_col") and - Session::has("crud.$tableName.sort_way") and - Schema::hasColumn($tableName, Session::get("crud.$tableName.sort_col")) - ) { - $models = $models->orderBy( - Session::get("crud.$tableName.sort_col"), - Session::get("crud.$tableName.sort_way") - ); - } - - $models = $this->indexQuery($models); - /** @var \Illuminate\Pagination\AbstractPaginator */ - $models = $models->paginate(config('crud.paginate', 15)); - if ($request->ajax()) { - return response()->json(CrudResource::collection($models)); - } else { - $models = $models->withQueryString(); - return view('crud.index', compact('models')); - } - } - - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass - public function show(Model $model) - { - return view('crud.show', compact('model')); - } - - public function create() - { - return view('crud.create'); - } - - public function store(StoreCrudModel $request) - { - $modelClass = static::$modelClass; - $model = new $modelClass(); - $model->fill($request->validated()); - $this->storeModel($model); - $model->saveOrFail(); - $model->saveRelations($request); - $this->storedModel($model); - return \redirect()->route(sprintf('bo.%s.edit', $model->getTable()), $model) - ->with('success', trans(':model a bien été enregistré.', ['model' => $model->getModelName()])); - } - - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass - public function edit(Model $model) - { - return view('crud.edit', compact('model')); - } - - public function update(UpdateCrudModel $request, Model $model) - { - $model->fill($request->validated()); - $this->updateModel($model); - $model->saveOrFail(); - $model->saveRelations($request); - $this->updatedModel($model); - return \redirect()->route(sprintf('bo.%s.edit', $model->getTable()), $model) - ->with('success', trans(':model a bien été enregistré.', ['model' => $model->getModelName()])); - } - - public function destroy(Model $model) - { - if ( - !in_array(SoftDeletes::class, class_uses_recursive($model), true) and - $restrict = $model->gotHasManyRelationWithRestrictOnDelete() - ) { - return redirect()->back() - ->with('error', trans( - ':model n\'as pas pu être supprimé car il est encore associé avec des :associated', - [ - 'model' => $model->getModelName(), - 'associated' => Str::plural($restrict) - ] - )); - } - if ($model->delete()) { - return \redirect()->route(sprintf('bo.%s.index', $model->getTable())) - ->with('warning', trans(':model a bien été supprimé.', ['model' => $model->getModelName()])); - } else { - return redirect()->back() - ->with('error', trans(':model n\'as pas pu être supprimé', ['model' => $model->getModelName()])); - } - } - - public function getModelClass() - { - return static::$modelClass; - } - - /** - * Get the current model class - * - * @return void - */ - public static function shareCrudModelsClassesToView(): void - { - $models = []; - foreach (File::allFiles(\app_path('Http/Controllers')) as $file) { - $class = sprintf('App\Http\Controllers\%s', \substr($file->getFilename(), 0, -4)); - if (is_subclass_of($class, CrudController::class) and $class::$modelClass) { - $models[] = $class::$modelClass; - } - } - View::share('modelsClasses', $models); - } - - /** - * Get the current model class - * - * @return void - */ - private function shareModelClassToView(): void - { - View::share('modelClass', static::$modelClass); - } - - /** - * Get the current model class - * - * @return void - */ - private function shareModelHasImageToView(): void - { - /** @var \Illuminate\Database\Eloquent\Model $model */ - $model = static::$modelClass; - - View::share('hasImage', (bool)collect((new $model())->getEditableProperties())->filter(function ($prop) { - return $prop['type']->equals(CrudType::image()); - })->count()); - } - - /** - * Get the current model table - * - * @return void - */ - private function shareModelTableToView(): void - { - /** @var \Illuminate\Database\Eloquent\Model $model */ - $model = static::$modelClass; - - View::share('modelTable', (new $model())->getTable()); - } - - /** - * Get the current model properties - * - * @return void - */ - private function shareModelPropsToView(): void - { - $model = static::$modelClass; - View::share('props', (new $model())->getEditableProperties()); - } -} diff --git a/app/Http/Controllers/EmployeesController.php b/app/Http/Controllers/EmployeesController.php index f402d56..0c17490 100644 --- a/app/Http/Controllers/EmployeesController.php +++ b/app/Http/Controllers/EmployeesController.php @@ -15,11 +15,11 @@ use App\Http\Requests\EmployeeResetPasswordRequest; use App\Http\Requests\ImportEmployeesCsvFile; use App\Imports\EmployeeImport; use App\Imports\EmployeeSortie; -use App\Jobs\SendMailConfirmToEmployee; -use App\Jobs\SendMailResetPasswordToEmployee; use App\Jobs\SendEmployeeInfoMailToSiteRH; use App\Jobs\SendEmployeeLockedDownMailToEmployee; use App\Jobs\SendEmployeeLockedDownMailToSiteRH; +use App\Jobs\SendMailConfirmToEmployee; +use App\Jobs\SendMailResetPasswordToEmployee; use App\Mail\EmployeeInfoAddress; use App\Mail\EmployeeInfoBank; use App\Mail\EmployeeInfoFamily; @@ -36,17 +36,17 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Session; -use Illuminate\Support\Str; +use Kwaadpepper\CrudPolicies\Traits\CrudController; use Maatwebsite\Excel\Excel as LExcel; use Maatwebsite\Excel\Facades\Excel; -use Maatwebsite\Excel\Validators\ValidationException; use PhpOffice\PhpSpreadsheet\Reader\Exception as ReaderException; -class EmployeesController extends CrudController +class EmployeesController extends Controller { + use CrudController; /** @var Employee */ - protected static $modelClass = Employee::class; + public static $modelClass = Employee::class; // BO @@ -82,7 +82,7 @@ class EmployeesController extends CrudController public function importExit() { $this->authorize('importExit', Employee::class); - CrudController::shareCrudModelsClassesToView(); + self::shareCrudModelsClassesToView(); return view('back.employees.import-exit'); } @@ -104,7 +104,10 @@ class EmployeesController extends CrudController ); } catch (ReaderException $e) { // this time cannot read anything - return redirect()->back()->withErrors('Echec lors de l\'import le fichier doit être conforme à celui fourni lors du developement de l\'application'); + return redirect()->back()->withErrors( + // phpcs:ignore Generic.Files.LineLength.TooLong + 'Echec lors de l\'import le fichier doit être conforme à celui fourni lors du developement de l\'application' + ); } catch (Exception $e) { // $employeeImport->errorMessages // this time cannot read anything @@ -141,7 +144,7 @@ class EmployeesController extends CrudController public function import() { $this->authorize('import', Employee::class); - CrudController::shareCrudModelsClassesToView(); + self::shareCrudModelsClassesToView(); return view('back.employees.import'); } @@ -169,7 +172,10 @@ class EmployeesController extends CrudController )); } catch (ReaderException $e) { // this time cannot read anything - return redirect()->back()->withErrors('Echec lors de l\'import le fichier doit être conforme à celui fourni lors du developement de l\'application'); + return redirect()->back()->withErrors( + // phpcs:ignore Generic.Files.LineLength.TooLong + 'Echec lors de l\'import le fichier doit être conforme à celui fourni lors du developement de l\'application' + ); } finally { $message = ''; $errors = []; @@ -183,6 +189,7 @@ class EmployeesController extends CrudController } if (count($errors)) { $message = sprintf( + // phpcs:ignore Generic.Files.LineLength.TooLong "%d salariés ont été importés \n %d salariés mis à jour\n %d erreurs\n Les erreurs suivantes sont apparues %s", $employeeImport->importedCount, $employeeImport->updatedCount, @@ -236,10 +243,17 @@ class EmployeesController extends CrudController // Is employee locked down ? if ($employee->password_attempts >= 3) { - SendEmployeeLockedDownMailToEmployee::dispatchAfterResponse(new EmployeeLockedDown($employee), $employee); - SendEmployeeLockedDownMailToSiteRH::dispatchAfterResponse(new EmployeeYourAccountIsLockedDown($employee), $employee); + SendEmployeeLockedDownMailToEmployee::dispatchAfterResponse( + new EmployeeLockedDown($employee), + $employee + ); + SendEmployeeLockedDownMailToSiteRH::dispatchAfterResponse( + new EmployeeYourAccountIsLockedDown($employee), + $employee + ); return \redirect()->route('employees.login') ->withErrors( + // phpcs:ignore Generic.Files.LineLength.TooLong [trans('Votre compte est verrouillé, veuillez contacter votre responsable RH pour le déverrouiller')], 'lockedDown' )->with('site', $employee->site); @@ -317,7 +331,7 @@ class EmployeesController extends CrudController Session::remove('required'); Session::save(); return redirect()->route('fo.access') - ->with('message', trans('Votre mot de passe a bien été mis à jour')); + ->with('message', trans('Votre mot de passe a bien été mis à jour')); } return \redirect()->back()->with('success', true); } diff --git a/app/Http/Controllers/FlashesController.php b/app/Http/Controllers/FlashesController.php index bb3b306..4f6c515 100644 --- a/app/Http/Controllers/FlashesController.php +++ b/app/Http/Controllers/FlashesController.php @@ -6,12 +6,14 @@ use App\Models\Flash; use App\Models\Site; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; +use Kwaadpepper\CrudPolicies\Traits\CrudController; -class FlashesController extends CrudController +class FlashesController extends Controller { + use CrudController; /** @var Flash */ - protected static $modelClass = Flash::class; + public static $modelClass = Flash::class; // BO diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 3b2302c..291a33c 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -2,6 +2,8 @@ namespace App\Http\Controllers; +use Kwaadpepper\CrudPolicies\Traits\CrudController; + class HomeController extends Controller { // BO diff --git a/app/Http/Controllers/PlanningController.php b/app/Http/Controllers/PlanningController.php index 724e316..6a60ac8 100644 --- a/app/Http/Controllers/PlanningController.php +++ b/app/Http/Controllers/PlanningController.php @@ -7,6 +7,7 @@ use App\Imports\PlanningImport; use App\Models\Planning; use App\Models\Site; use Illuminate\Http\UploadedFile; +use Kwaadpepper\CrudPolicies\Traits\CrudController; use Maatwebsite\Excel\Facades\Excel; use Maatwebsite\Excel\Excel as LExcel; use Maatwebsite\Excel\HeadingRowImport; @@ -78,7 +79,10 @@ class PlanningController extends Controller } } catch (ReaderException $e) { // this time cannot read anything - return redirect()->back()->withErrors('Echec lors de l\'import le fichier doit être conforme à celui fourni lors du developement de l\'application'); + return redirect()->back()->withErrors( + // phpcs:ignore Generic.Files.LineLength.TooLong + 'Echec lors de l\'import le fichier doit être conforme à celui fourni lors du developement de l\'application' + ); } finally { return redirect()->route('bo.plannings.import') ->with('success', sprintf( @@ -119,7 +123,9 @@ class PlanningController extends Controller '', '', '', + //phpcs:ignore Generic.Files.LineLength.TooLong '', + //phpcs:ignore Generic.Files.LineLength.TooLong "", "matricule ." ". $customerIntel['employee']->firstname ." ".$customerIntel['employee']->lastname; + $identifier = sprintf( + '%s %s %s', + $customerIntel['employee']->matricule, + $customerIntel['employee']->firstname, + $customerIntel['employee']->lastname + ); $w->insertOne(array_replace( - $tmpl, [ $identifier, - + ], $customerIntel['answers'] )); diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index ebb9e2f..f025da4 100644 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -6,12 +6,14 @@ use App\Enums\Role; use App\Models\User; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; +use Kwaadpepper\CrudPolicies\Traits\CrudController; -class UsersController extends CrudController +class UsersController extends Controller { + use CrudController; /** @var User */ - protected static $modelClass = User::class; + public static $modelClass = User::class; // Eloquent callbacks public function indexQuery(Builder $query): Builder diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index aedaee4..c7ad2b8 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -15,7 +15,6 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ - // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, \Fruitcake\Cors\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 19c7ac5..3d19142 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -20,5 +20,10 @@ class TrustProxies extends Middleware * * @var int */ - protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB; + protected $headers = + Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_HOST | + Request::HEADER_X_FORWARDED_PORT | + Request::HEADER_X_FORWARDED_PROTO | + Request::HEADER_X_FORWARDED_AWS_ELB; } diff --git a/app/Http/Requests/CrudIndexRequest.php b/app/Http/Requests/CrudIndexRequest.php deleted file mode 100644 index c745aa3..0000000 --- a/app/Http/Requests/CrudIndexRequest.php +++ /dev/null @@ -1,30 +0,0 @@ -check(); - } - - /** - * Get the validation rules that apply to the request. - * - * @return array - */ - public function rules() - { - return [ - 'search' => 'nullable|string' - ]; - } -} diff --git a/app/Http/Requests/CrudRequest.php b/app/Http/Requests/CrudRequest.php deleted file mode 100644 index a7a3cbf..0000000 --- a/app/Http/Requests/CrudRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -getCurrentModel(); - $props = $this->getCurrentModel()::getEditableProperties(); - $propsRules = []; - foreach ($this->getCurrentModel()::getRules() as $k => $rules) { - $propsRules[$k] = []; - $propIsAllowedOnUpdateAction = in_array($action, $props[$k]['actions']); - foreach ($rules as $rule) { - // dont copy required if prop is not allowed on update - if (!$propIsAllowedOnUpdateAction and is_string($rule) and $rule == 'required') { - continue; - } - if (!in_array($rule, $propsRules[$k])) { - $propsRules[$k][] = $rule; - } - // handle password - if ( - $props[$k]['type']->equals(CrudType::password()) and - !$this->{$k} or (is_string($this->{$k}) and !\strlen($this->{$k})) - ) { - $this->offsetUnset($k); - } - // handle boolean - if ($props[$k]['type']->equals(CrudType::boolean())) { - $this->merge([$k => $this->{$k} ? 1 : 0]); - } - // handle image - if ($props[$k]['type']->equals(CrudType::image())) { - $tableName = Str::singular((new $model())->getTable()); - if ($this->{$tableName}) { - $i = array_search('required', $propsRules[$k]); - unset($propsRules[$k][$i]); - } - } - // handle belongsToMany - if ($props[$k]['type']->equals(CrudType::belongsToMany())) { - $propsRules["$k.*"][0] = 'exists:' . - (new $props[$k]['belongsToMany']())->getTable() . ',id'; - if (!isset($this->{$k})) { - $this->merge([$k => []]); - } - } - } - } - return $propsRules; - } - /** - * Returns the first parameter that is a crud model - * - * @return string \Illuminate\Database\Eloquent\Model class name - * @throws \App\Exceptions\CrudException if the request does not have a crud model parameter - */ - protected function getCurrentModel(): string - { - if ( - !is_object($this->route()->controller) or - !$this->route()->controller instanceof CrudController - ) { - throw new CrudException(sprintf( - 'Request `%s` needs to be bound on route that use a CrudController', - get_class($this) - )); - } - return $this->route()->controller->getModelClass(); - } -} diff --git a/app/Http/Requests/EmployeePasswordChangeRequest.php b/app/Http/Requests/EmployeePasswordChangeRequest.php index 225331e..61a2664 100644 --- a/app/Http/Requests/EmployeePasswordChangeRequest.php +++ b/app/Http/Requests/EmployeePasswordChangeRequest.php @@ -44,6 +44,7 @@ class EmployeePasswordChangeRequest extends FormRequest 'newpassword' => [ 'required', 'string', + // phpcs:ignore Generic.Files.LineLength.TooLong 'regex:/^(?=.*[A-Z])(?=.*[²&~"#\'\{\(\[\-|`_\\^@\)\°=+\}¨^$£¤%?,;.:\/!§*<>])(?=.*[0-9].*)(?=.*[a-z]).{8,}$/' ], 'newpasswordConfirm' => 'required|same:newpassword' diff --git a/app/Http/Requests/EmployeeResetPasswordRequest.php b/app/Http/Requests/EmployeeResetPasswordRequest.php index 6869165..43cf339 100644 --- a/app/Http/Requests/EmployeeResetPasswordRequest.php +++ b/app/Http/Requests/EmployeeResetPasswordRequest.php @@ -28,6 +28,7 @@ class EmployeeResetPasswordRequest extends FormRequest 'newpassword' => [ 'required', 'string', + // phpcs:ignore Generic.Files.LineLength.TooLong 'regex:/^(?=.*[A-Z])(?=.*[²&~"#\'\{\(\[\-|`_\\^@\)\°=+\}¨^$£¤%?,;.:\/!§*<>])(?=.*[0-9].*)(?=.*[a-z]).{8,}$/' ], 'newpasswordConfirm' => 'required|same:newpassword' diff --git a/app/Http/Requests/StoreCrudModel.php b/app/Http/Requests/StoreCrudModel.php deleted file mode 100644 index b4d9414..0000000 --- a/app/Http/Requests/StoreCrudModel.php +++ /dev/null @@ -1,32 +0,0 @@ -check(); - if ($authorized) { - $this->rules = $this->getRulesForAction(CrudAction::create()); - } - return $authorized; - } - - /** - * Get the validation rules that apply to the request. - * - * @return array - */ - public function rules() - { - return $this->rules; - } -} diff --git a/app/Http/Requests/UpdateCrudModel.php b/app/Http/Requests/UpdateCrudModel.php deleted file mode 100644 index 8738cf5..0000000 --- a/app/Http/Requests/UpdateCrudModel.php +++ /dev/null @@ -1,32 +0,0 @@ -check(); - if ($authorized) { - $this->rules = $this->getRulesForAction(CrudAction::update()); - } - return $authorized; - } - - /** - * Get the validation rules that apply to the request. - * - * @return array - */ - public function rules() - { - return $this->rules; - } -} diff --git a/app/Http/Requests/UpdateSondage.php b/app/Http/Requests/UpdateSondage.php index 39f0588..1e68eab 100644 --- a/app/Http/Requests/UpdateSondage.php +++ b/app/Http/Requests/UpdateSondage.php @@ -2,6 +2,8 @@ namespace App\Http\Requests; +use Kwaadpepper\CrudPolicies\Http\Requests\UpdateCrudModel; + class UpdateSondage extends UpdateCrudModel { /** diff --git a/app/Http/Resources/CrudResource.php b/app/Http/Resources/CrudResource.php deleted file mode 100644 index dd2853b..0000000 --- a/app/Http/Resources/CrudResource.php +++ /dev/null @@ -1,22 +0,0 @@ - $this->crudLabel, - 'value' => $this->crudValue - ]; - } -} diff --git a/app/Lib/PolicySystem/RootPolicy.php b/app/Lib/PolicySystem/RootPolicy.php deleted file mode 100644 index 121d5d4..0000000 --- a/app/Lib/PolicySystem/RootPolicy.php +++ /dev/null @@ -1,106 +0,0 @@ -policy = \strtolower(\str_replace('Policy', '', \end($cls))); - } - - protected function actionPolicy(string $method, string $policy, User $user, Model $model = null) - { - $this->setPolicies($user, $model); - $ctx = [$policy, $user, $model]; - - if (!$this->hasPolicy($policy)) { - $m = __('Unhandled policy ":policy"', ['policy' => $policy]); - Log::critical($m, $ctx); - return $this->deny($m); - } - - if (!is_array($this->policies[$policy])) { - $m = __('Policy ":policy" has to be array', ['policy' => $policy]); - Log::critical($m, $ctx); - return $this->deny($m); - } - - // Policy method exists - if (!array_key_exists($method, $this->policies[$policy])) { - $m = __('Unhandled policy ":policy" for action ":action"', ['policy' => $policy, 'action' => $method]); - Log::critical($m, $ctx); - return $this->deny($m); - } - - // Call policy method - if (Sr::handle($this->policies[$policy][$method], $user, $model)) { - return $this->allow(); - } else { - $m = __('Policy ":policy" for action ":action" denied :onmodel', [ - 'policy' => $policy, - 'action' => $method, - 'onmodel' => $model ? get_class($model) : '' - ]); - if (config('app.policyDebug')) { - Log::debug(sprintf("%s user => %s model => %s", $m, $user, $model), $ctx); - } - return $this->deny($m); - } - - $m = __('Unhandled policy case on resource ":method"', ['method' => $method]); - Log::critical($m, $ctx); - return $this->deny(); - } - - /** - ** Do the magic calling Root policy from any policy - */ - public function __call($method, $args) - { - return call_user_func_array([$this, 'actionPolicy'], array_merge([$method, $this->policy], $args)); - } - - private function hasPolicy(string $policy) - { - return array_key_exists($policy, $this->policies); - } - - /** - * Allow action for the user - * - * @param string|null $message - * @return \Illuminate\Auth\Access\Response - */ - protected function allow(?string $message = null) - { - return Response::allow($message); - } - - /** - * Deny action for the user - * - * @param string|null $message - * @param mixed $code - * @return \Illuminate\Auth\Access\Response - */ - protected function deny(?string $message = null, $code = null) - { - if (!$message) { - $message = __('This action is not allowed to you for this resource.'); - } - return Response::deny($message, $code); - } -} diff --git a/app/Lib/PolicySystem/StaticRules.php b/app/Lib/PolicySystem/StaticRules.php deleted file mode 100644 index 034b05e..0000000 --- a/app/Lib/PolicySystem/StaticRules.php +++ /dev/null @@ -1,86 +0,0 @@ - CrudType::json(), 'validate' => [ 'json', + // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed function ($attribute, $value, $fail) { $pattern = '/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/'; $a = \json_decode($value, true); diff --git a/app/Models/Sondage.php b/app/Models/Sondage.php index 95deab8..5b70bfe 100644 --- a/app/Models/Sondage.php +++ b/app/Models/Sondage.php @@ -2,12 +2,12 @@ namespace App\Models; -use App\Enums\CrudAction; -use App\Enums\CrudType; use App\Enums\TypeSondage; -use App\Traits\IsCrudModel; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Kwaadpepper\CrudPolicies\Enums\CrudAction; +use Kwaadpepper\CrudPolicies\Enums\CrudType; +use Kwaadpepper\CrudPolicies\Traits\IsCrudModel; use Kwaadpepper\Enum\Traits\CastsEnums; class Sondage extends Model diff --git a/app/Models/User.php b/app/Models/User.php index a26f60f..d82e546 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,15 +2,15 @@ namespace App\Models; -use App\Enums\CrudAction; -use App\Enums\CrudType; use App\Enums\Role; -use App\Traits\IsCrudModel; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Str; +use Kwaadpepper\CrudPolicies\Enums\CrudAction; +use Kwaadpepper\CrudPolicies\Enums\CrudType; +use Kwaadpepper\CrudPolicies\Traits\IsCrudModel; use Kwaadpepper\Enum\Traits\CastsEnums; class User extends Authenticatable diff --git a/app/Policies/AppPolicies.php b/app/Policies/AppPolicies.php index 8d46d1d..5afe0c4 100644 --- a/app/Policies/AppPolicies.php +++ b/app/Policies/AppPolicies.php @@ -3,8 +3,6 @@ namespace App\Policies; use App\Models\User; -use App\Lib\PolicySystem\RootPolicy; -use App\Lib\PolicySystem\StaticRules as Sr; use App\Policies\Rules\FlashStaticRules as FSR; use App\Policies\Rules\UserStaticRules as USR; use App\Policies\Rules\UserRoleRules as URR; @@ -12,6 +10,8 @@ use App\Policies\Rules\SiteStaticRules as SSR; use App\Policies\Rules\SondageStaticRules as SoSR; use App\Policies\Rules\EmployeeStaticRules as SaSR; use Illuminate\Database\Eloquent\Model; +use Kwaadpepper\CrudPolicies\Policies\RootPolicy; +use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; class AppPolicies extends RootPolicy { @@ -46,11 +46,11 @@ class AppPolicies extends RootPolicy ], 'site' => [ 'viewAny' => USR::make('everyOne'), - 'view' => Sr::or([ + 'view' => StaticRules::or([ URR::make('userIsAdmin', $user), SSR::make('siteIsOwnedByUser', $user, $model) ]), - 'update' => Sr::or([ + 'update' => StaticRules::or([ URR::make('userIsAdmin', $user), SSR::make('siteIsOwnedByUser', $user, $model) ]), @@ -59,32 +59,32 @@ class AppPolicies extends RootPolicy ], 'flash' => [ 'viewAny' => USR::make('everyOne'), - 'view' => Sr::or([ + 'view' => StaticRules::or([ URR::make('userIsAdmin', $user), FSR::make('flashIsOwnedByUser', $user, $model) ]), - 'update' => Sr::or([ + 'update' => StaticRules::or([ URR::make('userIsAdmin', $user), FSR::make('flashIsOwnedByUser', $user, $model) ]), 'create' => USR::make('everyOne'), - 'delete' => Sr::or([ + 'delete' => StaticRules::or([ URR::make('userIsAdmin', $user), FSR::make('flashIsOwnedByUser', $user, $model) ]) ], 'employee' => [ 'viewAny' => USR::make('everyOne'), - 'view' => Sr::or([ + 'view' => StaticRules::or([ URR::make('userIsAdmin', $user), SaSR::make('employeeIsOwnedByUser', $user, $model) ]), - 'update' => Sr::or([ + 'update' => StaticRules::or([ URR::make('userIsAdmin', $user), SaSR::make('employeeIsOwnedByUser', $user, $model) ]), 'create' => USR::make('everyOne'), - 'delete' => Sr::or([ + 'delete' => StaticRules::or([ URR::make('userIsAdmin', $user), SaSR::make('employeeIsOwnedByUser', $user, $model) ]), @@ -93,26 +93,26 @@ class AppPolicies extends RootPolicy ], 'sondage' => [ 'viewAny' => USR::make('everyOne'), - 'view' => Sr::or([ + 'view' => StaticRules::or([ URR::make('userIsAdmin', $user), SoSR::make('sondageIsOwnedByUser', $user, $model) ]), // edit - 'update' => Sr::or([ + 'update' => StaticRules::or([ URR::make('userIsAdmin', $user), SoSR::make('sondageIsOwnedByUser', $user, $model) ]), // update submit - 'updateSondage' => Sr::or([ + 'updateSondage' => StaticRules::or([ URR::make('userIsAdmin', $user), SoSR::make('sondageIsOwnedByUser', $user, $model) ]), 'create' => USR::make('everyOne'), - 'delete' => Sr::or([ + 'delete' => StaticRules::or([ URR::make('userIsAdmin', $user), SoSR::make('sondageIsOwnedByUser', $user, $model) ]), - 'export' => Sr::or([ + 'export' => StaticRules::or([ URR::make('userIsAdmin', $user), SoSR::make('sondageIsOwnedByUser', $user, $model) ]), @@ -122,11 +122,11 @@ class AppPolicies extends RootPolicy ], 'user' => [ 'viewAny' => USR::make('everyOne'), - 'view' => Sr::or([ + 'view' => StaticRules::or([ URR::make('userIsAdmin', $user), USR::make('usersAreTheSame', $user, $model) ]), - 'update' => Sr::or([ + 'update' => StaticRules::or([ URR::make('userIsAdmin', $user), USR::make('usersAreTheSame', $user, $model) ]), diff --git a/app/Policies/Rules/EmployeeStaticRules.php b/app/Policies/Rules/EmployeeStaticRules.php index 57569ef..5e6cb23 100644 --- a/app/Policies/Rules/EmployeeStaticRules.php +++ b/app/Policies/Rules/EmployeeStaticRules.php @@ -3,8 +3,8 @@ namespace App\Policies\Rules; use App\Models\User; -use App\Lib\PolicySystem\StaticRules; use App\Models\Employee; +use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules diff --git a/app/Policies/Rules/FlashStaticRules.php b/app/Policies/Rules/FlashStaticRules.php index a79773f..36b929e 100644 --- a/app/Policies/Rules/FlashStaticRules.php +++ b/app/Policies/Rules/FlashStaticRules.php @@ -3,8 +3,8 @@ namespace App\Policies\Rules; use App\Models\User; -use App\Lib\PolicySystem\StaticRules; use App\Models\Flash; +use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules diff --git a/app/Policies/Rules/SiteStaticRules.php b/app/Policies/Rules/SiteStaticRules.php index 8757eb2..b3630bd 100644 --- a/app/Policies/Rules/SiteStaticRules.php +++ b/app/Policies/Rules/SiteStaticRules.php @@ -3,8 +3,8 @@ namespace App\Policies\Rules; use App\Models\User; -use App\Lib\PolicySystem\StaticRules; use App\Models\Site; +use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules diff --git a/app/Policies/Rules/SondageStaticRules.php b/app/Policies/Rules/SondageStaticRules.php index 0bd4e58..4880470 100644 --- a/app/Policies/Rules/SondageStaticRules.php +++ b/app/Policies/Rules/SondageStaticRules.php @@ -3,8 +3,8 @@ namespace App\Policies\Rules; use App\Models\User; -use App\Lib\PolicySystem\StaticRules; use App\Models\Sondage; +use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules diff --git a/app/Policies/Rules/UserRoleRules.php b/app/Policies/Rules/UserRoleRules.php index afbfd55..36d144c 100644 --- a/app/Policies/Rules/UserRoleRules.php +++ b/app/Policies/Rules/UserRoleRules.php @@ -4,7 +4,7 @@ namespace App\Policies\Rules; use App\Enums\Role; use App\Models\User; -use App\Lib\PolicySystem\StaticRules; +use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules diff --git a/app/Policies/Rules/UserStaticRules.php b/app/Policies/Rules/UserStaticRules.php index 9258d8c..fd5e0f2 100644 --- a/app/Policies/Rules/UserStaticRules.php +++ b/app/Policies/Rules/UserStaticRules.php @@ -3,7 +3,7 @@ namespace App\Policies\Rules; use App\Models\User; -use App\Lib\PolicySystem\StaticRules; +use Kwaadpepper\CrudPolicies\Policies\Rules\StaticRules; /** * Userlevel Policiy Static Rules diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 4952ec1..7cebb24 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -13,9 +13,7 @@ class AuthServiceProvider extends ServiceProvider * * @var array */ - protected $policies = [ - // 'App\Models\Model' => 'App\Policies\ModelPolicy', - ]; + protected $policies = []; /** * Register any authentication / authorization services. diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 07af547..95bfcff 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -28,15 +28,6 @@ class RouteServiceProvider extends ServiceProvider */ public const HOME = '/bo'; - /** - * The controller namespace for the application. - * - * When present, controller route declarations will automatically be prefixed with this namespace. - * - * @var string|null - */ - // protected $namespace = 'App\\Http\\Controllers'; - /** * Define your route model bindings, pattern filters, etc. * diff --git a/app/Traits/IsCrudModel.php b/app/Traits/IsCrudModel.php deleted file mode 100644 index c8080da..0000000 --- a/app/Traits/IsCrudModel.php +++ /dev/null @@ -1,532 +0,0 @@ - null, - 'placeholder' => '', - 'type' => null, - 'enum' => null, - 'nullable' => false, - 'readonly' => false, - 'disabled' => false, - 'required' => false, - 'validate' => [], - 'rules' => [], - 'actions' => [], - 'belongsTo' => null, - 'belongsToMany' => null, - 'getAttribute' => null, - 'setAttribute' => null - ]; - - // OVERLOAD MODEL FUNCTION - public function __get($key) - { - if ( - isset(static::$editableProperties[$key]['getAttribute']) and - is_callable(static::$editableProperties[$key]['getAttribute']) - ) { - return static::$editableProperties[$key]['getAttribute']($this); - } - return parent::__get($key); - } - - // OVERLOAD MODEL FUNCTION - public function __set($key, $value) - { - if ( - isset($this::$editableProperties[$key]['setAttribute']) and - is_callable($this::$editableProperties[$key]['setAttribute']) - ) { - return $this::$editableProperties[$key]['setAttribute']($this, $value); - } - return parent::__set($key, $value); - } - - // OVERLOAD MODEL FUNCTION - public function fill(array $attributes) - { - parent::fill($attributes); - foreach ($attributes as $k => $attribute) { - if ( - isset(static::$editableProperties[$k]['setAttribute']) and - is_callable(static::$editableProperties[$k]['setAttribute']) - ) { - $this->{$k} = $attribute; - } - if (\is_object($this->{$k}) and \get_class($this->{$k}) === UploadedFile::class) { - $this->moveUploadedFile($k, $this->{$k}); - } - } - } - - public function saveRelations(CrudRequest $request) - { - $validated = $request->validated(); - $props = self::getEditableProperties(); - foreach ($props as $k => $prop) { - if ($prop['belongsToMany']) { - $this->{$k}()->sync(is_array($validated[$k]) ? $validated[$k] : []); - } - } - } - - /** - * Has this model Has many relations with delete restrict ? - * - * @return bool|string - */ - public function gotHasManyRelationWithRestrictOnDelete() - { - $sm = DB::getDoctrineSchemaManager(); - foreach (self::getRelationships() as $relation => $type) { - if ($type[0] === 'HasMany') { - $table = (new $type[1]())->getTable(); - /** @var \Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey */ - foreach ($sm->listTableForeignKeys($table) as $foreignKey) { - // /vendor/doctrine/dbal/src/Schema/ForeignKeyConstraint.php onEvent() - if ($foreignKey->onDelete() === 'CASCADE') { - // allow only CASCADE action, otherwise it would break the app - continue; - } - return class_basename($type[1]); - } - } - } - return false; - } - - /** - * Get the crud label - */ - public function getCrudLabelAttribute() - { - return $this->{$this->crudLabelColumn}; - } - - /** - * Get the crud value - */ - public function getCrudValueAttribute() - { - if (is_null($this->crudValueColumn)) { - throw new CrudException(sprintf( - '[\'belongsTo\'] model `%s` must have `crudValueColumn` property', - get_class($this), - CrudAction::class - )); - } - return $this->{$this->crudValueColumn}; - } - - /** - * Get the crud label column - */ - public function getCrudLabelColumnAttribute() - { - if (is_null($this->crudLabelColumn)) { - throw new CrudException(sprintf( - '[\'belongsTo\'] model `%s` must have `crudLabelColumn` property', - get_class($this), - CrudAction::class - )); - } - return $this->crudLabelColumn; - } - - /** - * Get the crud value column - */ - public function getCrudValueColumnAttribute() - { - return $this->crudValueColumn; - } - - /** - * Get the model validation rules - * - * @return array - */ - public static function getRules(): array - { - return collect(static::$editableProperties)->mapWithKeys(function ($item, $key) { - $item = \array_merge(self::$schemaCrud, $item); - $defaultRules = []; - if (!$item['nullable'] === true) { - $defaultRules[] = 'required'; - } elseif ($item['required'] === true) { - $defaultRules[] = 'required'; - } elseif ($item['readonly'] === true) { - $defaultRules[] = 'prohibited'; - } - switch ($item['type']) { - case CrudType::boolean(): - $defaultRules[] = 'boolean'; - break; - case CrudType::image(): - $defaultRules[] = 'file'; - break; - case CrudType::email(): - $defaultRules[] = 'email:rfc,dns'; - break; - case CrudType::belongsTo(): - $defaultRules[] = 'integer'; - $defaultRules[] = 'min:0'; - break; - case CrudType::int(): - $defaultRules[] = 'integer'; - break; - case CrudType::belongsToMany(): - $defaultRules[] = 'array'; - break; - case CrudType::password(): - // phpcs:ignore Generic.Files.LineLength.TooLong - $defaultRules[] = "regex:/^(?=.*[A-Z])(?=.*[²&~\"#'\{\(\[\-|`_\\^@\)\°=+\}¨^\$£¤%?,;.:\/!§*<>])(?=.*[0-9].*)(?=.*[a-z]).{8,}$/"; - break; - case CrudType::text(): - case CrudType::string(): - default: - $defaultRules[] = 'string'; - break; - } - return [$key => array_merge($defaultRules, $item['validate'] ?? self::$schemaCrud['validate'])]; - })->all(); - } - - /** - * Get the model Name - * - * @return string - */ - public function getModelName(): string - { - return class_basename(get_class($this)); - } - - private function moveUploadedFile(string $propName, UploadedFile &$file): void - { - $this->{$propName} = $file->storePubliclyAs( - $this->getTable(), - $file->hashName(), - ['disk' => 'public'] - ); - } - - /** - * Get the Editable Properties - * - * @return array - */ - public static function getEditableProperties(): array - { - static::assertEditablePropertiesIsCorrect(); - return static::$editableProperties; - } - - /** - * Assert self::$editableProperties is in a correct format - * - * 'string' => CrudType::value() - * - * @return void - * @throws Exception - */ - private static function assertEditablePropertiesIsCorrect(): void - { - if (empty(static::$editableProperties)) { - throw new CrudException('$editableProperties must be defined in ' . __CLASS__); - } - foreach (static::$editableProperties as $name => &$prop) { - if (!is_string($name)) { - throw new CrudException(sprintf( - 'editableProperties array value must be an array given: %s', - print_r($prop, true) // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Found - )); - } - if (!is_array($prop)) { - throw new CrudException(sprintf( - 'editableProperties array value must be an array given: %s', - print_r($prop, true) // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Found - )); - } - $prop = array_merge_recursive_distinct(self::$schemaCrud, $prop); - - // Auto label - $prop['label'] = $prop['label'] ?? ucfirst($name); - self::assertLabelIscorrect($prop); - self::assertPlaceholderIscorrect($prop); - self::assertTypeIscorrect($prop); - switch ($prop['type']) { - // Email auto rule - case CrudType::email(): - $prop['validate'] = is_array($prop['validate']) ? $prop['validate'] : []; - if (!array_search('email:rfc,dns', $prop['validate'])) { - $prop['validate'][] = 'email:rfc,dns'; - } - break; - case CrudType::json(): - $prop['validate'] = is_array($prop['validate']) ? $prop['validate'] : []; - if (!array_search('json', $prop['validate'])) { - $prop['validate'][] = 'json'; - } - break; - } - self::assertNullableIscorrect($prop); - self::assertReadonlyIscorrect($prop); - self::assertDisabledIscorrect($prop); - self::assertValidateIscorrect($prop); - self::assertRulesArecorrect($prop); - self::assertActionsArecorrect($prop); - self::assertBelongsToIsCorrect($prop); - self::assertEnumIscorrect($prop); - self::assertGetAttributeIscorrect($prop); - self::assertSetAttributeIscorrect($prop); - self::assertBelongsToManyIsCorrect($prop); - } - } - - private static function assertLabelIscorrect(array $prop): void - { - if (!isset($prop['label']) or !is_string($prop['label'])) { - throw new CrudException('$editableProperties[\'label\'] array value must be a string'); - } - } - - private static function assertPlaceholderIscorrect(array $prop): void - { - if (!isset($prop['placeholder']) or !is_string($prop['placeholder'])) { - throw new CrudException('$editableProperties[\'placeholder\'] array value must be a string'); - } - } - - private static function assertTypeIscorrect(array $prop): void - { - if (!isset($prop['type']) or !is_object($prop['type']) or get_class($prop['type']) !== CrudType::class) { - throw new CrudException('$editableProperties[\'type\'] value must be a CrudType enum'); - } - } - - private static function assertNullableIscorrect(array $prop): void - { - if (!isset($prop['nullable']) or !is_bool($prop['nullable'])) { - throw new CrudException('$editableProperties[\'nullable\'] array value must be a boolean'); - } - } - - private static function assertReadonlyIscorrect(array $prop): void - { - if ( - !isset($prop['readonly']) or - (!is_bool($prop['readonly']) and !\is_callable($prop['readonly'])) - ) { - throw new CrudException('$editableProperties[\'readonly\'] array value must be a boolean or a function returnning a boolean'); - } - } - - private static function assertDisabledIscorrect(array $prop): void - { - if (!isset($prop['disabled']) or !is_bool($prop['disabled'])) { - throw new CrudException('$editableProperties[\'disabled\'] array value must be a boolean'); - } - } - - private static function assertRequiredIscorrect(array $prop): void - { - if (!isset($prop['required']) or !is_bool($prop['required'])) { - throw new CrudException('$editableProperties[\'required\'] array value must be a boolean'); - } - } - - private static function assertValidateIscorrect(array $prop): void - { - if (!isset($prop['validate']) or !\is_array($prop['validate'])) { - throw new CrudException('$editableProperties[\'validate\'] array value must be an array'); - } - } - - private static function assertGetAttributeIscorrect(array $prop): void - { - if (!is_null($prop['getAttribute']) and !is_callable($prop['getAttribute'])) { - throw new CrudException('$editableProperties[\'getAttribute\'] array value must be callable'); - } - } - - private static function assertSetAttributeIscorrect(array $prop): void - { - if (!is_null($prop['setAttribute']) and !is_callable($prop['setAttribute'])) { - throw new CrudException('$editableProperties[\'setAttribute\'] array value must be callable'); - } - } - - private static function assertRulesArecorrect(array $prop): void - { - $allowedRules = [ - 'min' => function ($v) { - return \is_numeric($v); - }, - 'max' => function ($v) { - return \is_numeric($v); - }, - 'step' => function ($v) { - return \is_numeric($v); - }, - ]; - if (!isset($prop['rules']) or !\is_array($prop['rules'])) { - throw new CrudException('$editableProperties[\'rules\'] array value must be an array'); - } - if (count(array_diff_key($prop['rules'], $allowedRules))) { - throw new CrudException(sprintf( - '$editableProperties[\'rules\'] array contains unallowed rule, allowed are : %s', - implode(',', array_keys($allowedRules)) - )); - } - foreach ($allowedRules as $k => $f) { - if (array_key_exists($k, $prop['rules']) and !$f($prop['rules'][$k])) { - throw new CrudException(sprintf( - '$editableProperties[\'rules\'] rule `%s` does not validate with value `%s`', - $k, - $prop['rules'][$k] - )); - } - } - } - - private static function assertActionsArecorrect(array $prop): void - { - if (!isset($prop['actions']) or !\is_array($prop['actions'])) { - throw new CrudException('$editableProperties[\'actions\'] array value must be an array'); - } - foreach ($prop['actions'] as $action) { - if (!is_object($action) or get_class($action) !== CrudAction::class) { - throw new CrudException(sprintf( - '$editableProperties[\'actions\'] array value must contain `%s` objects', - CrudAction::class - )); - } - } - } - - private static function assertEnumIscorrect(array $prop): void - { - if ( - $prop['type']->equals(CrudType::enum()) and (is_null($prop['enum']) or - !\is_subclass_of($prop['enum'], BaseEnum::class)) - ) { - throw new CrudException(sprintf( - '$editableProperties[\'enum\'] array value must be an enum `%s`', - BaseEnum::class - )); - } - } - - private static function assertBelongsToIsCorrect(array $prop): void - { - if (is_null($prop['belongsTo'])) { - return; - } - if ( - $prop['type']->equals(CrudType::belongsTo()) and - (!\is_string($prop['belongsTo']) or - !\class_exists($prop['belongsTo']) or - is_a($prop['belongsTo'], Model::class, true) or - !in_array(IsCrudModel::class, class_uses_recursive($prop['belongsTo']))) - ) { - throw new CrudException(sprintf( - '$editableProperties[\'belongsTo\'] array value must be a CrudModel given: `%s`', - $prop['belongsTo'] - )); - } - } - - private static function assertBelongsToManyIsCorrect(array $prop): void - { - if (is_null($prop['belongsToMany'])) { - return; - } - if ( - $prop['type']->equals(CrudType::belongsToMany()) and - (!\is_string($prop['belongsToMany']) or - !\class_exists($prop['belongsToMany']) or - is_a($prop['belongsToMany'], Model::class, true) or - !in_array(IsCrudModel::class, class_uses_recursive($prop['belongsToMany']))) - ) { - throw new CrudException(sprintf( - '$editableProperties[\'belongsToMany\'] array value must be a CrudModel given: `%s`', - $prop['belongsToMany'] - )); - } - if ( - $prop['type']->equals(CrudType::belongsToMany()) and - (!\is_string($prop['belongsToManyLabel'])) - ) { - throw new CrudException(sprintf( - '$editableProperties[\'belongsToManyLabel\'] must be string using belongsToMany, given: `%s`', - $prop['belongsToMany'] - )); - } - } - - /** - * Get eloquent relationships - * - * @url https://laracasts.com/discuss/channels/eloquent/get-all-model-relationships - * - * @return array - */ - private static function getRelationships() - { - $instance = new static(); - - // Get public methods declared without parameters and non inherited - $class = get_class($instance); - $allMethods = (new \ReflectionClass($class))->getMethods(\ReflectionMethod::IS_PUBLIC); - $methods = array_filter( - $allMethods, - function ($method) use ($class) { - return $method->class === $class - && !$method->getParameters() // relationships have no parameters - && $method->getName() !== 'getRelationships' // prevent infinite recursion - && $method->getName() !== 'gotHasManyRelationWithRestrictOnDelete'; // prevent infinite recursion - } - ); - - DB::beginTransaction(); - - $relations = []; - foreach ($methods as $method) { - try { - $methodName = $method->getName(); - $methodReturn = $instance->$methodName(); - if (!$methodReturn instanceof Relation) { - continue; - } - } catch (\Throwable $th) { - continue; - } - - $type = (new \ReflectionClass($methodReturn))->getShortName(); - $model = get_class($methodReturn->getRelated()); - $relations[$methodName] = [$type, $model]; - } - - DB::rollBack(); - - return $relations; - } -} diff --git a/composer.json b/composer.json index ad637a7..ecf1c54 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "htmlmin/htmlmin": "^8.0", + "kwaadpepper/crud-policies": "^0.0.1", "kwaadpepper/enum": "^0.1.4", "kwaadpepper/image-resizer": "^0.0.3", "laravel/framework": "^8.12", @@ -28,7 +29,8 @@ "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.2", "nunomaduro/collision": "^5.0", - "phpunit/phpunit": "^9.3.3" + "phpunit/phpunit": "^9.3.3", + "squizlabs/php_codesniffer": "^3.6" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index eeb5232..727e85a 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "16ce0822a84da2fd1d0c08f0f94a2233", + "content-hash": "0c397e537654e64d226ffcb97dce406b", "packages": [ { "name": "asm89/stack-cors", @@ -120,16 +120,16 @@ }, { "name": "composer/package-versions-deprecated", - "version": "1.11.99.1", + "version": "1.11.99.2", "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" + "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", - "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/c6522afe5540d5fc46675043d3ed5a45a740b27c", + "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c", "shasum": "" }, "require": { @@ -173,7 +173,7 @@ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "support": { "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1" + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.2" }, "funding": [ { @@ -189,28 +189,27 @@ "type": "tidelift" } ], - "time": "2020-11-11T10:22:58+00:00" + "time": "2021-05-24T07:46:03+00:00" }, { "name": "doctrine/cache", - "version": "1.11.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0" + "reference": "ac77408b22cc6c4d0b4947d20a3889be3043566e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/a9c1b59eba5a08ca2770a76eddb88922f504e8e0", - "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0", + "url": "https://api.github.com/repos/doctrine/cache/zipball/ac77408b22cc6c4d0b4947d20a3889be3043566e", + "reference": "ac77408b22cc6c4d0b4947d20a3889be3043566e", "shasum": "" }, "require": { "php": "~7.1 || ^8.0" }, "conflict": { - "doctrine/common": ">2.2,<2.4", - "psr/cache": ">=3" + "doctrine/common": ">2.2,<2.4" }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", @@ -219,8 +218,9 @@ "mongodb/mongodb": "^1.1", "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", "predis/predis": "~1.0", - "psr/cache": "^1.0 || ^2.0", - "symfony/cache": "^4.4 || ^5.2" + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", + "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" @@ -272,7 +272,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.11.0" + "source": "https://github.com/doctrine/cache/tree/2.1.0" }, "funding": [ { @@ -288,38 +288,39 @@ "type": "tidelift" } ], - "time": "2021-04-13T14:46:17+00:00" + "time": "2021-07-14T11:22:57+00:00" }, { "name": "doctrine/dbal", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "5ba62e7e40df119424866064faf2cef66cb5232a" + "reference": "8e0fde2b90e3f61361013d1e928621beeea07bc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/5ba62e7e40df119424866064faf2cef66cb5232a", - "reference": "5ba62e7e40df119424866064faf2cef66cb5232a", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/8e0fde2b90e3f61361013d1e928621beeea07bc0", + "reference": "8e0fde2b90e3f61361013d1e928621beeea07bc0", "shasum": "" }, "require": { "composer/package-versions-deprecated": "^1.11.99", - "doctrine/cache": "^1.0", + "doctrine/cache": "^1.0|^2.0", "doctrine/deprecations": "^0.5.3", "doctrine/event-manager": "^1.0", "php": "^7.3 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "8.2.0", + "doctrine/coding-standard": "9.0.0", "jetbrains/phpstorm-stubs": "2020.2", "phpstan/phpstan": "0.12.81", "phpstan/phpstan-strict-rules": "^0.12.2", - "phpunit/phpunit": "9.5.0", + "phpunit/phpunit": "9.5.5", "psalm/plugin-phpunit": "0.13.0", "squizlabs/php_codesniffer": "3.6.0", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "symfony/cache": "^5.2|^6.0", + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0|^6.0", "vimeo/psalm": "4.6.4" }, "suggest": { @@ -380,7 +381,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.1.0" + "source": "https://github.com/doctrine/dbal/tree/3.1.1" }, "funding": [ { @@ -396,7 +397,7 @@ "type": "tidelift" } ], - "time": "2021-04-19T17:51:23+00:00" + "time": "2021-06-19T17:59:55+00:00" }, { "name": "doctrine/deprecations", @@ -893,6 +894,124 @@ }, "time": "2020-06-29T00:56:53+00:00" }, + { + "name": "facade/flare-client-php", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/facade/flare-client-php.git", + "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/47b639dc02bcfdfc4ebb83de703856fa01e35f5f", + "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f", + "shasum": "" + }, + "require": { + "facade/ignition-contracts": "~1.0", + "illuminate/pipeline": "^5.5|^6.0|^7.0|^8.0", + "php": "^7.1|^8.0", + "symfony/http-foundation": "^3.3|^4.1|^5.0", + "symfony/mime": "^3.4|^4.0|^5.1", + "symfony/var-dumper": "^3.4|^4.0|^5.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.14", + "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" + ], + "support": { + "issues": "https://github.com/facade/flare-client-php/issues", + "source": "https://github.com/facade/flare-client-php/tree/1.8.1" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2021-05-31T19:23:29+00:00" + }, + { + "name": "facade/ignition-contracts", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/facade/ignition-contracts.git", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v2.15.8", + "phpunit/phpunit": "^9.3.11", + "vimeo/psalm": "^3.17.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" + ], + "support": { + "issues": "https://github.com/facade/ignition-contracts/issues", + "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" + }, + "time": "2020-10-16T08:27:54+00:00" + }, { "name": "fideloper/proxy", "version": "4.4.1", @@ -953,16 +1072,16 @@ }, { "name": "fruitcake/laravel-cors", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/fruitcake/laravel-cors.git", - "reference": "01de0fe5f71c70d1930ee9a80385f9cc28e0f63a" + "reference": "a8ccedc7ca95189ead0e407c43b530dc17791d6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/01de0fe5f71c70d1930ee9a80385f9cc28e0f63a", - "reference": "01de0fe5f71c70d1930ee9a80385f9cc28e0f63a", + "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/a8ccedc7ca95189ead0e407c43b530dc17791d6a", + "reference": "a8ccedc7ca95189ead0e407c43b530dc17791d6a", "shasum": "" }, "require": { @@ -975,8 +1094,8 @@ }, "require-dev": { "laravel/framework": "^6|^7|^8", - "orchestra/testbench-dusk": "^4|^5|^6", - "phpunit/phpunit": "^6|^7|^8", + "orchestra/testbench-dusk": "^4|^5|^6|^7", + "phpunit/phpunit": "^6|^7|^8|^9", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", @@ -1018,7 +1137,7 @@ ], "support": { "issues": "https://github.com/fruitcake/laravel-cors/issues", - "source": "https://github.com/fruitcake/laravel-cors/tree/v2.0.3" + "source": "https://github.com/fruitcake/laravel-cors/tree/v2.0.4" }, "funding": [ { @@ -1026,7 +1145,7 @@ "type": "github" } ], - "time": "2020-10-22T13:57:20+00:00" + "time": "2021-04-26T11:24:25+00:00" }, { "name": "graham-campbell/result-type", @@ -1254,29 +1373,32 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.8.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" + "reference": "1dc8d9cba3897165e16d12bb13d813afb1eb3fe7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", - "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/1dc8d9cba3897165e16d12bb13d813afb1eb3fe7", + "reference": "1dc8d9cba3897165e16d12bb13d813afb1eb3fe7", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + "bamarni/composer-bin-plugin": "^1.4.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.8 || ^9.3.10" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -1284,16 +1406,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "2.0-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1308,6 +1427,11 @@ { "name": "Tobias Schultze", "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -1323,9 +1447,9 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.1" + "source": "https://github.com/guzzle/psr7/tree/2.0.0" }, - "time": "2021-03-21T16:25:00+00:00" + "time": "2021-06-30T20:03:07+00:00" }, { "name": "htmlmin/htmlmin", @@ -1408,26 +1532,26 @@ }, { "name": "intervention/image", - "version": "2.5.1", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/Intervention/image.git", - "reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e" + "reference": "a2d7238069bb01322f9c2a661449955434fec9c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Intervention/image/zipball/abbf18d5ab8367f96b3205ca3c89fb2fa598c69e", - "reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e", + "url": "https://api.github.com/repos/Intervention/image/zipball/a2d7238069bb01322f9c2a661449955434fec9c6", + "reference": "a2d7238069bb01322f9c2a661449955434fec9c6", "shasum": "" }, "require": { "ext-fileinfo": "*", - "guzzlehttp/psr7": "~1.1", + "guzzlehttp/psr7": "~1.1 || ^2.0", "php": ">=5.4.0" }, "require-dev": { "mockery/mockery": "~0.9.2", - "phpunit/phpunit": "^4.8 || ^5.7" + "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15" }, "suggest": { "ext-gd": "to use GD library based image processing.", @@ -1476,9 +1600,19 @@ ], "support": { "issues": "https://github.com/Intervention/image/issues", - "source": "https://github.com/Intervention/image/tree/master" + "source": "https://github.com/Intervention/image/tree/2.6.0" }, - "time": "2019-11-02T09:15:47+00:00" + "funding": [ + { + "url": "https://www.paypal.me/interventionphp", + "type": "custom" + }, + { + "url": "https://github.com/Intervention", + "type": "github" + } + ], + "time": "2021-07-06T13:35:54+00:00" }, { "name": "intervention/imagecache", @@ -1547,6 +1681,69 @@ ], "time": "2020-12-07T15:07:18+00:00" }, + { + "name": "kwaadpepper/crud-policies", + "version": "0.0.1", + "source": { + "type": "git", + "url": "https://github.com/Kwaadpepper/crud-policies.git", + "reference": "9fb83c3696f2e2bf5b9c06a4ed098b3d089843cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Kwaadpepper/crud-policies/zipball/9fb83c3696f2e2bf5b9c06a4ed098b3d089843cc", + "reference": "9fb83c3696f2e2bf5b9c06a4ed098b3d089843cc", + "shasum": "" + }, + "require": { + "facade/flare-client-php": "^1.8", + "illuminate/support": "~7|~8", + "kwaadpepper/enum": "^0.1.4", + "laravel/framework": "~7|~8" + }, + "require-dev": { + "orchestra/testbench": "^6.13", + "phpunit/phpunit": "~9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Kwaadpepper\\CrudPolicies\\CrudPoliciesServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Kwaadpepper\\CrudPolicies\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jérémy Munsch", + "email": "github@jeremydev.ovh", + "homepage": "https://jeremydev.ovh" + } + ], + "description": "Makes CRUD easy, make policies easy and everyone happy", + "homepage": "https://github.com/kwaadpepper/crud-policies", + "keywords": [ + "Scafolding", + "crud", + "laravel", + "policies" + ], + "support": { + "issues": "https://github.com/Kwaadpepper/crud-policies/issues", + "source": "https://github.com/Kwaadpepper/crud-policies/tree/0.0.1" + }, + "time": "2021-07-14T23:54:49+00:00" + }, { "name": "kwaadpepper/enum", "version": "0.1.4", @@ -1670,16 +1867,16 @@ }, { "name": "laravel/framework", - "version": "v8.38.0", + "version": "v8.50.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "26a73532c54d2c090692bf2e3e64e449669053ba" + "reference": "d892dbacbe3859cf9303ccda98ac8d782141d5ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/26a73532c54d2c090692bf2e3e64e449669053ba", - "reference": "26a73532c54d2c090692bf2e3e64e449669053ba", + "url": "https://api.github.com/repos/laravel/framework/zipball/d892dbacbe3859cf9303ccda98ac8d782141d5ae", + "reference": "d892dbacbe3859cf9303ccda98ac8d782141d5ae", "shasum": "" }, "require": { @@ -1689,7 +1886,7 @@ "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "league/commonmark": "^1.3", + "league/commonmark": "^1.3|^2.0", "league/flysystem": "^1.1", "monolog/monolog": "^2.0", "nesbot/carbon": "^2.31", @@ -1758,10 +1955,10 @@ "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.4.2", - "orchestra/testbench-core": "^6.8", + "orchestra/testbench-core": "^6.23", "pda/pheanstalk": "^4.0", "phpunit/phpunit": "^8.5.8|^9.3.3", - "predis/predis": "^1.1.1", + "predis/predis": "^1.1.2", "symfony/cache": "^5.1.4" }, "suggest": { @@ -1787,7 +1984,7 @@ "phpunit/phpunit": "Required to use assertions and run tests (^8.5.8|^9.3.3).", "predis/predis": "Required to use the predis connector (^1.1.2).", "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|^5.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0).", "symfony/cache": "Required to PSR-6 cache bridge (^5.1.4).", "symfony/filesystem": "Required to enable support for relative symbolic links (^5.1.4).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", @@ -1834,7 +2031,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-04-20T13:50:21+00:00" + "time": "2021-07-13T12:41:53+00:00" }, { "name": "laravel/tinker", @@ -1906,22 +2103,23 @@ }, { "name": "laravel/ui", - "version": "v3.2.1", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "e2478cd0342a92ec1c8c77422553bda8ee004fd0" + "reference": "07d725813350c695c779382cbd6dac0ab8665537" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/e2478cd0342a92ec1c8c77422553bda8ee004fd0", - "reference": "e2478cd0342a92ec1c8c77422553bda8ee004fd0", + "url": "https://api.github.com/repos/laravel/ui/zipball/07d725813350c695c779382cbd6dac0ab8665537", + "reference": "07d725813350c695c779382cbd6dac0ab8665537", "shasum": "" }, "require": { - "illuminate/console": "^8.0", - "illuminate/filesystem": "^8.0", - "illuminate/support": "^8.0", + "illuminate/console": "^8.42", + "illuminate/filesystem": "^8.42", + "illuminate/support": "^8.42", + "illuminate/validation": "^8.42", "php": "^7.3|^8.0" }, "type": "library", @@ -1957,22 +2155,22 @@ "ui" ], "support": { - "source": "https://github.com/laravel/ui/tree/v3.2.1" + "source": "https://github.com/laravel/ui/tree/v3.3.0" }, - "time": "2021-04-27T18:17:41+00:00" + "time": "2021-05-25T16:45:33+00:00" }, { "name": "league/commonmark", - "version": "1.5.8", + "version": "1.6.5", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf" + "reference": "44ffd8d3c4a9133e4bd0548622b09c55af39db5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf", - "reference": "08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/44ffd8d3c4a9133e4bd0548622b09c55af39db5f", + "reference": "44ffd8d3c4a9133e4bd0548622b09c55af39db5f", "shasum": "" }, "require": { @@ -1990,7 +2188,7 @@ "github/gfm": "0.29.0", "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^0.12.90", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", "scrutinizer/ocular": "^1.5", "symfony/finder": "^4.2" @@ -2060,7 +2258,7 @@ "type": "tidelift" } ], - "time": "2021-03-28T18:51:39+00:00" + "time": "2021-06-26T11:57:13+00:00" }, { "name": "league/csv", @@ -2148,16 +2346,16 @@ }, { "name": "league/flysystem", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "9be3b16c877d477357c015cec057548cf9b2a14a" + "reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a", - "reference": "9be3b16c877d477357c015cec057548cf9b2a14a", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3ad69181b8afed2c9edf7be5a2918144ff4ea32", + "reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32", "shasum": "" }, "require": { @@ -2173,7 +2371,6 @@ "phpunit/phpunit": "^8.5.8" }, "suggest": { - "ext-fileinfo": "Required for MimeType", "ext-ftp": "Allows you to use FTP server storage", "ext-openssl": "Allows you to use FTPS server storage", "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", @@ -2231,7 +2428,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.x" + "source": "https://github.com/thephpleague/flysystem/tree/1.1.4" }, "funding": [ { @@ -2239,7 +2436,7 @@ "type": "other" } ], - "time": "2020-08-23T07:39:11+00:00" + "time": "2021-06-23T21:56:05+00:00" }, { "name": "league/mime-type-detection", @@ -2299,23 +2496,23 @@ }, { "name": "maatwebsite/excel", - "version": "3.1.30", + "version": "3.1.32", "source": { "type": "git", "url": "https://github.com/Maatwebsite/Laravel-Excel.git", - "reference": "aa5d2e4d25c5c8218ea0a15103da95f5f8728953" + "reference": "9dc29b63a77fb7f2f514ef754af3a1b57e83cadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/aa5d2e4d25c5c8218ea0a15103da95f5f8728953", - "reference": "aa5d2e4d25c5c8218ea0a15103da95f5f8728953", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/9dc29b63a77fb7f2f514ef754af3a1b57e83cadf", + "reference": "9dc29b63a77fb7f2f514ef754af3a1b57e83cadf", "shasum": "" }, "require": { "ext-json": "*", "illuminate/support": "5.8.*|^6.0|^7.0|^8.0", "php": "^7.0|^8.0", - "phpoffice/phpspreadsheet": "1.16.*" + "phpoffice/phpspreadsheet": "^1.18" }, "require-dev": { "orchestra/testbench": "^6.0", @@ -2361,7 +2558,7 @@ ], "support": { "issues": "https://github.com/Maatwebsite/Laravel-Excel/issues", - "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/3.1.30" + "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/3.1.32" }, "funding": [ { @@ -2373,7 +2570,7 @@ "type": "github" } ], - "time": "2021-04-06T17:17:02+00:00" + "time": "2021-07-08T10:11:21+00:00" }, { "name": "maennchen/zipstream-php", @@ -2448,16 +2645,16 @@ }, { "name": "markbaker/complex", - "version": "2.0.0", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPComplex.git", - "reference": "9999f1432fae467bc93c53f357105b4c31bb994c" + "reference": "6f724d7e04606fd8adaa4e3bb381c3e9db09c946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/9999f1432fae467bc93c53f357105b4c31bb994c", - "reference": "9999f1432fae467bc93c53f357105b4c31bb994c", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/6f724d7e04606fd8adaa4e3bb381c3e9db09c946", + "reference": "6f724d7e04606fd8adaa4e3bb381c3e9db09c946", "shasum": "" }, "require": { @@ -2466,11 +2663,7 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.0", - "phpdocumentor/phpdocumentor": "2.*", - "phploc/phploc": "^4.0", - "phpmd/phpmd": "2.*", "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", - "sebastian/phpcpd": "^4.0", "squizlabs/php_codesniffer": "^3.4" }, "type": "library", @@ -2541,22 +2734,22 @@ ], "support": { "issues": "https://github.com/MarkBaker/PHPComplex/issues", - "source": "https://github.com/MarkBaker/PHPComplex/tree/PHP8" + "source": "https://github.com/MarkBaker/PHPComplex/tree/2.0.3" }, - "time": "2020-08-26T10:42:07+00:00" + "time": "2021-06-02T09:44:11+00:00" }, { "name": "markbaker/matrix", - "version": "2.1.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPMatrix.git", - "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a" + "reference": "174395a901b5ba0925f1d790fa91bab531074b61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/361c0f545c3172ee26c3d596a0aa03f0cef65e6a", - "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/174395a901b5ba0925f1d790fa91bab531074b61", + "reference": "174395a901b5ba0925f1d790fa91bab531074b61", "shasum": "" }, "require": { @@ -2615,22 +2808,22 @@ ], "support": { "issues": "https://github.com/MarkBaker/PHPMatrix/issues", - "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.2" + "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.3" }, - "time": "2021-01-23T16:37:31+00:00" + "time": "2021-05-25T15:42:17+00:00" }, { "name": "mews/purifier", - "version": "3.3.4", + "version": "3.3.5", "source": { "type": "git", "url": "https://github.com/mewebstudio/Purifier.git", - "reference": "c81d5ed0140f1282d1d89680aea4f28533a12e05" + "reference": "53f2be3b94cf8940d23970f0aeb907ce8c9760f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mewebstudio/Purifier/zipball/c81d5ed0140f1282d1d89680aea4f28533a12e05", - "reference": "c81d5ed0140f1282d1d89680aea4f28533a12e05", + "url": "https://api.github.com/repos/mewebstudio/Purifier/zipball/53f2be3b94cf8940d23970f0aeb907ce8c9760f7", + "reference": "53f2be3b94cf8940d23970f0aeb907ce8c9760f7", "shasum": "" }, "require": { @@ -2696,22 +2889,22 @@ ], "support": { "issues": "https://github.com/mewebstudio/Purifier/issues", - "source": "https://github.com/mewebstudio/Purifier/tree/3.3.4" + "source": "https://github.com/mewebstudio/Purifier/tree/3.3.5" }, - "time": "2021-03-24T18:34:22+00:00" + "time": "2021-05-17T00:17:01+00:00" }, { "name": "monolog/monolog", - "version": "2.2.0", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" + "reference": "9738e495f288eec0b187e310b7cdbbb285777dbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", - "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9738e495f288eec0b187e310b7cdbbb285777dbe", + "reference": "9738e495f288eec0b187e310b7cdbbb285777dbe", "shasum": "" }, "require": { @@ -2730,7 +2923,7 @@ "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", "phpspec/prophecy": "^1.6.1", - "phpstan/phpstan": "^0.12.59", + "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", @@ -2782,7 +2975,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.2.0" + "source": "https://github.com/Seldaek/monolog/tree/2.3.1" }, "funding": [ { @@ -2794,7 +2987,7 @@ "type": "tidelift" } ], - "time": "2020-12-14T13:15:25+00:00" + "time": "2021-07-14T11:56:39+00:00" }, { "name": "mrclay/minify", @@ -2849,16 +3042,16 @@ }, { "name": "myclabs/php-enum", - "version": "1.8.0", + "version": "1.8.3", "source": { "type": "git", "url": "https://github.com/myclabs/php-enum.git", - "reference": "46cf3d8498b095bd33727b13fd5707263af99421" + "reference": "b942d263c641ddb5190929ff840c68f78713e937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/46cf3d8498b095bd33727b13fd5707263af99421", - "reference": "46cf3d8498b095bd33727b13fd5707263af99421", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937", + "reference": "b942d263c641ddb5190929ff840c68f78713e937", "shasum": "" }, "require": { @@ -2868,7 +3061,7 @@ "require-dev": { "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "1.*", - "vimeo/psalm": "^4.5.1" + "vimeo/psalm": "^4.6.2" }, "type": "library", "autoload": { @@ -2893,7 +3086,7 @@ ], "support": { "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.8.0" + "source": "https://github.com/myclabs/php-enum/tree/1.8.3" }, "funding": [ { @@ -2905,20 +3098,20 @@ "type": "tidelift" } ], - "time": "2021-02-15T16:11:48+00:00" + "time": "2021-07-05T08:18:36+00:00" }, { "name": "nesbot/carbon", - "version": "2.46.0", + "version": "2.50.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4" + "reference": "f47f17d17602b2243414a44ad53d9f8b9ada5fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4", - "reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f47f17d17602b2243414a44ad53d9f8b9ada5fdb", + "reference": "f47f17d17602b2243414a44ad53d9f8b9ada5fdb", "shasum": "" }, "require": { @@ -2970,15 +3163,15 @@ { "name": "Brian Nesbitt", "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" + "homepage": "https://markido.com" }, { "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" + "homepage": "https://github.com/kylekatarnls" } ], "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", + "homepage": "https://carbon.nesbot.com", "keywords": [ "date", "datetime", @@ -2998,20 +3191,20 @@ "type": "tidelift" } ], - "time": "2021-02-24T17:30:44+00:00" + "time": "2021-06-28T22:38:45+00:00" }, { "name": "nikic/php-parser", - "version": "v4.10.4", + "version": "v4.11.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + "reference": "fe14cf3672a149364fb66dfe11bf6549af899f94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/fe14cf3672a149364fb66dfe11bf6549af899f94", + "reference": "fe14cf3672a149364fb66dfe11bf6549af899f94", "shasum": "" }, "require": { @@ -3052,9 +3245,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.11.0" }, - "time": "2020-12-20T10:01:03+00:00" + "time": "2021-07-03T13:36:55+00:00" }, { "name": "opis/closure", @@ -3123,16 +3316,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.16.0", + "version": "1.18.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "76d4323b85129d0c368149c831a07a3e258b2b50" + "reference": "418cd304e8e6b417ea79c3b29126a25dc4b1170c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/76d4323b85129d0c368149c831a07a3e258b2b50", - "reference": "76d4323b85129d0c368149c831a07a3e258b2b50", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/418cd304e8e6b417ea79c3b29126a25dc4b1170c", + "reference": "418cd304e8e6b417ea79c3b29126a25dc4b1170c", "shasum": "" }, "require": { @@ -3151,20 +3344,23 @@ "ext-zlib": "*", "ezyang/htmlpurifier": "^4.13", "maennchen/zipstream-php": "^2.1", - "markbaker/complex": "^1.5||^2.0", - "markbaker/matrix": "^1.2||^2.0", - "php": "^7.2||^8.0", + "markbaker/complex": "^2.0", + "markbaker/matrix": "^2.0", + "php": "^7.2 || ^8.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/simple-cache": "^1.0" }, "require-dev": { - "dompdf/dompdf": "^0.8.5", - "friendsofphp/php-cs-fixer": "^2.16", + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "dompdf/dompdf": "^1.0", + "friendsofphp/php-cs-fixer": "^2.18", "jpgraph/jpgraph": "^4.0", "mpdf/mpdf": "^8.0", "phpcompatibility/php-compatibility": "^9.3", - "phpunit/phpunit": "^8.5||^9.3", + "phpstan/phpstan": "^0.12.82", + "phpstan/phpstan-phpunit": "^0.12.18", + "phpunit/phpunit": "^8.5", "squizlabs/php_codesniffer": "^3.5", "tecnickcom/tcpdf": "^6.3" }, @@ -3218,9 +3414,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.16.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.18.0" }, - "time": "2020-12-31T18:03:49+00:00" + "time": "2021-05-31T18:21:15+00:00" }, { "name": "phpoption/phpoption", @@ -3551,16 +3747,16 @@ }, { "name": "psr/log", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -3584,7 +3780,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -3595,9 +3791,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.3" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2020-03-23T09:12:05+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "psr/simple-cache", @@ -4083,20 +4279,21 @@ }, { "name": "symfony/console", - "version": "v5.2.6", + "version": "v5.3.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "35f039df40a3b335ebf310f244cb242b3a83ac8d" + "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/35f039df40a3b335ebf310f244cb242b3a83ac8d", - "reference": "35f039df40a3b335ebf310f244cb242b3a83ac8d", + "url": "https://api.github.com/repos/symfony/console/zipball/649730483885ff2ca99ca0560ef0e5f6b03f2ac1", + "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", "symfony/polyfill-php80": "^1.15", @@ -4160,7 +4357,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.2.6" + "source": "https://github.com/symfony/console/tree/v5.3.2" }, "funding": [ { @@ -4176,20 +4373,20 @@ "type": "tidelift" } ], - "time": "2021-03-28T09:42:18+00:00" + "time": "2021-06-12T09:42:48+00:00" }, { "name": "symfony/css-selector", - "version": "v5.2.4", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "f65f217b3314504a1ec99c2d6ef69016bb13490f" + "reference": "fcd0b29a7a0b1bb5bfbedc6231583d77fea04814" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/f65f217b3314504a1ec99c2d6ef69016bb13490f", - "reference": "f65f217b3314504a1ec99c2d6ef69016bb13490f", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/fcd0b29a7a0b1bb5bfbedc6231583d77fea04814", + "reference": "fcd0b29a7a0b1bb5bfbedc6231583d77fea04814", "shasum": "" }, "require": { @@ -4225,7 +4422,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.2.4" + "source": "https://github.com/symfony/css-selector/tree/v5.3.0" }, "funding": [ { @@ -4241,7 +4438,7 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:01:46+00:00" + "time": "2021-05-26T17:40:38+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4312,16 +4509,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.2.6", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "bdb7fb4188da7f4211e4b88350ba0dfdad002b03" + "reference": "43323e79c80719e8a4674e33484bca98270d223f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/bdb7fb4188da7f4211e4b88350ba0dfdad002b03", - "reference": "bdb7fb4188da7f4211e4b88350ba0dfdad002b03", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/43323e79c80719e8a4674e33484bca98270d223f", + "reference": "43323e79c80719e8a4674e33484bca98270d223f", "shasum": "" }, "require": { @@ -4361,7 +4558,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.2.6" + "source": "https://github.com/symfony/error-handler/tree/v5.3.3" }, "funding": [ { @@ -4377,20 +4574,20 @@ "type": "tidelift" } ], - "time": "2021-03-16T09:07:47+00:00" + "time": "2021-06-24T08:13:00+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.2.4", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d08d6ec121a425897951900ab692b612a61d6240" + "reference": "67a5f354afa8e2f231081b3fa11a5912f933c3ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240", - "reference": "d08d6ec121a425897951900ab692b612a61d6240", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67a5f354afa8e2f231081b3fa11a5912f933c3ce", + "reference": "67a5f354afa8e2f231081b3fa11a5912f933c3ce", "shasum": "" }, "require": { @@ -4446,7 +4643,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.3.0" }, "funding": [ { @@ -4462,7 +4659,7 @@ "type": "tidelift" } ], - "time": "2021-02-18T17:12:37+00:00" + "time": "2021-05-26T17:43:10+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -4545,16 +4742,16 @@ }, { "name": "symfony/finder", - "version": "v5.2.4", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "0d639a0943822626290d169965804f79400e6a04" + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/0d639a0943822626290d169965804f79400e6a04", - "reference": "0d639a0943822626290d169965804f79400e6a04", + "url": "https://api.github.com/repos/symfony/finder/zipball/0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", "shasum": "" }, "require": { @@ -4586,7 +4783,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.2.4" + "source": "https://github.com/symfony/finder/tree/v5.3.0" }, "funding": [ { @@ -4602,7 +4799,7 @@ "type": "tidelift" } ], - "time": "2021-02-15T18:55:04+00:00" + "time": "2021-05-26T12:52:38+00:00" }, { "name": "symfony/http-client-contracts", @@ -4684,16 +4881,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.2.4", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "54499baea7f7418bce7b5ec92770fd0799e8e9bf" + "reference": "0e45ab1574caa0460d9190871a8ce47539e40ccf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/54499baea7f7418bce7b5ec92770fd0799e8e9bf", - "reference": "54499baea7f7418bce7b5ec92770fd0799e8e9bf", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/0e45ab1574caa0460d9190871a8ce47539e40ccf", + "reference": "0e45ab1574caa0460d9190871a8ce47539e40ccf", "shasum": "" }, "require": { @@ -4737,7 +4934,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.2.4" + "source": "https://github.com/symfony/http-foundation/tree/v5.3.3" }, "funding": [ { @@ -4753,20 +4950,20 @@ "type": "tidelift" } ], - "time": "2021-02-25T17:16:57+00:00" + "time": "2021-06-27T09:19:40+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.2.6", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "f34de4c61ca46df73857f7f36b9a3805bdd7e3b2" + "reference": "90ad9f4b21ddcb8ebe9faadfcca54929ad23f9f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f34de4c61ca46df73857f7f36b9a3805bdd7e3b2", - "reference": "f34de4c61ca46df73857f7f36b9a3805bdd7e3b2", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/90ad9f4b21ddcb8ebe9faadfcca54929ad23f9f8", + "reference": "90ad9f4b21ddcb8ebe9faadfcca54929ad23f9f8", "shasum": "" }, "require": { @@ -4776,7 +4973,7 @@ "symfony/error-handler": "^4.4|^5.0", "symfony/event-dispatcher": "^5.0", "symfony/http-client-contracts": "^1.1|^2", - "symfony/http-foundation": "^4.4|^5.0", + "symfony/http-foundation": "^5.3", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.15" @@ -4786,7 +4983,7 @@ "symfony/cache": "<5.0", "symfony/config": "<5.0", "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.1.8", + "symfony/dependency-injection": "<5.3", "symfony/doctrine-bridge": "<5.0", "symfony/form": "<5.0", "symfony/http-client": "<5.0", @@ -4806,7 +5003,7 @@ "symfony/config": "^5.0", "symfony/console": "^4.4|^5.0", "symfony/css-selector": "^4.4|^5.0", - "symfony/dependency-injection": "^5.1.8", + "symfony/dependency-injection": "^5.3", "symfony/dom-crawler": "^4.4|^5.0", "symfony/expression-language": "^4.4|^5.0", "symfony/finder": "^4.4|^5.0", @@ -4849,7 +5046,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.2.6" + "source": "https://github.com/symfony/http-kernel/tree/v5.3.3" }, "funding": [ { @@ -4865,20 +5062,20 @@ "type": "tidelift" } ], - "time": "2021-03-29T05:16:58+00:00" + "time": "2021-06-30T08:27:49+00:00" }, { "name": "symfony/mime", - "version": "v5.2.6", + "version": "v5.3.2", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "1b2092244374cbe48ae733673f2ca0818b37197b" + "reference": "47dd7912152b82d0d4c8d9040dbc93d6232d472a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/1b2092244374cbe48ae733673f2ca0818b37197b", - "reference": "1b2092244374cbe48ae733673f2ca0818b37197b", + "url": "https://api.github.com/repos/symfony/mime/zipball/47dd7912152b82d0d4c8d9040dbc93d6232d472a", + "reference": "47dd7912152b82d0d4c8d9040dbc93d6232d472a", "shasum": "" }, "require": { @@ -4932,7 +5129,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.2.6" + "source": "https://github.com/symfony/mime/tree/v5.3.2" }, "funding": [ { @@ -4948,20 +5145,20 @@ "type": "tidelift" } ], - "time": "2021-03-12T13:18:39+00:00" + "time": "2021-06-09T10:58:01+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { @@ -4973,7 +5170,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5011,7 +5208,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" }, "funding": [ { @@ -5027,20 +5224,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342" + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/06fb361659649bcfd6a208a0f1fcaf4e827ad342", - "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/63b5bb7db83e5673936d6e3b8b3e022ff6474933", + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933", "shasum": "" }, "require": { @@ -5052,7 +5249,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5091,7 +5288,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.23.0" }, "funding": [ { @@ -5107,20 +5304,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T09:27:20+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab", + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab", "shasum": "" }, "require": { @@ -5132,7 +5329,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5172,7 +5369,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0" }, "funding": [ { @@ -5188,20 +5385,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T09:17:38+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", - "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", "shasum": "" }, "require": { @@ -5215,7 +5412,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5259,7 +5456,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" }, "funding": [ { @@ -5275,20 +5472,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T09:27:20+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { @@ -5300,7 +5497,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5343,7 +5540,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" }, "funding": [ { @@ -5359,20 +5556,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", "shasum": "" }, "require": { @@ -5384,7 +5581,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5423,7 +5620,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" }, "funding": [ { @@ -5439,20 +5636,20 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-05-27T09:27:20+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", "shasum": "" }, "require": { @@ -5461,7 +5658,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5499,7 +5696,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" }, "funding": [ { @@ -5515,20 +5712,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-05-27T09:17:38+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "shasum": "" }, "require": { @@ -5537,7 +5734,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5578,7 +5775,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" }, "funding": [ { @@ -5594,20 +5791,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0", "shasum": "" }, "require": { @@ -5616,7 +5813,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5661,7 +5858,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0" }, "funding": [ { @@ -5677,20 +5874,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/process", - "version": "v5.2.4", + "version": "v5.3.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f" + "reference": "714b47f9196de61a196d86c4bad5f09201b307df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/313a38f09c77fbcdc1d223e57d368cea76a2fd2f", - "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f", + "url": "https://api.github.com/repos/symfony/process/zipball/714b47f9196de61a196d86c4bad5f09201b307df", + "reference": "714b47f9196de61a196d86c4bad5f09201b307df", "shasum": "" }, "require": { @@ -5723,7 +5920,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.2.4" + "source": "https://github.com/symfony/process/tree/v5.3.2" }, "funding": [ { @@ -5739,20 +5936,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:15:41+00:00" + "time": "2021-06-12T10:15:01+00:00" }, { "name": "symfony/routing", - "version": "v5.2.6", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "31fba555f178afd04d54fd26953501b2c3f0c6e6" + "reference": "368e81376a8e049c37cb80ae87dbfbf411279199" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/31fba555f178afd04d54fd26953501b2c3f0c6e6", - "reference": "31fba555f178afd04d54fd26953501b2c3f0c6e6", + "url": "https://api.github.com/repos/symfony/routing/zipball/368e81376a8e049c37cb80ae87dbfbf411279199", + "reference": "368e81376a8e049c37cb80ae87dbfbf411279199", "shasum": "" }, "require": { @@ -5761,21 +5958,21 @@ "symfony/polyfill-php80": "^1.15" }, "conflict": { - "symfony/config": "<5.0", + "doctrine/annotations": "<1.12", + "symfony/config": "<5.3", "symfony/dependency-injection": "<4.4", "symfony/yaml": "<4.4" }, "require-dev": { - "doctrine/annotations": "^1.10.4", + "doctrine/annotations": "^1.12", "psr/log": "~1.0", - "symfony/config": "^5.0", + "symfony/config": "^5.3", "symfony/dependency-injection": "^4.4|^5.0", "symfony/expression-language": "^4.4|^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/yaml": "^4.4|^5.0" }, "suggest": { - "doctrine/annotations": "For using the annotation loader", "symfony/config": "For using the all-in-one router or any loader", "symfony/expression-language": "For using expression matching", "symfony/http-foundation": "For using a Symfony Request object", @@ -5813,7 +6010,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.2.6" + "source": "https://github.com/symfony/routing/tree/v5.3.0" }, "funding": [ { @@ -5829,7 +6026,7 @@ "type": "tidelift" } ], - "time": "2021-03-14T13:53:33+00:00" + "time": "2021-05-26T17:43:10+00:00" }, { "name": "symfony/service-contracts", @@ -5912,16 +6109,16 @@ }, { "name": "symfony/string", - "version": "v5.2.6", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572" + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", - "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", "shasum": "" }, "require": { @@ -5975,7 +6172,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.6" + "source": "https://github.com/symfony/string/tree/v5.3.3" }, "funding": [ { @@ -5991,24 +6188,25 @@ "type": "tidelift" } ], - "time": "2021-03-17T17:12:15+00:00" + "time": "2021-06-27T11:44:38+00:00" }, { "name": "symfony/translation", - "version": "v5.2.6", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "2cc7f45d96db9adfcf89adf4401d9dfed509f4e1" + "reference": "380b8c9e944d0e364b25f28e8e555241eb49c01c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/2cc7f45d96db9adfcf89adf4401d9dfed509f4e1", - "reference": "2cc7f45d96db9adfcf89adf4401d9dfed509f4e1", + "url": "https://api.github.com/repos/symfony/translation/zipball/380b8c9e944d0e364b25f28e8e555241eb49c01c", + "reference": "380b8c9e944d0e364b25f28e8e555241eb49c01c", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php80": "^1.15", "symfony/translation-contracts": "^2.3" @@ -6031,6 +6229,7 @@ "symfony/finder": "^4.4|^5.0", "symfony/http-kernel": "^5.0", "symfony/intl": "^4.4|^5.0", + "symfony/polyfill-intl-icu": "^1.21", "symfony/service-contracts": "^1.1.2|^2", "symfony/yaml": "^4.4|^5.0" }, @@ -6068,7 +6267,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.2.6" + "source": "https://github.com/symfony/translation/tree/v5.3.3" }, "funding": [ { @@ -6084,7 +6283,7 @@ "type": "tidelift" } ], - "time": "2021-03-23T19:33:48+00:00" + "time": "2021-06-27T12:22:47+00:00" }, { "name": "symfony/translation-contracts", @@ -6166,16 +6365,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.2.6", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "89412a68ea2e675b4e44f260a5666729f77f668e" + "reference": "46aa709affb9ad3355bd7a810f9662d71025c384" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/89412a68ea2e675b4e44f260a5666729f77f668e", - "reference": "89412a68ea2e675b4e44f260a5666729f77f668e", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46aa709affb9ad3355bd7a810f9662d71025c384", + "reference": "46aa709affb9ad3355bd7a810f9662d71025c384", "shasum": "" }, "require": { @@ -6234,7 +6433,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.2.6" + "source": "https://github.com/symfony/var-dumper/tree/v5.3.3" }, "funding": [ { @@ -6250,7 +6449,7 @@ "type": "tidelift" } ], - "time": "2021-03-28T09:42:18+00:00" + "time": "2021-06-24T08:13:00+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -6588,83 +6787,18 @@ ], "time": "2020-11-10T18:47:58+00:00" }, - { - "name": "facade/flare-client-php", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/facade/flare-client-php.git", - "reference": "6bf380035890cb0a09b9628c491ae3866b858522" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/6bf380035890cb0a09b9628c491ae3866b858522", - "reference": "6bf380035890cb0a09b9628c491ae3866b858522", - "shasum": "" - }, - "require": { - "facade/ignition-contracts": "~1.0", - "illuminate/pipeline": "^5.5|^6.0|^7.0|^8.0", - "php": "^7.1|^8.0", - "symfony/http-foundation": "^3.3|^4.1|^5.0", - "symfony/mime": "^3.4|^4.0|^5.1", - "symfony/var-dumper": "^3.4|^4.0|^5.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "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" - ], - "support": { - "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.7.0" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2021-04-12T09:30:36+00:00" - }, { "name": "facade/ignition", - "version": "2.8.3", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "a8201d51aae83addceaef9344592a3b068b5d64d" + "reference": "dc6818335f50ccf0b90284784718ea9a82604286" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/a8201d51aae83addceaef9344592a3b068b5d64d", - "reference": "a8201d51aae83addceaef9344592a3b068b5d64d", + "url": "https://api.github.com/repos/facade/ignition/zipball/dc6818335f50ccf0b90284784718ea9a82604286", + "reference": "dc6818335f50ccf0b90284784718ea9a82604286", "shasum": "" }, "require": { @@ -6672,7 +6806,6 @@ "ext-mbstring": "*", "facade/flare-client-php": "^1.6", "facade/ignition-contracts": "^1.0.2", - "filp/whoops": "^2.4", "illuminate/support": "^7.0|^8.0", "monolog/monolog": "^2.0", "php": "^7.2.5|^8.0", @@ -6728,73 +6861,20 @@ "issues": "https://github.com/facade/ignition/issues", "source": "https://github.com/facade/ignition" }, - "time": "2021-04-09T20:45:59+00:00" - }, - { - "name": "facade/ignition-contracts", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/facade/ignition-contracts.git", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^v2.15.8", - "phpunit/phpunit": "^9.3.11", - "vimeo/psalm": "^3.17.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" - ], - "support": { - "issues": "https://github.com/facade/ignition-contracts/issues", - "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" - }, - "time": "2020-10-16T08:27:54+00:00" + "time": "2021-07-12T15:55:51+00:00" }, { "name": "fakerphp/faker", - "version": "v1.14.1", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1" + "reference": "89c6201c74db25fa759ff16e78a4d8f32547770e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/89c6201c74db25fa759ff16e78a4d8f32547770e", + "reference": "89c6201c74db25fa759ff16e78a4d8f32547770e", "shasum": "" }, "require": { @@ -6844,22 +6924,22 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v.1.14.1" + "source": "https://github.com/FakerPHP/Faker/tree/v1.15.0" }, - "time": "2021-03-30T06:27:33+00:00" + "time": "2021-07-06T20:39:40+00:00" }, { "name": "filp/whoops", - "version": "2.12.0", + "version": "2.14.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "d501fd2658d55491a2295ff600ae5978eaad7403" + "reference": "fdf92f03e150ed84d5967a833ae93abffac0315b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/d501fd2658d55491a2295ff600ae5978eaad7403", - "reference": "d501fd2658d55491a2295ff600ae5978eaad7403", + "url": "https://api.github.com/repos/filp/whoops/zipball/fdf92f03e150ed84d5967a833ae93abffac0315b", + "reference": "fdf92f03e150ed84d5967a833ae93abffac0315b", "shasum": "" }, "require": { @@ -6909,7 +6989,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.12.0" + "source": "https://github.com/filp/whoops/tree/2.14.0" }, "funding": [ { @@ -6917,7 +6997,7 @@ "type": "github" } ], - "time": "2021-03-30T12:00:00+00:00" + "time": "2021-07-13T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -6972,16 +7052,16 @@ }, { "name": "laravel/sail", - "version": "v1.5.0", + "version": "v1.8.5", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "7f2d520f8c7d6fc0e5e4949c1363f6ddff0ff116" + "reference": "cab38edc00804700518e110df2677ef34c3dbb2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/7f2d520f8c7d6fc0e5e4949c1363f6ddff0ff116", - "reference": "7f2d520f8c7d6fc0e5e4949c1363f6ddff0ff116", + "url": "https://api.github.com/repos/laravel/sail/zipball/cab38edc00804700518e110df2677ef34c3dbb2e", + "reference": "cab38edc00804700518e110df2677ef34c3dbb2e", "shasum": "" }, "require": { @@ -7028,7 +7108,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2021-04-20T16:17:55+00:00" + "time": "2021-07-13T14:20:58+00:00" }, { "name": "mockery/mockery", @@ -7162,16 +7242,16 @@ }, { "name": "nunomaduro/collision", - "version": "v5.4.0", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "41b7e9999133d5082700d31a1d0977161df8322a" + "reference": "b5cb36122f1c142c3c3ee20a0ae778439ef0244b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/41b7e9999133d5082700d31a1d0977161df8322a", - "reference": "41b7e9999133d5082700d31a1d0977161df8322a", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b5cb36122f1c142c3c3ee20a0ae778439ef0244b", + "reference": "b5cb36122f1c142c3c3ee20a0ae778439ef0244b", "shasum": "" }, "require": { @@ -7246,7 +7326,7 @@ "type": "patreon" } ], - "time": "2021-04-09T13:38:32+00:00" + "time": "2021-06-22T20:47:22+00:00" }, { "name": "phar-io/manifest", @@ -7904,16 +7984,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.4", + "version": "9.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" + "reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", - "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb", + "reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb", "shasum": "" }, "require": { @@ -7943,7 +8023,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3", + "sebastian/type": "^2.3.4", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -7991,7 +8071,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.6" }, "funding": [ { @@ -8003,7 +8083,7 @@ "type": "github" } ], - "time": "2021-03-23T07:16:29+00:00" + "time": "2021-06-23T05:14:38+00:00" }, { "name": "sebastian/cli-parser", @@ -8511,16 +8591,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.2", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { @@ -8563,7 +8643,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" }, "funding": [ { @@ -8571,7 +8651,7 @@ "type": "github" } ], - "time": "2020-10-26T15:55:19+00:00" + "time": "2021-06-11T13:31:12+00:00" }, { "name": "sebastian/lines-of-code", @@ -8862,16 +8942,16 @@ }, { "name": "sebastian/type", - "version": "2.3.1", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { @@ -8906,7 +8986,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.1" + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { @@ -8914,7 +8994,7 @@ "type": "github" } ], - "time": "2020-10-26T13:18:59+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", @@ -8969,6 +9049,62 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-04-09T00:54:41+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.0", diff --git a/config/app.php b/config/app.php index 8605186..d93e7d8 100644 --- a/config/app.php +++ b/config/app.php @@ -171,7 +171,6 @@ return [ */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, - // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\TranslationServiceProvider::class @@ -216,7 +215,6 @@ return [ 'Password' => Illuminate\Support\Facades\Password::class, 'Queue' => Illuminate\Support\Facades\Queue::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class, - // 'Redis' => Illuminate\Support\Facades\Redis::class, 'Request' => Illuminate\Support\Facades\Request::class, 'Response' => Illuminate\Support\Facades\Response::class, 'Route' => Illuminate\Support\Facades\Route::class, @@ -227,13 +225,10 @@ return [ 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, - 'CrudAction' => App\Enums\CrudAction::class, - 'CrudType' => App\Enums\CrudType::class, 'Carbon' => Illuminate\Support\Carbon::class, 'TypeSondage' => App\Enums\TypeSondage::class, 'Employee' => App\Models\Employee::class, 'Site' => App\Models\Site::class, 'Role' => App\Enums\Role::class ], - ]; diff --git a/config/cache.php b/config/cache.php index 2389425..b9b855a 100644 --- a/config/cache.php +++ b/config/cache.php @@ -61,9 +61,7 @@ return [ env('MEMCACHED_USERNAME'), env('MEMCACHED_PASSWORD'), ], - 'options' => [ - // Memcached::OPT_CONNECT_TIMEOUT => 2000, - ], + 'options' => [], 'servers' => [ [ 'host' => env('MEMCACHED_HOST', '127.0.0.1'), diff --git a/config/trustedproxy.php b/config/trustedproxy.php index 8224727..baa125b 100644 --- a/config/trustedproxy.php +++ b/config/trustedproxy.php @@ -15,20 +15,17 @@ return [ * of your proxy (e.g. if using ELB or similar). * */ - 'proxies' => '*', // [,], '*', ',' + 'proxies' => '*', /* * To trust one or more specific proxies that connect * directly to your server, use an array or a string separated by comma of IP addresses: */ - // 'proxies' => ['192.168.1.1'], - // 'proxies' => '192.168.1.1, 192.168.1.2', /* * Or, to trust all proxies that connect * directly to your server, use a "*" */ - // 'proxies' => '*', /* * Which headers to use to detect proxy related data (For, Host, Proto, Port) @@ -45,6 +42,8 @@ return [ * * @link https://symfony.com/doc/current/deployment/proxies.html */ - 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL, - + 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_FOR | + Illuminate\Http\Request::HEADER_X_FORWARDED_HOST | + Illuminate\Http\Request::HEADER_X_FORWARDED_PORT | + Illuminate\Http\Request::HEADER_X_FORWARDED_PROTO, ]; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 1fd61bf..4ba3f11 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -24,13 +24,16 @@ class DatabaseSeeder extends Seeder public function run() { Pole::factory(3)->create()->each(function (Pole $pole) { - Societe::factory(rand(2, 10))->create(['pole_id' => $pole])->each(function (Societe $societe) use ($pole) { - Site::factory(rand(1, 10))->create(['societe_id' => $societe])->each(function (Site $site) use ($societe) { + Societe::factory(rand(2, 10)) + ->create(['pole_id' => $pole])->each(function (Societe $societe) use ($pole) { + Site::factory(rand(1, 10)) + ->create(['societe_id' => $societe])->each(function (Site $site) use ($societe) { Flash::factory(rand(2, 10))->create(['site_id' => $site]); User::factory(rand(1, 2))->create()->each(function (User $user) use ($site) { $user->sites()->syncWithoutDetaching([$site->id]); }); - Sondage::factory(rand(4, 7))->create(['site_id' => $site])->each(function (Sondage $sondage) use ($site) { + Sondage::factory(rand(4, 7))->create(['site_id' => $site]) + ->each(function (Sondage $sondage) use ($site) { ReponseSondage::factory(rand(1, 3))->create(['sondage_id' => $sondage]); }); Employee::factory(10)->create(['site_id' => $site]); diff --git a/routes/api.php b/routes/api.php index e81e739..51535fb 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,8 +1,5 @@ get('/user', function (Request $request) { -// return $request->user(); -// }); diff --git a/routes/channels.php b/routes/channels.php index 28b4539..480801e 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -1,7 +1,5 @@ id === (int)$id; -}); diff --git a/routes/console.php b/routes/console.php index e05f4c9..071f4f6 100644 --- a/routes/console.php +++ b/routes/console.php @@ -1,8 +1,5 @@ comment(Inspiring::quote()); -})->purpose('Display an inspiring quote'); diff --git a/routes/web.php b/routes/web.php index 2d13315..a2f36f1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -69,7 +69,7 @@ Route::prefix('bo') Route::middleware('guest:employee') ->group(function () { Route::redirect('/', '/connexion')->name('home'); - + // Connexion Route::view('/connexion', 'front.login')->name('employees.login'); Route::post('/connexion', [EmployeesController::class, 'loginSubmit'])->name('employees.loginSubmit')