diff --git a/.env.example b/.env.example index ccd42db9..43a5f376 100644 --- a/.env.example +++ b/.env.example @@ -12,7 +12,9 @@ APP_FALLBACK_LOCALE=en APP_FAKER_LOCALE=en_US APP_MAINTENANCE_DRIVER=file -APP_MAINTENANCE_STORE=database +# APP_MAINTENANCE_STORE=database + +PHP_CLI_SERVER_WORKERS=4 BCRYPT_ROUNDS=12 @@ -39,7 +41,7 @@ FILESYSTEM_DISK=local QUEUE_CONNECTION=database CACHE_STORE=database -CACHE_PREFIX= +# CACHE_PREFIX= MEMCACHED_HOST=127.0.0.1 @@ -49,6 +51,7 @@ REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_MAILER=log +MAIL_SCHEME=null MAIL_HOST=127.0.0.1 MAIL_PORT=2525 MAIL_USERNAME=null diff --git a/app/Console/Commands/ParseCachedWebMentions.php b/app/Console/Commands/ParseCachedWebMentions.php index 96d57332..010a086a 100644 --- a/app/Console/Commands/ParseCachedWebMentions.php +++ b/app/Console/Commands/ParseCachedWebMentions.php @@ -37,7 +37,7 @@ class ParseCachedWebMentions extends Command { $htmlFiles = $filesystem->allFiles(storage_path() . '/HTML'); foreach ($htmlFiles as $file) { - if ($file->getExtension() !== 'backup') { //we don’t want to parse `.backup` files + if ($file->getExtension() !== 'backup') { // we don’t want to parse `.backup` files $filepath = $file->getPathname(); $this->info('Loading HTML from: ' . $filepath); $html = $filesystem->get($filepath); diff --git a/app/Exceptions/RemoteContentNotFoundException.php b/app/Exceptions/RemoteContentNotFoundException.php index 751ebaa9..68440d50 100644 --- a/app/Exceptions/RemoteContentNotFoundException.php +++ b/app/Exceptions/RemoteContentNotFoundException.php @@ -6,5 +6,5 @@ use Exception; class RemoteContentNotFoundException extends Exception { - //used when guzzle can’t find the remote content + // used when guzzle can’t find the remote content } diff --git a/app/Http/Controllers/Admin/ArticlesController.php b/app/Http/Controllers/Admin/ArticlesController.php index d1c10c9d..429f64c8 100644 --- a/app/Http/Controllers/Admin/ArticlesController.php +++ b/app/Http/Controllers/Admin/ArticlesController.php @@ -30,7 +30,7 @@ class ArticlesController extends Controller public function store(): RedirectResponse { - //if a `.md` is attached use that for the main content. + // if a `.md` is attached use that for the main content. if (request()->hasFile('article')) { $file = request()->file('article')->openFile(); $content = $file->fread($file->getSize()); diff --git a/app/Http/Controllers/Admin/NotesController.php b/app/Http/Controllers/Admin/NotesController.php index afa75adb..add755b0 100644 --- a/app/Http/Controllers/Admin/NotesController.php +++ b/app/Http/Controllers/Admin/NotesController.php @@ -67,7 +67,7 @@ class NotesController extends Controller */ public function update(int $noteId): RedirectResponse { - //update note data + // update note data $note = Note::findOrFail($noteId); $note->note = request()->input('content'); $note->in_reply_to = request()->input('in-reply-to'); diff --git a/app/Http/Controllers/IndieAuthController.php b/app/Http/Controllers/IndieAuthController.php index e919fa6d..45b488da 100644 --- a/app/Http/Controllers/IndieAuthController.php +++ b/app/Http/Controllers/IndieAuthController.php @@ -26,8 +26,8 @@ class IndieAuthController extends Controller 'authorization_endpoint' => route('indieauth.start'), 'token_endpoint' => route('indieauth.token'), 'code_challenge_methods_supported' => ['S256'], - //'introspection_endpoint' => route('indieauth.introspection'), - //'introspection_endpoint_auth_methods_supported' => ['none'], + // 'introspection_endpoint' => route('indieauth.introspection'), + // 'introspection_endpoint_auth_methods_supported' => ['none'], ]); } diff --git a/app/Http/Controllers/MicropubMediaController.php b/app/Http/Controllers/MicropubMediaController.php index e3ed8b61..a660f11a 100644 --- a/app/Http/Controllers/MicropubMediaController.php +++ b/app/Http/Controllers/MicropubMediaController.php @@ -191,7 +191,7 @@ class MicropubMediaController extends Controller */ private function getFileTypeFromMimeType(string $mimeType): string { - //try known images + // try known images $imageMimeTypes = [ 'image/gif', 'image/jpeg', @@ -203,7 +203,7 @@ class MicropubMediaController extends Controller if (in_array($mimeType, $imageMimeTypes)) { return 'image'; } - //try known video + // try known video $videoMimeTypes = [ 'video/mp4', 'video/mpeg', @@ -214,7 +214,7 @@ class MicropubMediaController extends Controller if (in_array($mimeType, $videoMimeTypes)) { return 'video'; } - //try known audio types + // try known audio types $audioMimeTypes = [ 'audio/midi', 'audio/mpeg', diff --git a/app/Http/Controllers/WebMentionsController.php b/app/Http/Controllers/WebMentionsController.php index 700a7e23..aa75ba22 100644 --- a/app/Http/Controllers/WebMentionsController.php +++ b/app/Http/Controllers/WebMentionsController.php @@ -33,7 +33,7 @@ class WebMentionsController extends Controller */ public function receive(Request $request): Response { - //first we trivially reject requests that lack all required inputs + // first we trivially reject requests that lack all required inputs if (($request->has('target') !== true) || ($request->has('source') !== true)) { return response( 'You need both the target and source parameters', @@ -41,12 +41,12 @@ class WebMentionsController extends Controller ); } - //next check the $target is valid + // next check the $target is valid $path = parse_url($request->input('target'), PHP_URL_PATH); $pathParts = explode('/', $path); if ($pathParts[1] === 'notes') { - //we have a note + // we have a note $noteId = $pathParts[2]; try { $note = Note::findOrFail(resolve(Numbers::class)->b60tonum($noteId)); diff --git a/app/Jobs/DownloadWebMention.php b/app/Jobs/DownloadWebMention.php index d8f97328..3c187dd4 100644 --- a/app/Jobs/DownloadWebMention.php +++ b/app/Jobs/DownloadWebMention.php @@ -35,30 +35,30 @@ class DownloadWebMention implements ShouldQueue public function handle(Client $guzzle): void { $response = $guzzle->request('GET', $this->source); - //4XX and 5XX responses should get Guzzle to throw an exception, - //Laravel should catch and retry these automatically. + // 4XX and 5XX responses should get Guzzle to throw an exception, + // Laravel should catch and retry these automatically. if ($response->getStatusCode() === 200) { $filesystem = new FileSystem; $filename = storage_path('HTML') . '/' . $this->createFilenameFromURL($this->source); - //backup file first + // backup file first $filenameBackup = $filename . '.' . date('Y-m-d') . '.backup'; if ($filesystem->exists($filename)) { $filesystem->copy($filename, $filenameBackup); } - //check if base directory exists + // check if base directory exists if (! $filesystem->exists($filesystem->dirname($filename))) { $filesystem->makeDirectory( $filesystem->dirname($filename), - 0755, //mode - true //recursive + 0755, // mode + true // recursive ); } - //save new HTML + // save new HTML $filesystem->put( $filename, (string) $response->getBody() ); - //remove backup if the same + // remove backup if the same if ($filesystem->exists($filenameBackup)) { if ($filesystem->get($filename) === $filesystem->get($filenameBackup)) { $filesystem->delete($filenameBackup); diff --git a/app/Jobs/ProcessLike.php b/app/Jobs/ProcessLike.php index 37a377a3..3c6028a9 100644 --- a/app/Jobs/ProcessLike.php +++ b/app/Jobs/ProcessLike.php @@ -49,7 +49,7 @@ class ProcessLike implements ShouldQueue $this->like->content = $tweet->html; $this->like->save(); - //POSSE like + // POSSE like try { $client->request( 'POST', diff --git a/app/Jobs/ProcessMedia.php b/app/Jobs/ProcessMedia.php index e57acf3e..b7f36648 100644 --- a/app/Jobs/ProcessMedia.php +++ b/app/Jobs/ProcessMedia.php @@ -32,18 +32,21 @@ class ProcessMedia implements ShouldQueue */ public function handle(ImageManager $manager): void { + // Load file + $file = Storage::disk('local')->get('media/' . $this->filename); + // Open file try { - $image = $manager->read(storage_path('app/media/') . $this->filename); + $image = $manager->read($file); } catch (DecoderException) { // not an image; delete file and end job - unlink(storage_path('app/media/') . $this->filename); + Storage::disk('local')->delete('media/' . $this->filename); return; } // Save the file publicly - Storage::disk('local')->copy('media/' . $this->filename, 'public/media/' . $this->filename); + Storage::disk('public')->put('media/' . $this->filename, $file); // Create smaller versions if necessary if ($image->width() > 1000) { @@ -54,13 +57,13 @@ class ProcessMedia implements ShouldQueue $basename = trim(implode('.', $filenameParts), '.'); $medium = $image->resize(width: 1000); - Storage::disk('local')->put('public/media/' . $basename . '-medium.' . $extension, (string) $medium->encode()); + Storage::disk('public')->put('media/' . $basename . '-medium.' . $extension, (string) $medium->encode()); $small = $image->resize(width: 500); - Storage::disk('local')->put('public/media/' . $basename . '-small.' . $extension, (string) $small->encode()); + Storage::disk('public')->put('media/' . $basename . '-small.' . $extension, (string) $small->encode()); } // Now we can delete the locally saved image - unlink(storage_path('app/media/') . $this->filename); + Storage::disk('local')->delete('media/' . $this->filename); } } diff --git a/app/Jobs/SaveProfileImage.php b/app/Jobs/SaveProfileImage.php index d1b09776..08152d5b 100644 --- a/app/Jobs/SaveProfileImage.php +++ b/app/Jobs/SaveProfileImage.php @@ -49,7 +49,7 @@ class SaveProfileImage implements ShouldQueue $home = array_shift($home); } - //dont save pbs.twimg.com links + // dont save pbs.twimg.com links if ( $photo && parse_url($photo, PHP_URL_HOST) !== 'pbs.twimg.com' diff --git a/app/Jobs/SendWebMentions.php b/app/Jobs/SendWebMentions.php index 4252f8e0..51e5f162 100644 --- a/app/Jobs/SendWebMentions.php +++ b/app/Jobs/SendWebMentions.php @@ -72,7 +72,7 @@ class SendWebMentions implements ShouldQueue $guzzle = resolve(Client::class); $response = $guzzle->get($url); - //check HTTP Headers for webmention endpoint + // check HTTP Headers for webmention endpoint $links = Header::parse($response->getHeader('Link')); foreach ($links as $link) { if (array_key_exists('rel', $link) && mb_stristr($link['rel'], 'webmention')) { @@ -80,7 +80,7 @@ class SendWebMentions implements ShouldQueue } } - //failed to find a header so parse HTML + // failed to find a header so parse HTML $html = (string) $response->getBody(); $mf2 = new \Mf2\Parser($html, $url); diff --git a/app/Models/Note.php b/app/Models/Note.php index 9c58bb3e..62b9fcea 100644 --- a/app/Models/Note.php +++ b/app/Models/Note.php @@ -111,7 +111,7 @@ class Note extends Model { if ($value !== null) { $normalized = normalizer_normalize($value, Normalizer::FORM_C); - if ($normalized === '') { //we don’t want to save empty strings to the db + if ($normalized === '') { // we don’t want to save empty strings to the db $normalized = null; } $this->attributes['note'] = $normalized; diff --git a/app/Models/Place.php b/app/Models/Place.php index 2a36aa32..62c826ad 100644 --- a/app/Models/Place.php +++ b/app/Models/Place.php @@ -59,7 +59,7 @@ class Place extends Model * sin(radians(places.latitude))))"; return $query - ->select() //pick the columns you want here. + ->select() // pick the columns you want here. ->selectRaw("{$haversine} AS distance") ->whereRaw("{$haversine} < ?", [$distance]); } diff --git a/app/Models/WebMention.php b/app/Models/WebMention.php index a9930851..bd717aa6 100644 --- a/app/Models/WebMention.php +++ b/app/Models/WebMention.php @@ -123,7 +123,7 @@ class WebMention extends Model $host = parse_url($url, PHP_URL_HOST); if ($host === 'pbs.twimg.com') { - //make sure we use HTTPS, we know twitter supports it + // make sure we use HTTPS, we know twitter supports it return str_replace('http://', 'https://', $url); } @@ -135,7 +135,7 @@ class WebMention extends Model $codebird = resolve(Codebird::class); $info = $codebird->users_show(['screen_name' => $username]); $profile_image = $info->profile_image_url_https; - Cache::put($url, $profile_image, 10080); //1 week + Cache::put($url, $profile_image, 10080); // 1 week return $profile_image; } diff --git a/app/Services/BookmarkService.php b/app/Services/BookmarkService.php index 1a17dd08..32ec7260 100644 --- a/app/Services/BookmarkService.php +++ b/app/Services/BookmarkService.php @@ -21,7 +21,7 @@ class BookmarkService extends Service public function create(array $request, ?string $client = null): Bookmark { if (Arr::get($request, 'properties.bookmark-of.0')) { - //micropub request + // micropub request $url = normalize_url(Arr::get($request, 'properties.bookmark-of.0')); $name = Arr::get($request, 'properties.name.0'); $content = Arr::get($request, 'properties.content.0'); @@ -61,7 +61,7 @@ class BookmarkService extends Service try { $response = $client->request('GET', 'https://web.archive.org/save/' . $url); } catch (ClientException $e) { - //throw an exception to be caught + // throw an exception to be caught throw new InternetArchiveException; } if ($response->hasHeader('Content-Location')) { @@ -70,7 +70,7 @@ class BookmarkService extends Service } } - //throw an exception to be caught + // throw an exception to be caught throw new InternetArchiveException; } } diff --git a/app/Services/LikeService.php b/app/Services/LikeService.php index efd2216b..dd08e25b 100644 --- a/app/Services/LikeService.php +++ b/app/Services/LikeService.php @@ -16,7 +16,7 @@ class LikeService extends Service public function create(array $request, ?string $client = null): Like { if (Arr::get($request, 'properties.like-of.0')) { - //micropub request + // micropub request $url = normalize_url(Arr::get($request, 'properties.like-of.0')); } if (Arr::get($request, 'like-of')) { diff --git a/app/Services/Micropub/UpdateService.php b/app/Services/Micropub/UpdateService.php index 144984c2..f806361c 100644 --- a/app/Services/Micropub/UpdateService.php +++ b/app/Services/Micropub/UpdateService.php @@ -20,7 +20,7 @@ class UpdateService { $urlPath = parse_url(Arr::get($request, 'url'), PHP_URL_PATH); - //is it a note we are updating? + // is it a note we are updating? if (mb_substr($urlPath, 1, 5) !== 'notes') { return response()->json([ 'error' => 'invalid', @@ -37,7 +37,7 @@ class UpdateService ], 404); } - //got the note, are we dealing with a “replace” request? + // got the note, are we dealing with a “replace” request? if (Arr::get($request, 'replace')) { foreach (Arr::get($request, 'replace') as $property => $value) { if ($property === 'content') { @@ -64,7 +64,7 @@ class UpdateService ]); } - //how about “add” + // how about “add” if (Arr::get($request, 'add')) { foreach (Arr::get($request, 'add') as $property => $value) { if ($property === 'syndication') { diff --git a/app/Services/PlaceService.php b/app/Services/PlaceService.php index a63caa98..cd9b4b9f 100644 --- a/app/Services/PlaceService.php +++ b/app/Services/PlaceService.php @@ -14,8 +14,8 @@ class PlaceService */ public function createPlace(array $data): Place { - //obviously a place needs a lat/lng, but this could be sent in a geo-url - //if no geo array key, we assume the array already has lat/lng values + // obviously a place needs a lat/lng, but this could be sent in a geo-url + // if no geo array key, we assume the array already has lat/lng values if (array_key_exists('geo', $data) && $data['geo'] !== null) { preg_match_all( '/([0-9\.\-]+)/', @@ -40,7 +40,7 @@ class PlaceService */ public function createPlaceFromCheckin(array $checkin): Place { - //check if the place exists if from swarm + // check if the place exists if from swarm if (Arr::has($checkin, 'properties.url')) { $place = Place::whereExternalURL(Arr::get($checkin, 'properties.url.0'))->get(); if (count($place) === 1) { diff --git a/composer.lock b/composer.lock index 562736bf..a7521ac8 100644 --- a/composer.lock +++ b/composer.lock @@ -62,16 +62,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.340.4", + "version": "3.342.18", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "2896cfb3f6b2bd06757b16e99e1cab93c9598af3" + "reference": "e6c81bf323b082f8fe2b76d8d41e2614806d5892" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2896cfb3f6b2bd06757b16e99e1cab93c9598af3", - "reference": "2896cfb3f6b2bd06757b16e99e1cab93c9598af3", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e6c81bf323b082f8fe2b76d8d41e2614806d5892", + "reference": "e6c81bf323b082f8fe2b76d8d41e2614806d5892", "shasum": "" }, "require": { @@ -153,9 +153,9 @@ "support": { "forum": "https://github.com/aws/aws-sdk-php/discussions", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.340.4" + "source": "https://github.com/aws/aws-sdk-php/tree/3.342.18" }, - "time": "2025-02-28T19:13:38+00:00" + "time": "2025-04-01T18:15:02+00:00" }, { "name": "brick/math", @@ -939,16 +939,16 @@ }, { "name": "egulias/email-validator", - "version": "4.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "b115554301161fa21467629f1e1391c1936de517" + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b115554301161fa21467629f1e1391c1936de517", - "reference": "b115554301161fa21467629f1e1391c1936de517", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", "shasum": "" }, "require": { @@ -994,7 +994,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.3" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.4" }, "funding": [ { @@ -1002,7 +1002,7 @@ "type": "github" } ], - "time": "2024-12-27T00:36:43+00:00" + "time": "2025-03-06T22:45:56+00:00" }, { "name": "fruitcake/php-cors", @@ -1139,16 +1139,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.9.2", + "version": "7.9.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", "shasum": "" }, "require": { @@ -1245,7 +1245,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + "source": "https://github.com/guzzle/guzzle/tree/7.9.3" }, "funding": [ { @@ -1261,20 +1261,20 @@ "type": "tidelift" } ], - "time": "2024-07-24T11:22:20+00:00" + "time": "2025-03-27T13:37:11+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.4", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c", "shasum": "" }, "require": { @@ -1328,7 +1328,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.4" + "source": "https://github.com/guzzle/promises/tree/2.2.0" }, "funding": [ { @@ -1344,20 +1344,20 @@ "type": "tidelift" } ], - "time": "2024-10-17T10:06:22+00:00" + "time": "2025-03-27T13:27:01+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.7.0", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16", "shasum": "" }, "require": { @@ -1444,7 +1444,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "source": "https://github.com/guzzle/psr7/tree/2.7.1" }, "funding": [ { @@ -1460,7 +1460,7 @@ "type": "tidelift" } ], - "time": "2024-07-18T11:15:46+00:00" + "time": "2025-03-27T12:30:47+00:00" }, { "name": "guzzlehttp/uri-template", @@ -1701,16 +1701,16 @@ }, { "name": "intervention/gif", - "version": "4.2.1", + "version": "4.2.2", "source": { "type": "git", "url": "https://github.com/Intervention/gif.git", - "reference": "6addac2c68b4bc0e37d0d3ccedda57eb84729c49" + "reference": "5999eac6a39aa760fb803bc809e8909ee67b451a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Intervention/gif/zipball/6addac2c68b4bc0e37d0d3ccedda57eb84729c49", - "reference": "6addac2c68b4bc0e37d0d3ccedda57eb84729c49", + "url": "https://api.github.com/repos/Intervention/gif/zipball/5999eac6a39aa760fb803bc809e8909ee67b451a", + "reference": "5999eac6a39aa760fb803bc809e8909ee67b451a", "shasum": "" }, "require": { @@ -1718,7 +1718,7 @@ }, "require-dev": { "phpstan/phpstan": "^2.1", - "phpunit/phpunit": "^10.0 || ^11.0", + "phpunit/phpunit": "^10.0 || ^11.0 || ^12.0", "slevomat/coding-standard": "~8.0", "squizlabs/php_codesniffer": "^3.8" }, @@ -1749,7 +1749,7 @@ ], "support": { "issues": "https://github.com/Intervention/gif/issues", - "source": "https://github.com/Intervention/gif/tree/4.2.1" + "source": "https://github.com/Intervention/gif/tree/4.2.2" }, "funding": [ { @@ -1765,7 +1765,7 @@ "type": "ko_fi" } ], - "time": "2025-01-05T10:52:39+00:00" + "time": "2025-03-29T07:46:21+00:00" }, { "name": "intervention/image", @@ -2010,16 +2010,16 @@ }, { "name": "laravel/framework", - "version": "v12.0.1", + "version": "v12.5.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "d99e2385a6d4324782d52f4423891966425641be" + "reference": "0ab4791b2c5f405f8728e4481265599803564c02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/d99e2385a6d4324782d52f4423891966425641be", - "reference": "d99e2385a6d4324782d52f4423891966425641be", + "url": "https://api.github.com/repos/laravel/framework/zipball/0ab4791b2c5f405f8728e4481265599803564c02", + "reference": "0ab4791b2c5f405f8728e4481265599803564c02", "shasum": "" }, "require": { @@ -2127,7 +2127,7 @@ "league/flysystem-read-only": "^3.25.1", "league/flysystem-sftp-v3": "^3.25.1", "mockery/mockery": "^1.6.10", - "orchestra/testbench-core": "^10.0", + "orchestra/testbench-core": "^10.0.0", "pda/pheanstalk": "^5.0.6", "php-http/discovery": "^1.15", "phpstan/phpstan": "^2.0", @@ -2221,20 +2221,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2025-02-24T13:31:23+00:00" + "time": "2025-04-01T14:40:42+00:00" }, { "name": "laravel/horizon", - "version": "v5.30.3", + "version": "v5.31.1", "source": { "type": "git", "url": "https://github.com/laravel/horizon.git", - "reference": "7b9ee870bf0e425b956fd0433f616f98fe951f72" + "reference": "bc98b63313b2e0a3d0c8e84e1b691388ef1bf653" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/horizon/zipball/7b9ee870bf0e425b956fd0433f616f98fe951f72", - "reference": "7b9ee870bf0e425b956fd0433f616f98fe951f72", + "url": "https://api.github.com/repos/laravel/horizon/zipball/bc98b63313b2e0a3d0c8e84e1b691388ef1bf653", + "reference": "bc98b63313b2e0a3d0c8e84e1b691388ef1bf653", "shasum": "" }, "require": { @@ -2299,9 +2299,9 @@ ], "support": { "issues": "https://github.com/laravel/horizon/issues", - "source": "https://github.com/laravel/horizon/tree/v5.30.3" + "source": "https://github.com/laravel/horizon/tree/v5.31.1" }, - "time": "2025-02-11T13:52:50+00:00" + "time": "2025-03-16T23:48:25+00:00" }, { "name": "laravel/prompts", @@ -2428,16 +2428,16 @@ }, { "name": "laravel/scout", - "version": "v10.13.1", + "version": "v10.14.1", "source": { "type": "git", "url": "https://github.com/laravel/scout.git", - "reference": "577535cd93474e4c915e7469cbfa597c41aef8e2" + "reference": "6ae3ec83ceacb554f395df9fe15318a14b79bb39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/scout/zipball/577535cd93474e4c915e7469cbfa597c41aef8e2", - "reference": "577535cd93474e4c915e7469cbfa597c41aef8e2", + "url": "https://api.github.com/repos/laravel/scout/zipball/6ae3ec83ceacb554f395df9fe15318a14b79bb39", + "reference": "6ae3ec83ceacb554f395df9fe15318a14b79bb39", "shasum": "" }, "require": { @@ -2505,20 +2505,20 @@ "issues": "https://github.com/laravel/scout/issues", "source": "https://github.com/laravel/scout" }, - "time": "2025-02-18T18:39:33+00:00" + "time": "2025-04-01T14:58:03+00:00" }, { "name": "laravel/serializable-closure", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "f379c13663245f7aa4512a7869f62eb14095f23f" + "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f379c13663245f7aa4512a7869f62eb14095f23f", - "reference": "f379c13663245f7aa4512a7869f62eb14095f23f", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b352cf0534aa1ae6b4d825d1e762e35d43f8a841", + "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841", "shasum": "" }, "require": { @@ -2566,7 +2566,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2025-02-11T15:03:05+00:00" + "time": "2025-03-19T13:51:03+00:00" }, { "name": "laravel/tinker", @@ -3444,16 +3444,16 @@ }, { "name": "monolog/monolog", - "version": "3.8.1", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4" + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/10d85740180ecba7896c87e06a166e0c95a0e3b6", + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6", "shasum": "" }, "require": { @@ -3531,7 +3531,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.8.1" + "source": "https://github.com/Seldaek/monolog/tree/3.9.0" }, "funding": [ { @@ -3543,7 +3543,7 @@ "type": "tidelift" } ], - "time": "2024-12-05T17:15:07+00:00" + "time": "2025-03-24T10:02:05+00:00" }, { "name": "mtdowling/jmespath.php", @@ -3781,16 +3781,16 @@ }, { "name": "nette/utils", - "version": "v4.0.5", + "version": "v4.0.6", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96" + "reference": "ce708655043c7050eb050df361c5e313cf708309" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", - "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", + "url": "https://api.github.com/repos/nette/utils/zipball/ce708655043c7050eb050df361c5e313cf708309", + "reference": "ce708655043c7050eb050df361c5e313cf708309", "shasum": "" }, "require": { @@ -3861,9 +3861,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.5" + "source": "https://github.com/nette/utils/tree/v4.0.6" }, - "time": "2024-08-07T15:39:19+00:00" + "time": "2025-03-30T21:06:30+00:00" }, { "name": "nikic/php-parser", @@ -4830,16 +4830,16 @@ }, { "name": "psy/psysh", - "version": "v0.12.7", + "version": "v0.12.8", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c" + "reference": "85057ceedee50c49d4f6ecaff73ee96adb3b3625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", - "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/85057ceedee50c49d4f6ecaff73ee96adb3b3625", + "reference": "85057ceedee50c49d4f6ecaff73ee96adb3b3625", "shasum": "" }, "require": { @@ -4903,9 +4903,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.7" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.8" }, - "time": "2024-12-10T01:58:33+00:00" + "time": "2025-03-16T03:05:19+00:00" }, { "name": "ralouphie/getallheaders", @@ -4953,16 +4953,16 @@ }, { "name": "ramsey/collection", - "version": "2.0.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", "shasum": "" }, "require": { @@ -4970,25 +4970,22 @@ }, "require-dev": { "captainhook/plugin-composer": "^5.3", - "ergebnis/composer-normalize": "^2.28.3", - "fakerphp/faker": "^1.21", + "ergebnis/composer-normalize": "^2.45", + "fakerphp/faker": "^1.24", "hamcrest/hamcrest-php": "^2.0", - "jangregor/phpstan-prophecy": "^1.0", - "mockery/mockery": "^1.5", + "jangregor/phpstan-prophecy": "^2.1", + "mockery/mockery": "^1.6", "php-parallel-lint/php-console-highlighter": "^1.0", - "php-parallel-lint/php-parallel-lint": "^1.3", - "phpcsstandards/phpcsutils": "^1.0.0-rc1", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5", - "psalm/plugin-mockery": "^1.1", - "psalm/plugin-phpunit": "^0.18.4", - "ramsey/coding-standard": "^2.0.3", - "ramsey/conventional-commits": "^1.3", - "vimeo/psalm": "^5.4" + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpspec/prophecy-phpunit": "^2.3", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-mockery": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5", + "ramsey/coding-standard": "^2.3", + "ramsey/conventional-commits": "^1.6", + "roave/security-advisories": "dev-latest" }, "type": "library", "extra": { @@ -5026,19 +5023,9 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.0.0" + "source": "https://github.com/ramsey/collection/tree/2.1.1" }, - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", - "type": "tidelift" - } - ], - "time": "2022-12-31T21:50:55+00:00" + "time": "2025-03-22T05:38:12+00:00" }, { "name": "ramsey/uuid", @@ -5912,16 +5899,16 @@ }, { "name": "symfony/console", - "version": "v7.2.1", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3" + "reference": "e51498ea18570c062e7df29d05a7003585b19b88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3", + "url": "https://api.github.com/repos/symfony/console/zipball/e51498ea18570c062e7df29d05a7003585b19b88", + "reference": "e51498ea18570c062e7df29d05a7003585b19b88", "shasum": "" }, "require": { @@ -5985,7 +5972,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.1" + "source": "https://github.com/symfony/console/tree/v7.2.5" }, "funding": [ { @@ -6001,7 +5988,7 @@ "type": "tidelift" } ], - "time": "2024-12-11T03:49:26+00:00" + "time": "2025-03-12T08:11:12+00:00" }, { "name": "symfony/css-selector", @@ -6137,16 +6124,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.2.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "aabf79938aa795350c07ce6464dd1985607d95d5" + "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/aabf79938aa795350c07ce6464dd1985607d95d5", - "reference": "aabf79938aa795350c07ce6464dd1985607d95d5", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", + "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", "shasum": "" }, "require": { @@ -6192,7 +6179,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/v7.2.4" + "source": "https://github.com/symfony/error-handler/tree/v7.2.5" }, "funding": [ { @@ -6208,7 +6195,7 @@ "type": "tidelift" } ], - "time": "2025-02-02T20:27:07+00:00" + "time": "2025-03-03T07:12:39+00:00" }, { "name": "symfony/event-dispatcher", @@ -6501,16 +6488,16 @@ }, { "name": "symfony/http-foundation", - "version": "v7.2.3", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0" + "reference": "371272aeb6286f8135e028ca535f8e4d6f114126" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ee1b504b8926198be89d05e5b6fc4c3810c090f0", - "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/371272aeb6286f8135e028ca535f8e4d6f114126", + "reference": "371272aeb6286f8135e028ca535f8e4d6f114126", "shasum": "" }, "require": { @@ -6559,7 +6546,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.2.3" + "source": "https://github.com/symfony/http-foundation/tree/v7.2.5" }, "funding": [ { @@ -6575,20 +6562,20 @@ "type": "tidelift" } ], - "time": "2025-01-17T10:56:55+00:00" + "time": "2025-03-25T15:54:33+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.2.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "9f1103734c5789798fefb90e91de4586039003ed" + "reference": "b1fe91bc1fa454a806d3f98db4ba826eb9941a54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f1103734c5789798fefb90e91de4586039003ed", - "reference": "9f1103734c5789798fefb90e91de4586039003ed", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b1fe91bc1fa454a806d3f98db4ba826eb9941a54", + "reference": "b1fe91bc1fa454a806d3f98db4ba826eb9941a54", "shasum": "" }, "require": { @@ -6673,7 +6660,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/v7.2.4" + "source": "https://github.com/symfony/http-kernel/tree/v7.2.5" }, "funding": [ { @@ -6689,7 +6676,7 @@ "type": "tidelift" } ], - "time": "2025-02-26T11:01:22+00:00" + "time": "2025-03-28T13:32:50+00:00" }, { "name": "symfony/mailer", @@ -7493,16 +7480,16 @@ }, { "name": "symfony/process", - "version": "v7.2.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf" + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf", - "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf", + "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", "shasum": "" }, "require": { @@ -7534,7 +7521,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.4" + "source": "https://github.com/symfony/process/tree/v7.2.5" }, "funding": [ { @@ -7550,7 +7537,7 @@ "type": "tidelift" } ], - "time": "2025-02-05T08:33:46+00:00" + "time": "2025-03-13T12:21:46+00:00" }, { "name": "symfony/property-access", @@ -7630,16 +7617,16 @@ }, { "name": "symfony/property-info", - "version": "v7.2.3", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "dedb118fd588a92f226b390250b384d25f4192fe" + "reference": "f00fd9685ecdbabe82ca25c7b739ce7bba99302c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/dedb118fd588a92f226b390250b384d25f4192fe", - "reference": "dedb118fd588a92f226b390250b384d25f4192fe", + "url": "https://api.github.com/repos/symfony/property-info/zipball/f00fd9685ecdbabe82ca25c7b739ce7bba99302c", + "reference": "f00fd9685ecdbabe82ca25c7b739ce7bba99302c", "shasum": "" }, "require": { @@ -7695,7 +7682,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v7.2.3" + "source": "https://github.com/symfony/property-info/tree/v7.2.5" }, "funding": [ { @@ -7711,7 +7698,7 @@ "type": "tidelift" } ], - "time": "2025-01-27T11:08:17+00:00" + "time": "2025-03-06T16:27:19+00:00" }, { "name": "symfony/routing", @@ -7796,16 +7783,16 @@ }, { "name": "symfony/serializer", - "version": "v7.2.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "d3e6cd13f035e1061647f0144b5623a1e7e775ba" + "reference": "d8b75b2c8144c29ac43b235738411f7cca6d584d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/d3e6cd13f035e1061647f0144b5623a1e7e775ba", - "reference": "d3e6cd13f035e1061647f0144b5623a1e7e775ba", + "url": "https://api.github.com/repos/symfony/serializer/zipball/d8b75b2c8144c29ac43b235738411f7cca6d584d", + "reference": "d8b75b2c8144c29ac43b235738411f7cca6d584d", "shasum": "" }, "require": { @@ -7874,7 +7861,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v7.2.4" + "source": "https://github.com/symfony/serializer/tree/v7.2.5" }, "funding": [ { @@ -7890,7 +7877,7 @@ "type": "tidelift" } ], - "time": "2025-02-24T10:49:57+00:00" + "time": "2025-03-24T12:37:32+00:00" }, { "name": "symfony/service-contracts", @@ -8237,16 +8224,16 @@ }, { "name": "symfony/type-info", - "version": "v7.2.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/type-info.git", - "reference": "269344575181c326781382ed53f7262feae3c6a4" + "reference": "c4824a6b658294c828e609d3d8dbb4e87f6a375d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/type-info/zipball/269344575181c326781382ed53f7262feae3c6a4", - "reference": "269344575181c326781382ed53f7262feae3c6a4", + "url": "https://api.github.com/repos/symfony/type-info/zipball/c4824a6b658294c828e609d3d8dbb4e87f6a375d", + "reference": "c4824a6b658294c828e609d3d8dbb4e87f6a375d", "shasum": "" }, "require": { @@ -8292,7 +8279,7 @@ "type" ], "support": { - "source": "https://github.com/symfony/type-info/tree/v7.2.4" + "source": "https://github.com/symfony/type-info/tree/v7.2.5" }, "funding": [ { @@ -8308,7 +8295,7 @@ "type": "tidelift" } ], - "time": "2025-02-25T15:19:41+00:00" + "time": "2025-03-24T09:03:36+00:00" }, { "name": "symfony/uid", @@ -8764,16 +8751,16 @@ }, { "name": "web-auth/webauthn-lib", - "version": "5.1.2", + "version": "5.2.2", "source": { "type": "git", "url": "https://github.com/web-auth/webauthn-lib.git", - "reference": "7aa58ea290c421066d068b031f3f653dab20430c" + "reference": "8937c397c8ae91b5af422ca8aa915c756062da74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/7aa58ea290c421066d068b031f3f653dab20430c", - "reference": "7aa58ea290c421066d068b031f3f653dab20430c", + "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/8937c397c8ae91b5af422ca8aa915c756062da74", + "reference": "8937c397c8ae91b5af422ca8aa915c756062da74", "shasum": "" }, "require": { @@ -8834,7 +8821,7 @@ "webauthn" ], "support": { - "source": "https://github.com/web-auth/webauthn-lib/tree/5.1.2" + "source": "https://github.com/web-auth/webauthn-lib/tree/5.2.2" }, "funding": [ { @@ -8846,7 +8833,7 @@ "type": "patreon" } ], - "time": "2025-02-16T10:15:04+00:00" + "time": "2025-03-16T14:38:43+00:00" }, { "name": "webmozart/assert", @@ -9144,16 +9131,16 @@ }, { "name": "composer/class-map-generator", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9" + "reference": "134b705ddb0025d397d8318a75825fe3c9d1da34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/ffe442c5974c44a9343e37a0abcb1cc37319f5b9", - "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/134b705ddb0025d397d8318a75825fe3c9d1da34", + "reference": "134b705ddb0025d397d8318a75825fe3c9d1da34", "shasum": "" }, "require": { @@ -9197,7 +9184,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.6.0" + "source": "https://github.com/composer/class-map-generator/tree/1.6.1" }, "funding": [ { @@ -9213,7 +9200,7 @@ "type": "tidelift" } ], - "time": "2025-02-05T10:05:34+00:00" + "time": "2025-03-24T13:50:44+00:00" }, { "name": "composer/pcre", @@ -9359,16 +9346,16 @@ }, { "name": "filp/whoops", - "version": "2.17.0", + "version": "2.18.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "075bc0c26631110584175de6523ab3f1652eb28e" + "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/075bc0c26631110584175de6523ab3f1652eb28e", - "reference": "075bc0c26631110584175de6523ab3f1652eb28e", + "url": "https://api.github.com/repos/filp/whoops/zipball/a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", + "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", "shasum": "" }, "require": { @@ -9418,7 +9405,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.17.0" + "source": "https://github.com/filp/whoops/tree/2.18.0" }, "funding": [ { @@ -9426,7 +9413,7 @@ "type": "github" } ], - "time": "2025-01-25T12:00:00+00:00" + "time": "2025-03-15T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -9481,16 +9468,16 @@ }, { "name": "laravel/dusk", - "version": "v8.3.1", + "version": "v8.3.2", "source": { "type": "git", "url": "https://github.com/laravel/dusk.git", - "reference": "541ca2d2004ae4ed04446b9e712b68180fca158c" + "reference": "bb701836357bf6f6c6658ef90b5a0f8232affb0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/dusk/zipball/541ca2d2004ae4ed04446b9e712b68180fca158c", - "reference": "541ca2d2004ae4ed04446b9e712b68180fca158c", + "url": "https://api.github.com/repos/laravel/dusk/zipball/bb701836357bf6f6c6658ef90b5a0f8232affb0f", + "reference": "bb701836357bf6f6c6658ef90b5a0f8232affb0f", "shasum": "" }, "require": { @@ -9549,9 +9536,9 @@ ], "support": { "issues": "https://github.com/laravel/dusk/issues", - "source": "https://github.com/laravel/dusk/tree/v8.3.1" + "source": "https://github.com/laravel/dusk/tree/v8.3.2" }, - "time": "2025-02-12T16:14:51+00:00" + "time": "2025-02-20T14:42:00+00:00" }, { "name": "laravel/pail", @@ -9633,16 +9620,16 @@ }, { "name": "laravel/pint", - "version": "v1.21.0", + "version": "v1.21.2", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "531fa0871fbde719c51b12afa3a443b8f4e4b425" + "reference": "370772e7d9e9da087678a0edf2b11b6960e40558" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/531fa0871fbde719c51b12afa3a443b8f4e4b425", - "reference": "531fa0871fbde719c51b12afa3a443b8f4e4b425", + "url": "https://api.github.com/repos/laravel/pint/zipball/370772e7d9e9da087678a0edf2b11b6960e40558", + "reference": "370772e7d9e9da087678a0edf2b11b6960e40558", "shasum": "" }, "require": { @@ -9653,9 +9640,9 @@ "php": "^8.2.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.68.5", - "illuminate/view": "^11.42.0", - "larastan/larastan": "^3.0.4", + "friendsofphp/php-cs-fixer": "^3.72.0", + "illuminate/view": "^11.44.2", + "larastan/larastan": "^3.2.0", "laravel-zero/framework": "^11.36.1", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^2.3", @@ -9695,7 +9682,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-02-18T03:18:57+00:00" + "time": "2025-03-14T22:31:42+00:00" }, { "name": "laravel/sail", @@ -9905,20 +9892,20 @@ }, { "name": "nunomaduro/collision", - "version": "v8.6.1", + "version": "v8.7.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "86f003c132143d5a2ab214e19933946409e0cae7" + "reference": "586cb8181a257a2152b6a855ca8d9598878a1a26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/86f003c132143d5a2ab214e19933946409e0cae7", - "reference": "86f003c132143d5a2ab214e19933946409e0cae7", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/586cb8181a257a2152b6a855ca8d9598878a1a26", + "reference": "586cb8181a257a2152b6a855ca8d9598878a1a26", "shasum": "" }, "require": { - "filp/whoops": "^2.16.0", + "filp/whoops": "^2.17.0", "nunomaduro/termwind": "^2.3.0", "php": "^8.2.0", "symfony/console": "^7.2.1" @@ -9928,14 +9915,14 @@ "phpunit/phpunit": "<11.5.3 || >=12.0.0" }, "require-dev": { - "larastan/larastan": "^2.9.12", - "laravel/framework": "^11.39.1", - "laravel/pint": "^1.20.0", - "laravel/sail": "^1.40.0", - "laravel/sanctum": "^4.0.7", - "laravel/tinker": "^2.10.0", - "orchestra/testbench-core": "^9.9.2", - "pestphp/pest": "^3.7.3", + "larastan/larastan": "^2.10.0", + "laravel/framework": "^11.44.2", + "laravel/pint": "^1.21.2", + "laravel/sail": "^1.41.0", + "laravel/sanctum": "^4.0.8", + "laravel/tinker": "^2.10.1", + "orchestra/testbench-core": "^9.12.0", + "pestphp/pest": "^3.7.4", "sebastian/environment": "^6.1.0 || ^7.2.0" }, "type": "library", @@ -9999,7 +9986,7 @@ "type": "patreon" } ], - "time": "2025-01-23T13:41:43+00:00" + "time": "2025-03-14T22:37:40+00:00" }, { "name": "openai-php/client", @@ -10934,16 +10921,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.10", + "version": "11.5.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d5df2b32d729562ff8db634678d71085ee579006" + "reference": "4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d5df2b32d729562ff8db634678d71085ee579006", - "reference": "d5df2b32d729562ff8db634678d71085ee579006", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c", + "reference": "4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c", "shasum": "" }, "require": { @@ -10957,20 +10944,20 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0.8", + "phpunit/php-code-coverage": "^11.0.9", "phpunit/php-file-iterator": "^5.1.0", "phpunit/php-invoker": "^5.0.1", "phpunit/php-text-template": "^4.0.1", "phpunit/php-timer": "^7.0.1", "sebastian/cli-parser": "^3.0.2", - "sebastian/code-unit": "^3.0.2", - "sebastian/comparator": "^6.3.0", + "sebastian/code-unit": "^3.0.3", + "sebastian/comparator": "^6.3.1", "sebastian/diff": "^6.0.2", "sebastian/environment": "^7.2.0", "sebastian/exporter": "^6.3.0", "sebastian/global-state": "^7.0.2", "sebastian/object-enumerator": "^6.0.1", - "sebastian/type": "^5.1.0", + "sebastian/type": "^5.1.2", "sebastian/version": "^5.0.2", "staabm/side-effects-detector": "^1.0.5" }, @@ -11015,7 +11002,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.15" }, "funding": [ { @@ -11031,7 +11018,7 @@ "type": "tidelift" } ], - "time": "2025-02-25T06:11:48+00:00" + "time": "2025-03-23T16:02:11+00:00" }, { "name": "sebastian/cli-parser", @@ -11092,16 +11079,16 @@ }, { "name": "sebastian/code-unit", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca" + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", - "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", "shasum": "" }, "require": { @@ -11137,7 +11124,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", "security": "https://github.com/sebastianbergmann/code-unit/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" }, "funding": [ { @@ -11145,7 +11132,7 @@ "type": "github" } ], - "time": "2024-12-12T09:59:06+00:00" + "time": "2025-03-19T07:56:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -11205,16 +11192,16 @@ }, { "name": "sebastian/comparator", - "version": "6.3.0", + "version": "6.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115" + "reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d4e47a769525c4dd38cea90e5dcd435ddbbc7115", - "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/24b8fbc2c8e201bb1308e7b05148d6ab393b6959", + "reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959", "shasum": "" }, "require": { @@ -11233,7 +11220,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.2-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -11273,7 +11260,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.0" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.1" }, "funding": [ { @@ -11281,7 +11268,7 @@ "type": "github" } ], - "time": "2025-01-06T10:28:19+00:00" + "time": "2025-03-07T06:57:01+00:00" }, { "name": "sebastian/complexity", @@ -11850,16 +11837,16 @@ }, { "name": "sebastian/type", - "version": "5.1.0", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", - "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", "shasum": "" }, "require": { @@ -11895,7 +11882,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" + "source": "https://github.com/sebastianbergmann/type/tree/5.1.2" }, "funding": [ { @@ -11903,7 +11890,7 @@ "type": "github" } ], - "time": "2024-09-17T13:12:04+00:00" + "time": "2025-03-18T13:35:50+00:00" }, { "name": "sebastian/version", @@ -11961,16 +11948,16 @@ }, { "name": "spatie/laravel-ray", - "version": "1.39.1", + "version": "1.40.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ray.git", - "reference": "0d890fa2cd2c0b6175cf54c56b9321d81047571d" + "reference": "1d1b31eb83cb38b41975c37363c7461de6d86b25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/0d890fa2cd2c0b6175cf54c56b9321d81047571d", - "reference": "0d890fa2cd2c0b6175cf54c56b9321d81047571d", + "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/1d1b31eb83cb38b41975c37363c7461de6d86b25", + "reference": "1d1b31eb83cb38b41975c37363c7461de6d86b25", "shasum": "" }, "require": { @@ -12033,7 +12020,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-ray/issues", - "source": "https://github.com/spatie/laravel-ray/tree/1.39.1" + "source": "https://github.com/spatie/laravel-ray/tree/1.40.2" }, "funding": [ { @@ -12045,7 +12032,7 @@ "type": "other" } ], - "time": "2025-02-05T08:16:15+00:00" + "time": "2025-03-27T08:26:55+00:00" }, { "name": "spatie/macroable", @@ -12099,16 +12086,16 @@ }, { "name": "spatie/ray", - "version": "1.41.5", + "version": "1.41.6", "source": { "type": "git", "url": "https://github.com/spatie/ray.git", - "reference": "9d078f04ffa32ad543a20716844ec343fdd7d856" + "reference": "ae6e32a54a901544a3d70b12b865900bc240f71c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ray/zipball/9d078f04ffa32ad543a20716844ec343fdd7d856", - "reference": "9d078f04ffa32ad543a20716844ec343fdd7d856", + "url": "https://api.github.com/repos/spatie/ray/zipball/ae6e32a54a901544a3d70b12b865900bc240f71c", + "reference": "ae6e32a54a901544a3d70b12b865900bc240f71c", "shasum": "" }, "require": { @@ -12168,7 +12155,7 @@ ], "support": { "issues": "https://github.com/spatie/ray/issues", - "source": "https://github.com/spatie/ray/tree/1.41.5" + "source": "https://github.com/spatie/ray/tree/1.41.6" }, "funding": [ { @@ -12180,7 +12167,7 @@ "type": "other" } ], - "time": "2025-02-14T12:51:43+00:00" + "time": "2025-03-21T08:56:30+00:00" }, { "name": "staabm/side-effects-detector", @@ -12378,16 +12365,16 @@ }, { "name": "symfony/yaml", - "version": "v7.2.3", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ac238f173df0c9c1120f862d0f599e17535a87ec" + "reference": "4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ac238f173df0c9c1120f862d0f599e17535a87ec", - "reference": "ac238f173df0c9c1120f862d0f599e17535a87ec", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912", + "reference": "4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912", "shasum": "" }, "require": { @@ -12430,7 +12417,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.2.3" + "source": "https://github.com/symfony/yaml/tree/v7.2.5" }, "funding": [ { @@ -12446,7 +12433,7 @@ "type": "tidelift" } ], - "time": "2025-01-07T12:55:42+00:00" + "time": "2025-03-03T07:12:39+00:00" }, { "name": "theseer/tokenizer", diff --git a/config/app.php b/config/app.php index f4672673..324b513a 100644 --- a/config/app.php +++ b/config/app.php @@ -65,7 +65,7 @@ return [ | */ - 'timezone' => env('APP_TIMEZONE', 'UTC'), + 'timezone' => 'UTC', /* |-------------------------------------------------------------------------- diff --git a/config/database.php b/config/database.php index f8e8dcb8..8910562d 100644 --- a/config/database.php +++ b/config/database.php @@ -37,6 +37,9 @@ return [ 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), + 'busy_timeout' => null, + 'journal_mode' => null, + 'synchronous' => null, ], 'mysql' => [ @@ -145,6 +148,7 @@ return [ 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'redis'), 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), + 'persistent' => env('REDIS_PERSISTENT', false), ], 'default' => [ diff --git a/config/debugbar.php b/config/debugbar.php index b045f6ca..cb04694e 100644 --- a/config/debugbar.php +++ b/config/debugbar.php @@ -119,7 +119,7 @@ return [ 'full_log' => false, ], 'views' => [ - 'data' => false, //Note: Can slow down the application, because the data can be quite large.. + 'data' => false, // Note: Can slow down the application, because the data can be quite large.. ], 'route' => [ 'label' => true, // show complete route on bar diff --git a/config/filesystems.php b/config/filesystems.php index 44fe9c82..a17a9a47 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -32,8 +32,10 @@ return [ 'local' => [ 'driver' => 'local', - 'root' => storage_path('app'), + 'root' => storage_path('app/private'), + 'serve' => true, 'throw' => false, + 'report' => false, ], 'public' => [ @@ -42,6 +44,7 @@ return [ 'url' => env('APP_URL').'/storage', 'visibility' => 'public', 'throw' => false, + 'report' => false, ], 's3' => [ @@ -54,6 +57,7 @@ return [ 'endpoint' => env('AWS_ENDPOINT'), 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 'throw' => false, + 'report' => false, ], ], diff --git a/config/mail.php b/config/mail.php index a4a02fe4..7132144d 100644 --- a/config/mail.php +++ b/config/mail.php @@ -38,14 +38,14 @@ return [ 'smtp' => [ 'transport' => 'smtp', + 'scheme' => env('MAIL_SCHEME'), 'url' => env('MAIL_URL'), 'host' => env('MAIL_HOST', '127.0.0.1'), 'port' => env('MAIL_PORT', 2525), - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, - 'local_domain' => env('MAIL_EHLO_DOMAIN'), + 'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)), ], 'ses' => [ diff --git a/config/session.php b/config/session.php index 0e22ee41..6ff263bd 100644 --- a/config/session.php +++ b/config/session.php @@ -32,7 +32,7 @@ return [ | */ - 'lifetime' => env('SESSION_LIFETIME', 120), + 'lifetime' => (int) env('SESSION_LIFETIME', 120), 'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false), diff --git a/database/seeders/NotesTableSeeder.php b/database/seeders/NotesTableSeeder.php index b73c2e34..a9fbab12 100644 --- a/database/seeders/NotesTableSeeder.php +++ b/database/seeders/NotesTableSeeder.php @@ -83,7 +83,7 @@ class NotesTableSeeder extends Seeder ->where('id', $noteWithoutContact->id) ->update(['updated_at' => $now->toDateTimeString()]); - //copy aaron’s profile pic in place + // copy aaron’s profile pic in place $spl = new SplFileInfo(public_path() . '/assets/profile-images/aaronparecki.com'); if ($spl->isDir() === false) { mkdir(public_path() . '/assets/profile-images/aaronparecki.com', 0755); diff --git a/helpers.php b/helpers.php index ed1f9912..0c3dfcfa 100644 --- a/helpers.php +++ b/helpers.php @@ -138,7 +138,7 @@ if (! function_exists('normalize_url')) { $url['query'] = ''; sort($queries); foreach ($queries as $query) { - //lets drop query params we don’t want + // lets drop query params we don’t want $key = stristr($query, '=', true); if (queryKeyIsBanned($key) === false) { $url['query'] .= "{$query}&"; @@ -197,7 +197,7 @@ if (! function_exists('prettyPrintJson')) { case '{': case '[': $level++; - //no break + // no break case ',': $ends_line_level = $level; break; diff --git a/public/index.php b/public/index.php index 1d69f3a2..ee8f07e9 100644 --- a/public/index.php +++ b/public/index.php @@ -1,55 +1,20 @@ make(Kernel::class); - -$response = $kernel->handle( - $request = Request::capture() -)->send(); - -$kernel->terminate($request, $response); +$app->handleRequest(Request::capture()); diff --git a/routes/web.php b/routes/web.php index 7b4030c8..5c8e989d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -64,7 +64,7 @@ Route::domain(config('url.longurl'))->group(function () { Route::middleware(MyAuthMiddleware::class)->prefix('admin')->group(function () { Route::get('/', [HomeController::class, 'welcome']); - //Articles + // Articles Route::prefix('blog')->group(function () { Route::get('/', [AdminArticlesController::class, 'index']); Route::get('/create', [AdminArticlesController::class, 'create']); diff --git a/tests/Browser/ExampleTest.php b/tests/Browser/ExampleTest.php index 1716a41e..37e2a581 100644 --- a/tests/Browser/ExampleTest.php +++ b/tests/Browser/ExampleTest.php @@ -12,7 +12,7 @@ class ExampleTest extends DuskTestCase * * @return void */ - public function testBasicExample() + public function test_basic_example() { $this->browse(function (Browser $browser) { $browser->visit('/') diff --git a/tests/Feature/Admin/AdminHomeControllerTest.php b/tests/Feature/Admin/AdminHomeControllerTest.php index b74b8b25..0fd92cc0 100644 --- a/tests/Feature/Admin/AdminHomeControllerTest.php +++ b/tests/Feature/Admin/AdminHomeControllerTest.php @@ -6,13 +6,14 @@ namespace Tests\Feature\Admin; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class AdminHomeControllerTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function adminHomepageLoads(): void { $user = User::factory()->make(); diff --git a/tests/Feature/Admin/AdminTest.php b/tests/Feature/Admin/AdminTest.php index d69d59a4..753ee054 100644 --- a/tests/Feature/Admin/AdminTest.php +++ b/tests/Feature/Admin/AdminTest.php @@ -5,25 +5,26 @@ declare(strict_types=1); namespace Tests\Feature\Admin; use App\Models\User; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class AdminTest extends TestCase { - /** @test */ + #[Test] public function adminPageRedirectsUnauthorisedUsersToLoginPage(): void { $response = $this->get('/admin'); $response->assertRedirect('/login'); } - /** @test */ + #[Test] public function loginPageLoads(): void { $response = $this->get('/login'); $response->assertViewIs('login'); } - /** @test */ + #[Test] public function loginAttemptWithBadCredentialsFails(): void { $response = $this->post('/login', [ @@ -33,7 +34,7 @@ class AdminTest extends TestCase $response->assertRedirect('/login'); } - /** @test */ + #[Test] public function loginSucceeds(): void { User::factory([ @@ -49,7 +50,7 @@ class AdminTest extends TestCase $response->assertRedirect('/admin'); } - /** @test */ + #[Test] public function whenLoggedInRedirectsToAdminPage(): void { $user = User::factory()->create(); @@ -57,14 +58,14 @@ class AdminTest extends TestCase $response->assertRedirect('/'); } - /** @test */ + #[Test] public function loggedOutUsersSimplyRedirected(): void { $response = $this->get('/logout'); $response->assertRedirect('/'); } - /** @test */ + #[Test] public function loggedInUsersShownLogoutForm(): void { $user = User::factory()->create(); @@ -72,7 +73,7 @@ class AdminTest extends TestCase $response->assertViewIs('logout'); } - /** @test */ + #[Test] public function loggedInUsersCanLogout(): void { $user = User::factory()->create(); diff --git a/tests/Feature/Admin/ArticlesTest.php b/tests/Feature/Admin/ArticlesTest.php index 0139d699..507ed072 100644 --- a/tests/Feature/Admin/ArticlesTest.php +++ b/tests/Feature/Admin/ArticlesTest.php @@ -9,13 +9,14 @@ use App\Models\User; use Faker\Factory; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Http\UploadedFile; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class ArticlesTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function adminArticlesPageLoads(): void { $user = User::factory()->make(); @@ -25,7 +26,7 @@ class ArticlesTest extends TestCase $response->assertSeeText('Select article to edit:'); } - /** @test */ + #[Test] public function adminCanLoadFormToCreateArticle(): void { $user = User::factory()->make(); @@ -35,7 +36,7 @@ class ArticlesTest extends TestCase $response->assertSeeText('Title (URL)'); } - /** @test */ + #[Test] public function admiNCanCreateNewArticle(): void { $user = User::factory()->make(); @@ -48,7 +49,7 @@ class ArticlesTest extends TestCase $this->assertDatabaseHas('articles', ['title' => 'Test Title']); } - /** @test */ + #[Test] public function adminCanCreateNewArticleWithFile(): void { $user = User::factory()->make(); @@ -73,7 +74,7 @@ class ArticlesTest extends TestCase ]); } - /** @test */ + #[Test] public function articleCanLoadFormToEditArticle(): void { $user = User::factory()->make(); @@ -86,7 +87,7 @@ class ArticlesTest extends TestCase $response->assertSeeText('This is *my* new blog. It uses `Markdown`.'); } - /** @test */ + #[Test] public function adminCanEditArticle(): void { $user = User::factory()->make(); @@ -104,7 +105,7 @@ class ArticlesTest extends TestCase ]); } - /** @test */ + #[Test] public function adminCanDeleteArticle(): void { $user = User::factory()->make(); diff --git a/tests/Feature/Admin/BioTest.php b/tests/Feature/Admin/BioTest.php index 7f1328ea..6453b037 100644 --- a/tests/Feature/Admin/BioTest.php +++ b/tests/Feature/Admin/BioTest.php @@ -7,13 +7,14 @@ namespace Tests\Feature\Admin; use App\Models\Bio; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class BioTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function adminBiosPageLoads(): void { $user = User::factory()->make(); @@ -23,7 +24,7 @@ class BioTest extends TestCase $response->assertSeeText('Edit bio'); } - /** @test */ + #[Test] public function adminCanCreateBio(): void { $user = User::factory()->make(); @@ -36,7 +37,7 @@ class BioTest extends TestCase $this->assertDatabaseHas('bios', ['content' => 'Bio content']); } - /** @test */ + #[Test] public function adminCanLoadExistingBio(): void { $user = User::factory()->make(); @@ -49,7 +50,7 @@ class BioTest extends TestCase $response->assertSeeText('This is my bio. It uses HTML.'); } - /** @test */ + #[Test] public function adminCanEditBio(): void { $user = User::factory()->make(); diff --git a/tests/Feature/Admin/ClientsTest.php b/tests/Feature/Admin/ClientsTest.php index 463f336a..4afe4a54 100644 --- a/tests/Feature/Admin/ClientsTest.php +++ b/tests/Feature/Admin/ClientsTest.php @@ -7,13 +7,14 @@ namespace Tests\Feature\Admin; use App\Models\MicropubClient; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class ClientsTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function clientsPageLoads(): void { $user = User::factory()->make(); @@ -23,7 +24,7 @@ class ClientsTest extends TestCase $response->assertSeeText('Clients'); } - /** @test */ + #[Test] public function adminCanLoadFormToCreateClient(): void { $user = User::factory()->make(); @@ -33,7 +34,7 @@ class ClientsTest extends TestCase $response->assertSeeText('New Client'); } - /** @test */ + #[Test] public function adminCanCreateNewClient(): void { $user = User::factory()->make(); @@ -49,7 +50,7 @@ class ClientsTest extends TestCase ]); } - /** @test */ + #[Test] public function adminCanLoadEditFormForClient(): void { $user = User::factory()->make(); @@ -62,7 +63,7 @@ class ClientsTest extends TestCase $response->assertSee('https://jbl5.dev/notes/new'); } - /** @test */ + #[Test] public function adminCanEditClient(): void { $user = User::factory()->make(); @@ -80,7 +81,7 @@ class ClientsTest extends TestCase ]); } - /** @test */ + #[Test] public function adminCanDeleteClient(): void { $user = User::factory()->make(); diff --git a/tests/Feature/Admin/ContactsTest.php b/tests/Feature/Admin/ContactsTest.php index 5d5f42bf..4b8f632f 100644 --- a/tests/Feature/Admin/ContactsTest.php +++ b/tests/Feature/Admin/ContactsTest.php @@ -12,6 +12,7 @@ use GuzzleHttp\HandlerStack; use GuzzleHttp\Psr7\Response; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Http\UploadedFile; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class ContactsTest extends TestCase @@ -27,7 +28,7 @@ class ContactsTest extends TestCase parent::tearDown(); } - /** @test */ + #[Test] public function contactIndexPageLoads(): void { $user = User::factory()->make(); @@ -36,7 +37,7 @@ class ContactsTest extends TestCase $response->assertViewIs('admin.contacts.index'); } - /** @test */ + #[Test] public function contactCreatePageLoads(): void { $user = User::factory()->make(); @@ -45,7 +46,7 @@ class ContactsTest extends TestCase $response->assertViewIs('admin.contacts.create'); } - /** @test */ + #[Test] public function adminCanCreateNewContact(): void { $user = User::factory()->make(); @@ -62,7 +63,7 @@ class ContactsTest extends TestCase ]); } - /** @test */ + #[Test] public function adminCanSeeFormToEditContact(): void { $user = User::factory()->make(); @@ -72,7 +73,7 @@ class ContactsTest extends TestCase $response->assertViewIs('admin.contacts.edit'); } - /** @test */ + #[Test] public function adminCanUpdateContact(): void { $user = User::factory()->make(); @@ -91,7 +92,7 @@ class ContactsTest extends TestCase ]); } - /** @test */ + #[Test] public function adminCanEditContactAndUploadAvatar(): void { copy(__DIR__ . '/../../aaron.png', sys_get_temp_dir() . '/tantek.png'); @@ -114,7 +115,7 @@ class ContactsTest extends TestCase ); } - /** @test */ + #[Test] public function adminCanDeleteContact(): void { $user = User::factory()->make(); @@ -132,7 +133,7 @@ class ContactsTest extends TestCase ]); } - /** @test */ + #[Test] public function adminCanTriggerRetrievalOfRemoteAvatar(): void { $html = <<<'HTML' @@ -161,7 +162,7 @@ class ContactsTest extends TestCase ); } - /** @test */ + #[Test] public function gettingRemoteAvatarFailsGracefullyWithRemoteNotFound(): void { $mock = new MockHandler([ @@ -178,7 +179,7 @@ class ContactsTest extends TestCase $response->assertRedirect('/admin/contacts/' . $contact->id . '/edit'); } - /** @test */ + #[Test] public function gettingRemoteAvatarFailsGracefullyWithRemoteError(): void { $html = <<<'HTML' @@ -201,7 +202,7 @@ class ContactsTest extends TestCase $response->assertRedirect('/admin/contacts/' . $contact->id . '/edit'); } - /** @test */ + #[Test] public function gettingRemoteAvatarFailsGracefullyForContactWithNoHompage(): void { $contact = Contact::create([ diff --git a/tests/Feature/Admin/LikesTest.php b/tests/Feature/Admin/LikesTest.php index b5560c14..151f7b73 100644 --- a/tests/Feature/Admin/LikesTest.php +++ b/tests/Feature/Admin/LikesTest.php @@ -9,13 +9,14 @@ use App\Models\Like; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Queue; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class LikesTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function likesPageLoads(): void { $user = User::factory()->make(); @@ -25,7 +26,7 @@ class LikesTest extends TestCase $response->assertSeeText('Likes'); } - /** @test */ + #[Test] public function likeCreateFormLoads(): void { $user = User::factory()->make(); @@ -35,7 +36,7 @@ class LikesTest extends TestCase $response->assertSeeText('New Like'); } - /** @test */ + #[Test] public function adminCanCreateLike(): void { Queue::fake(); @@ -51,7 +52,7 @@ class LikesTest extends TestCase Queue::assertPushed(ProcessLike::class); } - /** @test */ + #[Test] public function likeEditFormLoads(): void { $user = User::factory()->make(); @@ -62,7 +63,7 @@ class LikesTest extends TestCase $response->assertSee('Edit Like'); } - /** @test */ + #[Test] public function adminCanEditLike(): void { Queue::fake(); @@ -80,7 +81,7 @@ class LikesTest extends TestCase Queue::assertPushed(ProcessLike::class); } - /** @test */ + #[Test] public function adminCanDeleteLike(): void { $like = Like::factory()->create(); diff --git a/tests/Feature/Admin/NotesTest.php b/tests/Feature/Admin/NotesTest.php index ac60004b..ccd3a867 100644 --- a/tests/Feature/Admin/NotesTest.php +++ b/tests/Feature/Admin/NotesTest.php @@ -9,13 +9,14 @@ use App\Models\Note; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Queue; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class NotesTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function notesPageLoads(): void { $user = User::factory()->make(); @@ -24,7 +25,7 @@ class NotesTest extends TestCase $response->assertViewIs('admin.notes.index'); } - /** @test */ + #[Test] public function noteCreatePageLoads(): void { $user = User::factory()->make(); @@ -33,7 +34,7 @@ class NotesTest extends TestCase $response->assertViewIs('admin.notes.create'); } - /** @test */ + #[Test] public function adminCanCreateNewNote(): void { $user = User::factory()->make(); @@ -47,7 +48,7 @@ class NotesTest extends TestCase ]); } - /** @test */ + #[Test] public function noteEditFormLoads(): void { $user = User::factory()->make(); @@ -57,7 +58,7 @@ class NotesTest extends TestCase $response->assertViewIs('admin.notes.edit'); } - /** @test */ + #[Test] public function adminCanEditNote(): void { Queue::fake(); @@ -76,7 +77,7 @@ class NotesTest extends TestCase Queue::assertPushed(SendWebMentions::class); } - /** @test */ + #[Test] public function adminCanDeleteNote(): void { $user = User::factory()->make(); diff --git a/tests/Feature/Admin/PlacesTest.php b/tests/Feature/Admin/PlacesTest.php index 0de5b928..1f711e8e 100644 --- a/tests/Feature/Admin/PlacesTest.php +++ b/tests/Feature/Admin/PlacesTest.php @@ -7,13 +7,14 @@ namespace Tests\Feature\Admin; use App\Models\Place; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class PlacesTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function placesPageLoads(): void { $user = User::factory()->make(); @@ -22,7 +23,7 @@ class PlacesTest extends TestCase $response->assertViewIs('admin.places.index'); } - /** @test */ + #[Test] public function createPlacePageLoads(): void { $user = User::factory()->make(); @@ -31,7 +32,7 @@ class PlacesTest extends TestCase $response->assertViewIs('admin.places.create'); } - /** @test */ + #[Test] public function adminCanCreateNewPlace(): void { $user = User::factory()->make(); @@ -48,7 +49,7 @@ class PlacesTest extends TestCase ]); } - /** @test */ + #[Test] public function editPlacePageLoads(): void { $user = User::factory()->make(); @@ -58,7 +59,7 @@ class PlacesTest extends TestCase $response->assertViewIs('admin.places.edit'); } - /** @test */ + #[Test] public function adminCanUpdatePlace(): void { $user = User::factory()->make(); diff --git a/tests/Feature/ArticlesTest.php b/tests/Feature/ArticlesTest.php index d268fc4d..8e544009 100644 --- a/tests/Feature/ArticlesTest.php +++ b/tests/Feature/ArticlesTest.php @@ -7,20 +7,21 @@ namespace Tests\Feature; use App\Models\Article; use Illuminate\Foundation\Testing\RefreshDatabase; use Jonnybarnes\IndieWeb\Numbers; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class ArticlesTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function articlesPageLoads(): void { $response = $this->get('/blog'); $response->assertViewIs('articles.index'); } - /** @test */ + #[Test] public function singleArticlePageLoads() { $article = Article::factory()->create(); @@ -28,7 +29,7 @@ class ArticlesTest extends TestCase $response->assertViewIs('articles.show'); } - /** @test */ + #[Test] public function wrongDateInUrlRedirectsToCorrectDate() { $article = Article::factory()->create(); @@ -36,7 +37,7 @@ class ArticlesTest extends TestCase $response->assertRedirect('/blog/' . date('Y') . '/' . date('m') . '/' . $article->titleurl); } - /** @test */ + #[Test] public function oldUrlsWithIdAreRedirected() { $article = Article::factory()->create(); @@ -45,21 +46,21 @@ class ArticlesTest extends TestCase $response->assertRedirect($article->link); } - /** @test */ + #[Test] public function unknownSlugGetsNotFoundResponse() { $response = $this->get('/blog/' . date('Y') . '/' . date('m') . '/unknown-slug'); $response->assertNotFound(); } - /** @test */ + #[Test] public function unknownArticleIdGetsNotFoundResponse() { $response = $this->get('/blog/s/22'); $response->assertNotFound(); } - /** @test */ + #[Test] public function someUrlsDoNotParseCorrectly(): void { $response = $this->get('/blog/feed.js'); diff --git a/tests/Feature/BookmarksTest.php b/tests/Feature/BookmarksTest.php index a00b8c37..73948237 100644 --- a/tests/Feature/BookmarksTest.php +++ b/tests/Feature/BookmarksTest.php @@ -8,6 +8,7 @@ use App\Jobs\ProcessBookmark; use App\Models\Bookmark; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Queue; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; use Tests\TestToken; @@ -15,14 +16,14 @@ class BookmarksTest extends TestCase { use RefreshDatabase, TestToken; - /** @test */ + #[Test] public function bookmarksPageLoadsWithoutError(): void { $response = $this->get('/bookmarks'); $response->assertViewIs('bookmarks.index'); } - /** @test */ + #[Test] public function singleBookmarkPageLoadsWithoutError(): void { $bookmark = Bookmark::factory()->create(); @@ -30,7 +31,7 @@ class BookmarksTest extends TestCase $response->assertViewIs('bookmarks.show'); } - /** @test */ + #[Test] public function whenBookmarkIsAddedUsingHttpSyntaxCheckJobToTakeScreenshotIsInvoked(): void { Queue::fake(); @@ -48,7 +49,7 @@ class BookmarksTest extends TestCase $this->assertDatabaseHas('bookmarks', ['url' => 'https://example.org/blog-post']); } - /** @test */ + #[Test] public function whenBookmarkIsAddedUsingJsonSyntaxCheckJobToTakeScreenshotIsInvoked(): void { Queue::fake(); @@ -68,7 +69,7 @@ class BookmarksTest extends TestCase $this->assertDatabaseHas('bookmarks', ['url' => 'https://example.org/blog-post']); } - /** @test */ + #[Test] public function whenTheBookmarkIsCreatedCheckNecessaryTagsAreAlsoCreated(): void { Queue::fake(); diff --git a/tests/Feature/ContactsTest.php b/tests/Feature/ContactsTest.php index 211af20b..a773e45f 100644 --- a/tests/Feature/ContactsTest.php +++ b/tests/Feature/ContactsTest.php @@ -6,6 +6,7 @@ namespace Tests\Feature; use App\Models\Contact; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class ContactsTest extends TestCase @@ -14,9 +15,8 @@ class ContactsTest extends TestCase /** * Check the `/contacts` page gives a good response. - * - * @test */ + #[Test] public function contactsPageLoadsWithoutError(): void { $response = $this->get('/contacts'); @@ -25,9 +25,8 @@ class ContactsTest extends TestCase /** * Test an individual contact page with default profile image. - * - * @test */ + #[Test] public function contactPageShouldFallbackToDefaultProfilePic(): void { Contact::factory()->create([ @@ -39,9 +38,8 @@ class ContactsTest extends TestCase /** * Test an individual contact page with a specific profile image. - * - * @test */ + #[Test] public function contactPageShouldUseSpecificProfilePicIfPresent(): void { Contact::factory()->create([ @@ -52,7 +50,7 @@ class ContactsTest extends TestCase $response->assertViewHas('image', '/assets/profile-images/aaronparecki.com/image'); } - /** @test */ + #[Test] public function unknownContactReturnsNotFoundResponse(): void { $response = $this->get('/contacts/unknown'); diff --git a/tests/Feature/CorsHeadersTest.php b/tests/Feature/CorsHeadersTest.php index 7a5fdf05..07af166e 100644 --- a/tests/Feature/CorsHeadersTest.php +++ b/tests/Feature/CorsHeadersTest.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Tests\Feature; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; use Tests\TestToken; @@ -11,7 +12,7 @@ class CorsHeadersTest extends TestCase { use TestToken; - /** @test */ + #[Test] public function checkCorsHeadersOnMediaEndpoint(): void { $response = $this->call( @@ -25,7 +26,7 @@ class CorsHeadersTest extends TestCase $response->assertHeader('Access-Control-Allow-Origin', '*'); } - /** @test */ + #[Test] public function checkForNoCorsHeaderOnNonMediaEndpointLinks(): void { $response = $this->get('/blog'); diff --git a/tests/Feature/FeedsTest.php b/tests/Feature/FeedsTest.php index 481218b7..a0704b90 100644 --- a/tests/Feature/FeedsTest.php +++ b/tests/Feature/FeedsTest.php @@ -8,6 +8,7 @@ use App\Models\Article; use App\Models\Note; use App\Models\Place; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class FeedsTest extends TestCase @@ -16,9 +17,8 @@ class FeedsTest extends TestCase /** * Test the blog RSS feed. - * - * @test */ + #[Test] public function blogRssFeedIsPresent(): void { Article::factory()->count(3)->create(); @@ -29,9 +29,8 @@ class FeedsTest extends TestCase /** * Test the notes RSS feed. - * - * @test */ + #[Test] public function notesRssFeedIsPresent(): void { Note::factory()->count(3)->create(); @@ -42,9 +41,8 @@ class FeedsTest extends TestCase /** * Test the blog RSS feed. - * - * @test */ + #[Test] public function blogAtomFeedIsPresent(): void { Article::factory()->count(3)->create(); @@ -53,7 +51,7 @@ class FeedsTest extends TestCase $response->assertOk(); } - /** @test */ + #[Test] public function blogJf2FeedIsPresent(): void { Article::factory()->count(3)->create(); @@ -77,9 +75,8 @@ class FeedsTest extends TestCase /** * Test the notes RSS feed. - * - * @test */ + #[Test] public function notesAtomFeedIsPresent(): void { Note::factory()->count(3)->create(); @@ -90,9 +87,8 @@ class FeedsTest extends TestCase /** * Test the blog JSON feed. - * - * @test */ + #[Test] public function blogJsonFeedIsPresent(): void { Article::factory()->count(3)->create(); @@ -103,9 +99,8 @@ class FeedsTest extends TestCase /** * Test the notes JSON feed. - * - * @test */ + #[Test] public function notesJsonFeedIsPresent(): void { Note::factory()->count(3)->create(); @@ -114,7 +109,7 @@ class FeedsTest extends TestCase $response->assertOk(); } - /** @test */ + #[Test] public function notesJf2FeedIsPresent(): void { Note::factory()->count(3)->create(); @@ -139,9 +134,8 @@ class FeedsTest extends TestCase /** * Each JSON feed item must have one of `content_text` or `content_html`, * and whichever one they have can’t be `null`. - * - * @test */ + #[Test] public function jsonFeedsHaveRequiredAttributes(): void { Note::factory()->count(3)->create(); @@ -161,7 +155,7 @@ class FeedsTest extends TestCase } } - /** @test */ + #[Test] public function jsonNoteFeedLoadsPlaceDataWithoutLazyLoading(): void { $place = Place::factory()->create(); diff --git a/tests/Feature/FrontPageTest.php b/tests/Feature/FrontPageTest.php index 6f24a851..b78191bf 100644 --- a/tests/Feature/FrontPageTest.php +++ b/tests/Feature/FrontPageTest.php @@ -7,13 +7,14 @@ use App\Models\Bookmark; use App\Models\Like; use App\Models\Note; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class FrontPageTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function frontPageLoadsAllContent(): void { Note::factory()->create(['note' => 'Note 1']); diff --git a/tests/Feature/HorizonTest.php b/tests/Feature/HorizonTest.php index e1f5124f..f4566e2f 100644 --- a/tests/Feature/HorizonTest.php +++ b/tests/Feature/HorizonTest.php @@ -3,15 +3,15 @@ namespace Tests\Feature; use App\Models\User; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class HorizonTest extends TestCase { /** * Horizon has its own test suite, here we just test it has been installed successfully. - * - * @test */ + #[Test] public function horizonIsInstalled(): void { $user = User::factory()->create([ diff --git a/tests/Feature/IndieAuthTest.php b/tests/Feature/IndieAuthTest.php index 20c388b7..78ba8130 100644 --- a/tests/Feature/IndieAuthTest.php +++ b/tests/Feature/IndieAuthTest.php @@ -31,8 +31,8 @@ class IndieAuthTest extends TestCase 'authorization_endpoint' => route('indieauth.start'), 'token_endpoint' => route('indieauth.token'), 'code_challenge_methods_supported' => ['S256'], - //'introspection_endpoint' => 'introspection_endpoint', - //'introspection_endpoint_auth_methods_supported' => ['none'], + // 'introspection_endpoint' => 'introspection_endpoint', + // 'introspection_endpoint_auth_methods_supported' => ['none'], ]); } diff --git a/tests/Feature/LikesTest.php b/tests/Feature/LikesTest.php index 45c24e63..3f13724a 100644 --- a/tests/Feature/LikesTest.php +++ b/tests/Feature/LikesTest.php @@ -14,6 +14,7 @@ use GuzzleHttp\Psr7\Response; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Queue; use Jonnybarnes\WebmentionsParser\Authorship; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; use Tests\TestToken; @@ -22,14 +23,14 @@ class LikesTest extends TestCase use RefreshDatabase; use TestToken; - /** @test */ + #[Test] public function likesPageHasCorrectView(): void { $response = $this->get('/likes'); $response->assertViewIs('likes.index'); } - /** @test */ + #[Test] public function singleLikePageHasCorrectView(): void { $like = Like::factory()->create(); @@ -37,7 +38,7 @@ class LikesTest extends TestCase $response->assertViewIs('likes.show'); } - /** @test */ + #[Test] public function checkLikeCreatedFromMicropubApiRequests(): void { Queue::fake(); @@ -57,7 +58,7 @@ class LikesTest extends TestCase $this->assertDatabaseHas('likes', ['url' => 'https://example.org/blog-post']); } - /** @test */ + #[Test] public function checkLikeCreatedFromMicropubWebRequests(): void { Queue::fake(); @@ -75,7 +76,7 @@ class LikesTest extends TestCase $this->assertDatabaseHas('likes', ['url' => 'https://example.org/blog-post']); } - /** @test */ + #[Test] public function likeWithSimpleAuthor(): void { $like = new Like; @@ -114,7 +115,7 @@ class LikesTest extends TestCase $this->assertEquals('Fred Bloggs', Like::find($id)->author_name); } - /** @test */ + #[Test] public function likeWithHCard(): void { $like = new Like; @@ -157,7 +158,7 @@ class LikesTest extends TestCase $this->assertEquals('Fred Bloggs', Like::find($id)->author_name); } - /** @test */ + #[Test] public function likeWithoutMicroformats(): void { $like = new Like; @@ -193,7 +194,7 @@ class LikesTest extends TestCase $this->assertNull(Like::find($id)->author_name); } - /** @test */ + #[Test] public function likeThatIsATweet(): void { $like = new Like; @@ -219,10 +220,9 @@ class LikesTest extends TestCase 'author_url' => 'https://twitter.com/jonnybarnes', 'html' => '
Some markdown
' . PHP_EOL, $article->html); } - /** @test */ + #[Test] public function weGenerateTheDifferentTimeAttributes(): void { $article = Article::create([ @@ -47,7 +48,7 @@ class ArticlesTest extends TestCase $this->assertEquals($article->pubdate, $article->updated_at->toRSSString()); } - /** @test */ + #[Test] public function weGenerateTheArticleLinkFromTheSlug(): void { $article = Article::create([ @@ -62,7 +63,7 @@ class ArticlesTest extends TestCase ); } - /** @test */ + #[Test] public function dateScopeReturnsExpectedArticles(): void { Article::factory()->create([ @@ -81,7 +82,7 @@ class ArticlesTest extends TestCase $this->assertCount(2, $emptyScope); } - /** @test */ + #[Test] public function dateScopeReturnsExpectedArticlesForDecember(): void { Article::factory()->create([ diff --git a/tests/Unit/BookmarksTest.php b/tests/Unit/BookmarksTest.php index 3a4aabd7..0f30267b 100644 --- a/tests/Unit/BookmarksTest.php +++ b/tests/Unit/BookmarksTest.php @@ -10,14 +10,15 @@ use GuzzleHttp\Client; use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\HandlerStack; use GuzzleHttp\Psr7\Response; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class BookmarksTest extends TestCase { - /** - * @test + /* + * @\test * - * @group puppeteer + * @\group puppeteer * public function takeScreenshotOfDuckDuckGo() { @@ -25,7 +26,7 @@ class BookmarksTest extends TestCase $this->assertTrue(file_exists(public_path() . '/assets/img/bookmarks/' . $uuid . '.png')); }*/ - /** @test */ + #[Test] public function archiveLinkMethodCallsArchiveService(): void { $mock = new MockHandler([ @@ -38,7 +39,7 @@ class BookmarksTest extends TestCase $this->assertEquals('/web/1234/example.org', $url); } - /** @test */ + #[Test] public function archiveLinkMethodThrowsAnExceptionOnError(): void { $this->expectException(InternetArchiveException::class); @@ -52,7 +53,7 @@ class BookmarksTest extends TestCase (new BookmarkService)->getArchiveLink('https://example.org'); } - /** @test */ + #[Test] public function archiveLinkMethodThrowsAnExceptionIfNoLocationReturned(): void { $this->expectException(InternetArchiveException::class); diff --git a/tests/Unit/HelpersTest.php b/tests/Unit/HelpersTest.php index 9c3af608..601296ff 100644 --- a/tests/Unit/HelpersTest.php +++ b/tests/Unit/HelpersTest.php @@ -4,28 +4,27 @@ declare(strict_types=1); namespace Tests\Unit; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class HelpersTest extends TestCase { - /** @test */ + #[Test] public function normalizeUrlIsIdempotent(): void { $input = 'http://example.org:80/index.php?foo=bar&baz=1'; $this->assertEquals(normalize_url(normalize_url($input)), normalize_url($input)); } - /** - * @test - * - * @dataProvider urlProvider - */ + #[Test] + #[DataProvider('urlProvider')] public function normalizeUrlOnDataProvider(string $input, string $output): void { $this->assertEquals($output, normalize_url($input)); } - /** @test */ + #[Test] public function prettyPrintJson(): void { // phpcs:disable Generic.Files.LineLength.TooLong diff --git a/tests/Unit/Jobs/AddClientToDatabaseJobTest.php b/tests/Unit/Jobs/AddClientToDatabaseJobTest.php index fb8cd504..af07901b 100644 --- a/tests/Unit/Jobs/AddClientToDatabaseJobTest.php +++ b/tests/Unit/Jobs/AddClientToDatabaseJobTest.php @@ -6,13 +6,14 @@ namespace Tests\Unit\Jobs; use App\Jobs\AddClientToDatabase; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class AddClientToDatabaseJobTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function clientIsAddedToDatabaseByJob(): void { $job = new AddClientToDatabase('https://example.org/client'); diff --git a/tests/Unit/Jobs/DownloadWebMentionJobTest.php b/tests/Unit/Jobs/DownloadWebMentionJobTest.php index 03e15a82..6e11a49c 100644 --- a/tests/Unit/Jobs/DownloadWebMentionJobTest.php +++ b/tests/Unit/Jobs/DownloadWebMentionJobTest.php @@ -10,6 +10,7 @@ use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\HandlerStack; use GuzzleHttp\Psr7\Response; use Illuminate\FileSystem\FileSystem; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class DownloadWebMentionJobTest extends TestCase @@ -23,7 +24,7 @@ class DownloadWebMentionJobTest extends TestCase parent::tearDown(); } - /** @test */ + #[Test] public function htmlIsSavedByJob(): void { $this->assertFileDoesNotExist(storage_path('HTML/https')); @@ -51,7 +52,7 @@ class DownloadWebMentionJobTest extends TestCase $this->assertFileDoesNotExist(storage_path('HTML/https/example.org/reply') . '/1.' . date('Y-m-d') . '.backup'); } - /** @test */ + #[Test] public function htmlAndBackupSavedByJob(): void { $this->assertFileDoesNotExist(storage_path('HTML/https')); @@ -86,7 +87,7 @@ class DownloadWebMentionJobTest extends TestCase $this->assertFileExists(storage_path('HTML/https/example.org/reply') . '/1.' . date('Y-m-d') . '.backup'); } - /** @test */ + #[Test] public function indexHtmlFileIsSavedByJobForUrlsEndingWithSlash(): void { $this->assertFileDoesNotExist(storage_path('HTML/https')); diff --git a/tests/Unit/Jobs/ProcessBookmarkJobTest.php b/tests/Unit/Jobs/ProcessBookmarkJobTest.php index 4078712e..f433270b 100644 --- a/tests/Unit/Jobs/ProcessBookmarkJobTest.php +++ b/tests/Unit/Jobs/ProcessBookmarkJobTest.php @@ -11,13 +11,14 @@ use App\Models\Bookmark; use App\Services\BookmarkService; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Queue; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class ProcessBookmarkJobTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function archiveLinkIsSavedByJobAndScreenshotJobIsQueued(): void { Queue::fake(); @@ -38,7 +39,7 @@ class ProcessBookmarkJobTest extends TestCase Queue::assertPushed(SaveScreenshot::class); } - /** @test */ + #[Test] public function archiveLinkSavedAsNullWhenExceptionThrown(): void { Queue::fake(); diff --git a/tests/Unit/Jobs/ProcessMediaJobTest.php b/tests/Unit/Jobs/ProcessMediaJobTest.php index ae870d18..daecc00e 100644 --- a/tests/Unit/Jobs/ProcessMediaJobTest.php +++ b/tests/Unit/Jobs/ProcessMediaJobTest.php @@ -7,11 +7,12 @@ namespace Tests\Unit\Jobs; use App\Jobs\ProcessMedia; use Illuminate\Support\Facades\Storage; use Intervention\Image\ImageManager; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class ProcessMediaJobTest extends TestCase { - /** @test */ + #[Test] public function nonMediaFilesAreNotSaved(): void { $manager = app()->make(ImageManager::class); @@ -22,7 +23,7 @@ class ProcessMediaJobTest extends TestCase $this->assertFileDoesNotExist(storage_path('app/media/') . 'file.txt'); } - /** @test */ + #[Test] public function smallImagesAreNotResized(): void { $manager = app()->make(ImageManager::class); @@ -37,7 +38,7 @@ class ProcessMediaJobTest extends TestCase Storage::disk('local')->delete('public/media'); } - /** @test */ + #[Test] public function largeImagesHaveSmallerImagesCreated(): void { $manager = app()->make(ImageManager::class); @@ -45,16 +46,17 @@ class ProcessMediaJobTest extends TestCase $job = new ProcessMedia('test-image.jpg'); $job->handle($manager); - Storage::disk('local')->assertExists('public/media/test-image.jpg'); - Storage::disk('local')->assertExists('public/media/test-image-small.jpg'); - Storage::disk('local')->assertExists('public/media/test-image-medium.jpg'); + // These need to look in public disk + Storage::disk('public')->assertExists('media/test-image.jpg'); + Storage::disk('public')->assertExists('media/test-image-small.jpg'); + Storage::disk('public')->assertExists('media/test-image-medium.jpg'); $this->assertFileDoesNotExist(storage_path('app/media/') . 'test-image.jpg'); // Tidy up files created by the job - Storage::disk('local')->delete('public/media/test-image.jpg'); - Storage::disk('local')->delete('public/media/test-image-small.jpg'); - Storage::disk('local')->delete('public/media/test-image-medium.jpg'); + Storage::disk('public')->delete('media/test-image.jpg'); + Storage::disk('public')->delete('media/test-image-small.jpg'); + Storage::disk('public')->delete('media/test-image-medium.jpg'); $this->removeDirIfEmpty(storage_path('app/public/media')); $this->removeDirIfEmpty(storage_path('app/media')); } diff --git a/tests/Unit/Jobs/ProcessWebMentionJobTest.php b/tests/Unit/Jobs/ProcessWebMentionJobTest.php index e9b24bde..1bf56621 100644 --- a/tests/Unit/Jobs/ProcessWebMentionJobTest.php +++ b/tests/Unit/Jobs/ProcessWebMentionJobTest.php @@ -17,6 +17,7 @@ use Illuminate\FileSystem\FileSystem; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Queue; use Jonnybarnes\WebmentionsParser\Parser; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class ProcessWebMentionJobTest extends TestCase @@ -32,7 +33,7 @@ class ProcessWebMentionJobTest extends TestCase parent::tearDown(); } - /** @test */ + #[Test] public function failureGettingWebmentionThrowsAnException(): void { $this->expectException(RemoteContentNotFoundException::class); @@ -51,7 +52,7 @@ class ProcessWebMentionJobTest extends TestCase $job->handle($parser, $client); } - /** @test */ + #[Test] public function newWebmentionGetsSavedByJob(): void { Queue::fake(); @@ -83,7 +84,7 @@ class ProcessWebMentionJobTest extends TestCase ]); } - /** @test */ + #[Test] public function existingWebmentionGetsUpdatedByJob(): void { Queue::fake(); @@ -120,7 +121,7 @@ class ProcessWebMentionJobTest extends TestCase ]); } - /** @test */ + #[Test] public function webmentionReplyGetsDeletedWhenReplyToValueChanges(): void { $parser = new Parser; @@ -157,7 +158,7 @@ class ProcessWebMentionJobTest extends TestCase ]); } - /** @test */ + #[Test] public function webmentionLikeGetsDeletedWhenLikeOfValueChanges(): void { $parser = new Parser; @@ -194,7 +195,7 @@ class ProcessWebMentionJobTest extends TestCase ]); } - /** @test */ + #[Test] public function webmentionRepostGetsDeletedWhenRepostOfValueChanges(): void { $parser = new Parser; diff --git a/tests/Unit/Jobs/SaveProfileImageJobTest.php b/tests/Unit/Jobs/SaveProfileImageJobTest.php index 83f476e1..3c418a7a 100644 --- a/tests/Unit/Jobs/SaveProfileImageJobTest.php +++ b/tests/Unit/Jobs/SaveProfileImageJobTest.php @@ -11,6 +11,7 @@ use GuzzleHttp\HandlerStack; use GuzzleHttp\Psr7\Response; use Jonnybarnes\WebmentionsParser\Authorship; use Jonnybarnes\WebmentionsParser\Exceptions\AuthorshipParserException; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class SaveProfileImageJobTest extends TestCase @@ -24,7 +25,7 @@ class SaveProfileImageJobTest extends TestCase parent::tearDown(); } - /** @test */ + #[Test] public function authorshipAlgorithmReturnsNullOnException(): void { $mf = ['items' => []]; @@ -36,7 +37,7 @@ class SaveProfileImageJobTest extends TestCase $this->assertNull($job->handle($authorship)); } - /** @test */ + #[Test] public function weDoNotProcessTwitterImages(): void { $mf = ['items' => []]; @@ -54,7 +55,7 @@ class SaveProfileImageJobTest extends TestCase $this->assertNull($job->handle($authorship)); } - /** @test */ + #[Test] public function remoteAuthorImagesAreSavedLocally(): void { $mock = new MockHandler([ @@ -79,7 +80,7 @@ class SaveProfileImageJobTest extends TestCase $this->assertFileExists(public_path() . '/assets/profile-images/example.org/image'); } - /** @test */ + #[Test] public function localDefaultAuthorImageIsUsedAsFallback(): void { $mock = new MockHandler([ @@ -107,7 +108,7 @@ class SaveProfileImageJobTest extends TestCase ); } - /** @test */ + #[Test] public function weGetUrlFromPhotoObjectIfAltTextIsProvided(): void { $mock = new MockHandler([ @@ -135,7 +136,7 @@ class SaveProfileImageJobTest extends TestCase $this->assertFileExists(public_path() . '/assets/profile-images/example.org/image'); } - /** @test */ + #[Test] public function useFirstUrlIfMultipleHomepagesAreProvided(): void { $mock = new MockHandler([ diff --git a/tests/Unit/Jobs/SaveScreenshotJobTest.php b/tests/Unit/Jobs/SaveScreenshotJobTest.php index 74f7f2e7..b2c3ef15 100644 --- a/tests/Unit/Jobs/SaveScreenshotJobTest.php +++ b/tests/Unit/Jobs/SaveScreenshotJobTest.php @@ -13,13 +13,14 @@ use GuzzleHttp\Middleware; use GuzzleHttp\Psr7\Response; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Storage; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class SaveScreenshotJobTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function screenshotIsSavedByJob(): void { Storage::fake('public'); @@ -84,7 +85,7 @@ class SaveScreenshotJobTest extends TestCase Storage::disk('public')->assertExists('/assets/img/bookmarks/' . $bookmark->screenshot . '.png'); } - /** @test */ + #[Test] public function screenshotJobHandlesUnfinishedTasks(): void { Storage::fake('public'); diff --git a/tests/Unit/Jobs/SendWebMentionJobTest.php b/tests/Unit/Jobs/SendWebMentionJobTest.php index f52686be..9eef719b 100644 --- a/tests/Unit/Jobs/SendWebMentionJobTest.php +++ b/tests/Unit/Jobs/SendWebMentionJobTest.php @@ -10,11 +10,12 @@ use GuzzleHttp\Client; use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\HandlerStack; use GuzzleHttp\Psr7\Response; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class SendWebMentionJobTest extends TestCase { - /** @test */ + #[Test] public function discoverWebmentionEndpointOnOwnDomain(): void { $note = new Note; @@ -23,7 +24,7 @@ class SendWebMentionJobTest extends TestCase $this->assertNull($job->discoverWebmentionEndpoint('/notes/tagged/test')); } - /** @test */ + #[Test] public function discoverWebmentionEndpointFromHeaderLinks(): void { $url = 'https://example.org/webmention'; @@ -38,7 +39,7 @@ class SendWebMentionJobTest extends TestCase $this->assertEquals($url, $job->discoverWebmentionEndpoint('https://example.org')); } - /** @test */ + #[Test] public function discoverWebmentionEndpointFromHtmlLinkTags(): void { $html = ''; @@ -56,7 +57,7 @@ class SendWebMentionJobTest extends TestCase ); } - /** @test */ + #[Test] public function discoverWebmentionEndpointFromLegacyHtmlMarkup(): void { $html = ''; @@ -74,14 +75,14 @@ class SendWebMentionJobTest extends TestCase ); } - /** @test */ + #[Test] public function ensureEmptyNoteDoesNotTriggerAnyActions(): void { $job = new SendWebMentions(new Note); $this->assertNull($job->handle()); } - /** @test */ + #[Test] public function weResolveRelativeUris(): void { $uri = '/blog/post'; @@ -90,7 +91,7 @@ class SendWebMentionJobTest extends TestCase $this->assertEquals('https://example.org/blog/post', $job->resolveUri($uri, $base)); } - /** @test */ + #[Test] public function weSendAWebmentionForANote(): void { $html = ''; @@ -110,7 +111,7 @@ class SendWebMentionJobTest extends TestCase $this->assertTrue(true); } - /** @test */ + #[Test] public function linksInNotesCanNotSupportWebmentions(): void { $mock = new MockHandler([ diff --git a/tests/Unit/Jobs/SyndicateNoteToBlueskyJobTest.php b/tests/Unit/Jobs/SyndicateNoteToBlueskyJobTest.php index e1e3fb8c..2dbae153 100644 --- a/tests/Unit/Jobs/SyndicateNoteToBlueskyJobTest.php +++ b/tests/Unit/Jobs/SyndicateNoteToBlueskyJobTest.php @@ -11,13 +11,14 @@ use GuzzleHttp\HandlerStack; use GuzzleHttp\Middleware; use GuzzleHttp\Psr7\Response; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class SyndicateNoteToBlueskyJobTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function weSyndicateNotesToBluesky(): void { config(['bridgy.bluesky_token' => 'test']); @@ -38,7 +39,7 @@ class SyndicateNoteToBlueskyJobTest extends TestCase ]); } - /** @test */ + #[Test] public function weSyndicateTheOriginalMarkdownToBluesky(): void { config(['bridgy.bluesky_token' => 'test']); diff --git a/tests/Unit/Jobs/SyndicateNoteToMastodonJobTest.php b/tests/Unit/Jobs/SyndicateNoteToMastodonJobTest.php index d90261e7..d7215223 100644 --- a/tests/Unit/Jobs/SyndicateNoteToMastodonJobTest.php +++ b/tests/Unit/Jobs/SyndicateNoteToMastodonJobTest.php @@ -11,13 +11,14 @@ use GuzzleHttp\HandlerStack; use GuzzleHttp\Middleware; use GuzzleHttp\Psr7\Response; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class SyndicateNoteToMastodonJobTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function weSyndicateNotesToMastodon(): void { config(['bridgy.mastodon_token' => 'test']); @@ -38,7 +39,7 @@ class SyndicateNoteToMastodonJobTest extends TestCase ]); } - /** @test */ + #[Test] public function weSyndicateTheOriginalMarkdown(): void { config(['bridgy.mastodon_token' => 'test']); diff --git a/tests/Unit/LikesTest.php b/tests/Unit/LikesTest.php index dc243967..073d1ca4 100644 --- a/tests/Unit/LikesTest.php +++ b/tests/Unit/LikesTest.php @@ -6,13 +6,14 @@ namespace Tests\Unit; use App\Models\Like; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class LikesTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function weCanSetTheAuthorUrl(): void { $like = new Like; @@ -20,7 +21,7 @@ class LikesTest extends TestCase $this->assertEquals('https://joe.bloggs', $like->author_url); } - /** @test */ + #[Test] public function weDoNotModifyPlainTextContent(): void { $like = new Like; @@ -31,7 +32,7 @@ class LikesTest extends TestCase $this->assertEquals('some plaintext content', $like->content); } - /** @test */ + #[Test] public function weCanHandleBlankContent(): void { $like = new Like; @@ -42,7 +43,7 @@ class LikesTest extends TestCase $this->assertNull($like->content); } - /** @test */ + #[Test] public function htmlLikeContentIsFiltered(): void { $htmlEvil = <<<'HTML' diff --git a/tests/Unit/MediaTest.php b/tests/Unit/MediaTest.php index df1a22cf..4dd4c256 100644 --- a/tests/Unit/MediaTest.php +++ b/tests/Unit/MediaTest.php @@ -7,13 +7,14 @@ namespace Tests\Unit; use App\Models\Media; use App\Models\Note; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class MediaTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function getTheNoteThatMediaInstanceBelongsTo(): void { $media = Media::factory()->for(Note::factory())->create(); @@ -21,7 +22,7 @@ class MediaTest extends TestCase $this->assertInstanceOf(Note::class, $media->note); } - /** @test */ + #[Test] public function absoluteUrlsAreReturnedUnmodified(): void { $absoluteUrl = 'https://instagram-cdn.com/image/uuid'; diff --git a/tests/Unit/MicropubClientsTest.php b/tests/Unit/MicropubClientsTest.php index 26d6dca4..d3bc0e01 100644 --- a/tests/Unit/MicropubClientsTest.php +++ b/tests/Unit/MicropubClientsTest.php @@ -7,13 +7,14 @@ namespace Tests\Unit; use App\Models\MicropubClient; use Illuminate\Database\Eloquent\Collection; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class MicropubClientsTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function weCanGetNotesRelatingToClient(): void { $client = MicropubClient::factory()->make(); diff --git a/tests/Unit/NotesTest.php b/tests/Unit/NotesTest.php index dfd532e6..2f157c8a 100644 --- a/tests/Unit/NotesTest.php +++ b/tests/Unit/NotesTest.php @@ -16,6 +16,7 @@ use GuzzleHttp\Psr7\Response; use Illuminate\Filesystem\Filesystem; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Cache; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class NotesTest extends TestCase @@ -25,9 +26,8 @@ class NotesTest extends TestCase /** * Test the getNoteAttribute method. This will then also call the * relevant sub-methods. - * - * @test */ + #[Test] public function getNoteAttributeMethodCallsSubMethods(): void { // phpcs:ignore @@ -40,9 +40,8 @@ class NotesTest extends TestCase /** * Look for a default image in the contact’s h-card for the makeHCards method. - * - * @test */ + #[Test] public function defaultImageUsedAsFallbackInMakehcardsMethod(): void { // phpcs:ignore @@ -70,9 +69,8 @@ class NotesTest extends TestCase /** * Look for a specific profile image in the contact’s h-card. - * - * @test */ + #[Test] public function specificProfileImageUsedInMakehcardsMethod(): void { Contact::factory()->create([ @@ -106,9 +104,8 @@ class NotesTest extends TestCase /** * Look for twitter URL when there’s no associated contact. - * - * @test */ + #[Test] public function twitterLinkIsCreatedWhenNoContactFound(): void { $expected = 'Hi @bob
' . PHP_EOL; @@ -118,7 +115,7 @@ class NotesTest extends TestCase $this->assertEquals($expected, $note->note); } - /** @test */ + #[Test] public function shorturlMethodReturnsExpectedValue(): void { $note = Note::factory()->make(); @@ -126,7 +123,7 @@ class NotesTest extends TestCase $this->assertEquals(config('url.shorturl') . '/notes/E', $note->shorturl); } - /** @test */ + #[Test] public function weGetLatitudeLongitudeValuesOfAssociatedPlaceOfNote(): void { $place = Place::factory()->create([ @@ -140,7 +137,7 @@ class NotesTest extends TestCase $this->assertEquals('-2.3805', $note->longitude); } - /** @test */ + #[Test] public function whenNoAssociatedPlaceWeGetNullForLatitudeLongitudeValues(): void { $note = Note::factory()->create(); @@ -148,7 +145,7 @@ class NotesTest extends TestCase $this->assertNull($note->longitude); } - /** @test */ + #[Test] public function weCanGetAddressAttributeForAssociatedPlace(): void { $place = Place::factory()->create([ @@ -162,7 +159,7 @@ class NotesTest extends TestCase $this->assertEquals('The Bridgewater Pub', $note->address); } - /** @test */ + #[Test] public function deletingNotesAlsoDeletesTagsViaTheEventObserver(): void { // first we’ll create a temporary note to delete @@ -177,7 +174,7 @@ class NotesTest extends TestCase ]); } - /** @test */ + #[Test] public function saveBlankNotesAsNull(): void { $note = new Note(['note' => '']); @@ -185,7 +182,7 @@ class NotesTest extends TestCase $this->assertNull($note->note); } - /** @test */ + #[Test] public function reverseGeocodeAnAttraction(): void { // phpcs:disable Generic.Files.LineLength.TooLong @@ -210,7 +207,7 @@ class NotesTest extends TestCase ); } - /** @test */ + #[Test] public function reverseGeocodeASuburb(): void { // phpcs:disable Generic.Files.LineLength.TooLong @@ -235,7 +232,7 @@ class NotesTest extends TestCase ); } - /** @test */ + #[Test] public function reverseGeocodeACity(): void { // Note I’ve modified this JSON response so it only contains the @@ -262,7 +259,7 @@ class NotesTest extends TestCase ); } - /** @test */ + #[Test] public function reverseGeocodeACounty(): void { // Note I’ve removed everything below county to test for queries where @@ -286,7 +283,7 @@ class NotesTest extends TestCase $this->assertEquals('Kent, UK', $address); } - /** @test */ + #[Test] public function reverseGeocodeACountry(): void { // Note I’ve removed everything below country to test for querires where @@ -310,7 +307,7 @@ class NotesTest extends TestCase $this->assertEquals('Ireland', $address); } - /** @test */ + #[Test] public function addImageElementToNoteContentWhenMediaAssociated(): void { $media = Media::factory()->create([ @@ -327,7 +324,7 @@ class NotesTest extends TestCase $this->assertEquals($expected, $note->content); } - /** @test */ + #[Test] public function addVideoElementToNoteContentWhenMediaAssociated(): void { $media = Media::factory()->create([ @@ -344,7 +341,7 @@ class NotesTest extends TestCase $this->assertEquals($expected, $note->content); } - /** @test */ + #[Test] public function addAudioElementToNoteContentWhenMediaAssociated(): void { $media = Media::factory()->create([ @@ -362,10 +359,9 @@ class NotesTest extends TestCase } /** - * @test - * * @todo Why do we need to provide text? */ + #[Test] public function provideTextForBlankContent(): void { $note = new Note; @@ -382,9 +378,8 @@ class NotesTest extends TestCase $this->assertNull($note->twitter); }*/ - - /** @test */ - public function markdownContentGetsConverted(): void + #[Test] + public function markdown_content_gets_converted(): void { $note = Note::factory()->create([ 'note' => 'The best search engine? https://duckduckgo.com', @@ -398,9 +393,8 @@ class NotesTest extends TestCase /** * For now, just reply on a cached object instead of actually querying Twitter. - * - * @test */ + #[Test] public function checkInReplyToIsTwitterLink(): void { $tempContent = (object) [ @@ -415,7 +409,7 @@ class NotesTest extends TestCase $this->assertEquals($tempContent, $note->twitter); } - /** @test */ + #[Test] public function latitudeAndLongitudeCanBeParsedFromPlainLocation(): void { $note = Note::factory()->create([ @@ -426,7 +420,7 @@ class NotesTest extends TestCase $this->assertSame(4.56, $note->longitude); } - /** @test */ + #[Test] public function addressAttributeCanBeRetrievedFromPlainLocation(): void { Cache::put('1.23,4.56', 'Antarctica'); @@ -438,7 +432,7 @@ class NotesTest extends TestCase $this->assertSame('Antarctica', $note->address); } - /** @test */ + #[Test] public function mastodonUsernamesAreParsedCorrectly(): void { $expected = 'Hi @freekmurze@phpc.social how are you?
' . PHP_EOL; diff --git a/tests/Unit/PlacesTest.php b/tests/Unit/PlacesTest.php index e9daadda..b3f0ed37 100644 --- a/tests/Unit/PlacesTest.php +++ b/tests/Unit/PlacesTest.php @@ -10,13 +10,14 @@ use App\Services\PlaceService; use Illuminate\Database\Eloquent\Collection; use Illuminate\Foundation\Testing\RefreshDatabase; use InvalidArgumentException; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class PlacesTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function canRetrieveAssociatedNotes(): void { $place = Place::factory()->create(); @@ -27,7 +28,7 @@ class PlacesTest extends TestCase $this->assertCount(5, $place->notes); } - /** @test */ + #[Test] public function nearMethodReturnsCollection(): void { Place::factory()->create([ @@ -39,7 +40,7 @@ class PlacesTest extends TestCase $this->assertEquals('the-bridgewater-pub', $nearby[0]->slug); } - /** @test */ + #[Test] public function getLongurl(): void { $place = Place::factory()->create([ @@ -48,7 +49,7 @@ class PlacesTest extends TestCase $this->assertEquals(config('app.url') . '/places/the-bridgewater-pub', $place->longurl); } - /** @test */ + #[Test] public function getShorturl() { $place = Place::factory()->create([ @@ -57,7 +58,7 @@ class PlacesTest extends TestCase $this->assertEquals(config('url.shorturl') . '/places/the-bridgewater-pub', $place->shorturl); } - /** @test */ + #[Test] public function getUri(): void { $place = Place::factory()->create([ @@ -66,7 +67,7 @@ class PlacesTest extends TestCase $this->assertEquals(config('app.url') . '/places/the-bridgewater-pub', $place->uri); } - /** @test */ + #[Test] public function placeServiceReturnsExistingPlaceBasedOnExternalUrlsSearch(): void { Place::factory(10)->create(); @@ -86,7 +87,7 @@ class PlacesTest extends TestCase $this->assertCount(11, Place::all()); } - /** @test */ + #[Test] public function placeServiceRequiresNameWhenCreatingNewPlace(): void { $this->expectException(InvalidArgumentException::class); @@ -96,7 +97,7 @@ class PlacesTest extends TestCase $service->createPlaceFromCheckin(['foo' => 'bar']); } - /** @test */ + #[Test] public function placeServiceRequiresLatitudeWhenCreatingNewPlace(): void { $this->expectException(InvalidArgumentException::class); @@ -106,7 +107,7 @@ class PlacesTest extends TestCase $service->createPlaceFromCheckin(['properties' => ['name' => 'bar']]); } - /** @test */ + #[Test] public function placeServiceCanUpdateExternalUrls(): void { $place = Place::factory()->create([ diff --git a/tests/Unit/TagsTest.php b/tests/Unit/TagsTest.php index 3592024a..4d9dcdd0 100644 --- a/tests/Unit/TagsTest.php +++ b/tests/Unit/TagsTest.php @@ -8,13 +8,15 @@ use App\Models\Bookmark; use App\Models\Note; use App\Models\Tag; use Illuminate\Foundation\Testing\RefreshDatabase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class TagsTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function canGetAssociatedNotes(): void { $note = Note::factory()->create(); @@ -23,7 +25,7 @@ class TagsTest extends TestCase $this->assertCount(1, $tag->notes); } - /** @test */ + #[Test] public function canGetAssociatedBookmarks(): void { $bookmark = Bookmark::factory()->create(); @@ -32,11 +34,8 @@ class TagsTest extends TestCase $this->assertCount(1, $tag->bookmarks); } - /** - * @test - * - * @dataProvider tagsProvider - */ + #[Test] + #[DataProvider('tagsProvider')] public function canNormalize(string $input, string $expected): void { $this->assertSame($expected, Tag::normalize($input)); diff --git a/tests/Unit/WebMentionTest.php b/tests/Unit/WebMentionTest.php index a63bc01e..7a6ce471 100644 --- a/tests/Unit/WebMentionTest.php +++ b/tests/Unit/WebMentionTest.php @@ -10,13 +10,14 @@ use Codebird\Codebird; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Cache; +use PHPUnit\Framework\Attributes\Test; use Tests\TestCase; class WebMentionTest extends TestCase { use RefreshDatabase; - /** @test */ + #[Test] public function commentableMethodLinksToNotes(): void { $note = Note::factory()->create(); @@ -27,7 +28,7 @@ class WebMentionTest extends TestCase $this->assertInstanceOf(Note::class, $webmention->commentable); } - /** @test */ + #[Test] public function publishedAttributeUsesUpdatedAtWhenNoRelevantMf2Data(): void { $webmention = new WebMention; @@ -36,7 +37,7 @@ class WebMentionTest extends TestCase $this->assertEquals($updated_at->toDayDateTimeString(), $webmention->published); } - /** @test */ + #[Test] public function publishedAttributeUsesUpdatedAtWhenErrorParsingMf2Data(): void { $webmention = new WebMention; @@ -54,7 +55,7 @@ class WebMentionTest extends TestCase $this->assertEquals($updated_at->toDayDateTimeString(), $webmention->published); } - /** @test */ + #[Test] public function createPhotoLinkDoesNothingWithGenericUrlAndNoLocallySavedImage(): void { $webmention = new WebMention; @@ -63,7 +64,7 @@ class WebMentionTest extends TestCase $this->assertEquals($expected, $webmention->createPhotoLink($homepage)); } - /** @test */ + #[Test] public function createPhotoLinkReturnsLocallySavedImageUrlIfItExists(): void { $webmention = new WebMention; @@ -72,7 +73,7 @@ class WebMentionTest extends TestCase $this->assertEquals($expected, $webmention->createPhotoLink($homepage)); } - /** @test */ + #[Test] public function createPhotoLinkDealsWithSpecialCaseOfDirectTwitterPhotoLinks(): void { $webmention = new WebMention; @@ -81,7 +82,7 @@ class WebMentionTest extends TestCase $this->assertEquals($expected, $webmention->createPhotoLink($twitterProfileImage)); } - /** @test */ + #[Test] public function createPhotoLinkReturnsCachedTwitterPhotoLinks(): void { $webmention = new WebMention; @@ -91,16 +92,15 @@ class WebMentionTest extends TestCase $this->assertEquals($expected, $webmention->createPhotoLink($twitterURL)); } - /** @test */ + #[Test] public function createPhotoLinkResolvesTwitterPhotoLinks(): void { $info = (object) [ 'profile_image_url_https' => 'https://pbs.twimg.com/static_profile_link.jpg', ]; - $codebirdMock = $this->getMockBuilder(Codebird::class) - ->addMethods(['users_show']) - ->getMock(); - $codebirdMock->method('users_show') + $codebirdMock = $this->createPartialMock(Codebird::class, ['__call']); + $codebirdMock->method('__call') + ->with('users_show', $this->anything()) ->willReturn($info); $this->app->instance(Codebird::class, $codebirdMock); @@ -117,14 +117,14 @@ class WebMentionTest extends TestCase $this->assertEquals($expected, $webmention->createPhotoLink($twitterURL)); } - /** @test */ + #[Test] public function getReplyAttributeDefaultsToNull(): void { $webmention = new WebMention; $this->assertNull($webmention->reply); } - /** @test */ + #[Test] public function getReplyAttributeWithMf2WithoutHtmlReturnsNull(): void { $webmention = new WebMention;