mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-20 20:55:36 +00:00
🔧 **Add .codegraph config & update dependencies**
- ➕ Added `.codegraph/config.json` for file inclusion/exclusion in analytics. - ⬆️ Bumped versions of `guzzlehttp`, `laravel/framework`, `laravel/horizon`, `shiki`, `nostr-tools`, and other dependencies in `composer.lock` and `yarn.lock`. - 🖼️ Enhanced file upload validation and preview support by including `.avif` MIME type in `livewire` components and configuration. - ✅ Added tests to ensure `.avif` is supported across file upload forms.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Guards against the regression where uploading an .avif file in any of the
|
||||
* Livewire file-upload forms (meetups/courses/lecturers) throws
|
||||
* FileNotPreviewableException because livewire's preview_mimes did not include
|
||||
* avif. See https://livewire.laravel.com/docs/uploads#configuring-temporary-upload-previews
|
||||
*/
|
||||
it('lists avif in livewire preview_mimes config', function () {
|
||||
expect(config('livewire.temporary_file_upload.preview_mimes'))
|
||||
->toContain('avif');
|
||||
});
|
||||
|
||||
it('allows avif in the mimes validation of every image-upload component', function (string $relativePath) {
|
||||
$contents = file_get_contents(resource_path($relativePath));
|
||||
|
||||
expect($contents)->toMatch('/#\[Validate\([^)]*mimes:[^|]*avif[^|]*[^)]*\)\]/');
|
||||
})->with([
|
||||
'views/livewire/meetups/create.blade.php',
|
||||
'views/livewire/meetups/edit.blade.php',
|
||||
'views/livewire/courses/create.blade.php',
|
||||
'views/livewire/courses/edit.blade.php',
|
||||
'views/livewire/lecturers/create.blade.php',
|
||||
'views/livewire/lecturers/edit.blade.php',
|
||||
]);
|
||||
Reference in New Issue
Block a user