Update Laravel to v12
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled

This commit is contained in:
Jonny Barnes 2025-03-01 15:00:41 +00:00
parent f2025b801b
commit 1dfa17abca
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
83 changed files with 1324 additions and 2323 deletions

View file

@ -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());

View file

@ -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');

View file

@ -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'],
]);
}

View file

@ -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',

View file

@ -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));