From 604c1a01b33a7140ca76d3d32c4dc47efc4a7326 Mon Sep 17 00:00:00 2001 From: krzysztofrewak Date: Wed, 20 Mar 2024 13:49:53 +0100 Subject: [PATCH] #405 - rebase --- app/Domain/EmployeesMilestonesRetriever.php | 2 +- composer.json | 1 + composer.lock | 164 +++++++++++++++++- config/sanctum.php | 8 +- ..._100000_create_telescope_entries_table.php | 74 ++++---- ...01_create_personal_access_tokens_table.php | 27 ++- 6 files changed, 207 insertions(+), 69 deletions(-) diff --git a/app/Domain/EmployeesMilestonesRetriever.php b/app/Domain/EmployeesMilestonesRetriever.php index 8ee42d56..89ea6edc 100644 --- a/app/Domain/EmployeesMilestonesRetriever.php +++ b/app/Domain/EmployeesMilestonesRetriever.php @@ -35,7 +35,7 @@ public function getUpcomingBirthdays(?string $searchText, string $direction = "a ->search($searchText) ->get(); - return $users->sortBy(fn(User $user): int => (int) $user->upcomingBirthday()->diffInDays(Carbon::today()), descending: $direction !== "asc"); + return $users->sortBy(fn(User $user): int => (int)$user->upcomingBirthday()->diffInDays(Carbon::today()), descending: $direction !== "asc"); } public function getSeniority(?string $searchText, string $direction = "asc"): Collection diff --git a/composer.json b/composer.json index 7e358aed..b9d0964b 100644 --- a/composer.json +++ b/composer.json @@ -34,6 +34,7 @@ "spatie/laravel-slack-slash-command": "1.12" }, "require-dev": { + "barryvdh/laravel-debugbar": "^3.12", "blumilksoftware/codestyle": "^2.8", "laravel/dusk": "^8.0", "mockery/mockery": "^1.6", diff --git a/composer.lock b/composer.lock index 50db4a66..1cd817c7 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": "b41bbbe781a14f9a3bc2c8a287313795", + "content-hash": "f56529bfeaa2e554014dd4c63328f235", "packages": [ { "name": "azuyalabs/yasumi", @@ -6117,16 +6117,16 @@ }, { "name": "spatie/laravel-package-tools", - "version": "1.16.3", + "version": "1.16.4", "source": { "type": "git", "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "59db18c2e20d49a0b6d447bb1c654f6c123beb9e" + "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/59db18c2e20d49a0b6d447bb1c654f6c123beb9e", - "reference": "59db18c2e20d49a0b6d447bb1c654f6c123beb9e", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", + "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", "shasum": "" }, "require": { @@ -6165,7 +6165,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.3" + "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.4" }, "funding": [ { @@ -6173,7 +6173,7 @@ "type": "github" } ], - "time": "2024-03-07T07:35:57+00:00" + "time": "2024-03-20T07:29:11+00:00" }, { "name": "spatie/laravel-permission", @@ -9039,6 +9039,90 @@ } ], "packages-dev": [ + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.12.2", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "43555503052443964ce2c1c1f3b0378e58219eb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/43555503052443964ce2c1c1f3b0378e58219eb8", + "reference": "43555503052443964ce2c1c1f3b0378e58219eb8", + "shasum": "" + }, + "require": { + "illuminate/routing": "^9|^10|^11", + "illuminate/session": "^9|^10|^11", + "illuminate/support": "^9|^10|^11", + "maximebf/debugbar": "~1.21.0", + "php": "^8.0", + "symfony/finder": "^6|^7" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "orchestra/testbench-dusk": "^5|^6|^7|^8|^9", + "phpunit/phpunit": "^9.6|^10.5", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.10-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-debugbar/issues", + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.12.2" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2024-03-13T09:50:34+00:00" + }, { "name": "blumilksoftware/codestyle", "version": "v2.8.0", @@ -9558,6 +9642,72 @@ }, "time": "2024-03-12T14:10:13+00:00" }, + { + "name": "maximebf/debugbar", + "version": "v1.21.3", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "0b407703b08ea0cf6ebc61e267cc96ff7000911b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0b407703b08ea0cf6ebc61e267cc96ff7000911b", + "reference": "0b407703b08ea0cf6ebc61e267cc96ff7000911b", + "shasum": "" + }, + "require": { + "php": "^7.1|^8", + "psr/log": "^1|^2|^3", + "symfony/var-dumper": "^4|^5|^6|^7" + }, + "require-dev": { + "phpunit/phpunit": ">=7.5.20 <10.0", + "twig/twig": "^1.38|^2.7|^3.0" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.21-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "support": { + "issues": "https://github.com/maximebf/php-debugbar/issues", + "source": "https://github.com/maximebf/php-debugbar/tree/v1.21.3" + }, + "time": "2024-03-12T14:23:07+00:00" + }, { "name": "mockery/mockery", "version": "1.6.10", diff --git a/config/sanctum.php b/config/sanctum.php index b43402f6..96bb9034 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -14,9 +14,9 @@ ))), "guard" => ["web"], "expiration" => null, - 'middleware' => [ - 'authenticate_session' => AuthenticateSession::class, - 'encrypt_cookies' => EncryptCookies::class, - 'validate_csrf_token' => ValidateCsrfToken::class, + "middleware" => [ + "authenticate_session" => AuthenticateSession::class, + "encrypt_cookies" => EncryptCookies::class, + "validate_csrf_token" => ValidateCsrfToken::class, ], ]; diff --git a/database/migrations/2018_08_08_100000_create_telescope_entries_table.php b/database/migrations/2018_08_08_100000_create_telescope_entries_table.php index 96b89699..dd8b951a 100644 --- a/database/migrations/2018_08_08_100000_create_telescope_entries_table.php +++ b/database/migrations/2018_08_08_100000_create_telescope_entries_table.php @@ -1,70 +1,62 @@ getConnection()); - $schema->create('telescope_entries', function (Blueprint $table) { - $table->bigIncrements('sequence'); - $table->uuid('uuid'); - $table->uuid('batch_id'); - $table->string('family_hash')->nullable(); - $table->boolean('should_display_on_index')->default(true); - $table->string('type', 20); - $table->longText('content'); - $table->dateTime('created_at')->nullable(); - - $table->unique('uuid'); - $table->index('batch_id'); - $table->index('family_hash'); - $table->index('created_at'); - $table->index(['type', 'should_display_on_index']); + $schema->create("telescope_entries", function (Blueprint $table): void { + $table->bigIncrements("sequence"); + $table->uuid("uuid"); + $table->uuid("batch_id"); + $table->string("family_hash")->nullable(); + $table->boolean("should_display_on_index")->default(true); + $table->string("type", 20); + $table->longText("content"); + $table->dateTime("created_at")->nullable(); + + $table->unique("uuid"); + $table->index("batch_id"); + $table->index("family_hash"); + $table->index("created_at"); + $table->index(["type", "should_display_on_index"]); }); - $schema->create('telescope_entries_tags', function (Blueprint $table) { - $table->uuid('entry_uuid'); - $table->string('tag'); + $schema->create("telescope_entries_tags", function (Blueprint $table): void { + $table->uuid("entry_uuid"); + $table->string("tag"); - $table->primary(['entry_uuid', 'tag']); - $table->index('tag'); + $table->primary(["entry_uuid", "tag"]); + $table->index("tag"); - $table->foreign('entry_uuid') - ->references('uuid') - ->on('telescope_entries') - ->onDelete('cascade'); + $table->foreign("entry_uuid") + ->references("uuid") + ->on("telescope_entries") + ->onDelete("cascade"); }); - $schema->create('telescope_monitoring', function (Blueprint $table) { - $table->string('tag')->primary(); + $schema->create("telescope_monitoring", function (Blueprint $table): void { + $table->string("tag")->primary(); }); } - /** - * Reverse the migrations. - */ public function down(): void { $schema = Schema::connection($this->getConnection()); - $schema->dropIfExists('telescope_entries_tags'); - $schema->dropIfExists('telescope_entries'); - $schema->dropIfExists('telescope_monitoring'); + $schema->dropIfExists("telescope_entries_tags"); + $schema->dropIfExists("telescope_entries"); + $schema->dropIfExists("telescope_monitoring"); } }; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php index e828ad81..3cacc19e 100644 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -1,33 +1,28 @@ id(); - $table->morphs('tokenable'); - $table->string('name'); - $table->string('token', 64)->unique(); - $table->text('abilities')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->timestamp('expires_at')->nullable(); + $table->morphs("tokenable"); + $table->string("name"); + $table->string("token", 64)->unique(); + $table->text("abilities")->nullable(); + $table->timestamp("last_used_at")->nullable(); + $table->timestamp("expires_at")->nullable(); $table->timestamps(); }); } - /** - * Reverse the migrations. - */ public function down(): void { - Schema::dropIfExists('personal_access_tokens'); + Schema::dropIfExists("personal_access_tokens"); } };