feat: add admin email configuration to app settings

delete: remove outdated Spatie media library decision document

docs: create new decision document for Spatie media library usage

docs: add testing strategy document for Pest4 and Dusk

test: implement login tests with Dusk for user authentication

chore: add .gitignore files for console, screenshots, and source directories
This commit is contained in:
jon brookes 2026-01-05 13:43:07 +00:00
parent aa39707e10
commit ff5ab3aa58
14 changed files with 189 additions and 1491 deletions

View file

@ -1,10 +0,0 @@
# 2026-01-02
```bash
php artisan storage:link
composer require "spatie/laravel-medialibrary"
composer require filament/spatie-laravel-media-library-plugin:"^4.0" -W
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-config"
php artisan migrate
```

View file

@ -0,0 +1,24 @@
# 2026-01-02
```bash
php artisan storage:link
composer require "spatie/laravel-medialibrary"
composer require filament/spatie-laravel-media-library-plugin:"^4.0" -W
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-config"
php artisan migrate
```
I had a lot of fun and silly games working out if I even needed both Spatie media library and the filament plugin they have as it states itself a sub directory of filament itself.
I managed to remove the spatie fulament plugin and for the app to work for a while but eventually found a part of it not implemented in filament core. It took a while but there seems to be an overlap somewhere. So I re-installed the spatie filament module to find all the errors went away, when previously they did not
PHP and I guess composer would seem to aggressively cache things very very hard and I just didnt understand how very hard that is sometimes.
Suffice to say, spatie media library seems to be 'the way' as far as media is concerned for filament.
I looked at curator, also by the author of the tiptap filament integration to find it seems dependant on tailwind3, limiting me to Laravel 11 I believe, which was not what I wanted.
I used filament 'actions' in order to augment the form for 'entries' so as to add 'pick from gallery' functionality together with custom javascript to insert records found in media library for both rich content and featured images
There may be a better way of doing this but for now, I believe this is a solution I have craved for a while now with filament and have at least gained a bit better understanding of so called 'actions' and will re-visit this whole section in the docs.

View file

@ -0,0 +1,38 @@
# 2026-01-05
I would very much like to start using Pest4 as it has a lot of nice things in it like browser testing with some of the latest screen shot visual testing and more
for now I know Dusk and have been able to use this in previous projects before Pest4
so initially at least I intend to use Dusk and build on to migrate to Pest4 where I can
# test isolation and setup
in the past I now realize, I was introducing brittle tests by first doing setup to then rely on a configuration for further tests
I think this is a pattern that some follow but as a generalist, devops and hybrid person I can and do make mistakes. I suppose we all do.
Mine was to not fully embrace test isolation
Each test therefor needs to be set up from scratch so to speak
I then have each subsequent test re-setting up say, a user, a database table, whatever is required but each time from a blank slate
That way, when a test fails, it should be obvious what has been broken without having to traverse through a bunch of setup and dependencies to find I broke a setup step, not a test.
Let us hope so anyway. That is the approach I am going with with Dusk for now. Lets see how I get on and if I get the setup code as non repeated by abstraction as I can
I think testing and particulary automated testing is essential for success.
It has been disappointing to find in my time working with others in the past that there seems resistance to testing and to automation of testing for reasons I believe not technical but that which time does not allow for me to digress
## confusing config
In config files: Just use the key name without any prefix
In your code: Use config('filename.keyname')
The filename becomes the first part automatically - you never type it inside the config file itself.