Commit graph jonnybarnes.uk/tests
Author SHA1 Message Date
db09718a96
Switch Bridgy syndication from Micropub to webmention
Bridgy's Micropub endpoint required per-silo access tokens and posted
raw markdown content directly. Switch to Bridgy's webmention publish
endpoint instead: POST source/target to /publish/webmention and let
Bridgy re-fetch the note page, which now carries hidden verification
links for silos not yet syndicated. Removes the now-unused
config/bridgy.php and BRIDGY_MASTODON_TOKEN env var, and caps both
jobs to a single try since retries would send Bridgy a duplicate
publish webmention.
2026-07-14 17:36:25 +01:00
4569abc351
Add command to reprocess existing media with correct aspect-ratio scaling
ProcessMedia was using resize(), which distorts images that aren't the
target aspect ratio; scale() preserves it. Existing medium/small
variants generated before this fix need regenerating, so add an
artisan command (with --dry-run) to do that, plus feature tests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-02 20:00:30 +01:00
9f012b01e4
Upgrade to Laravel 13 2026-04-07 09:01:19 +01:00
e8e2bff5e4
Fix UpdateHandler crash when replace.content is a rich-text object
OwnYourSwarm sends content as an array of objects with `value` and `html`
keys per the Micropub spec. The handler now handles both forms: plain
strings and rich objects, preferring `html` over `value`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 17:43:57 +00:00
4451fc247e
Fix OwnYourSwarm checkin parsing to read from properties.checkin
Real OwnYourSwarm requests send the checkin h-card inside
properties.checkin (as an array), not at the top level. The code
was reading from the top-level key so no Place was ever created,
leaving checkin notes blank.

Update tests to match the real request format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 19:18:00 +00:00
0a13d27d6f
Expand webmentions source and target columns to text
Long brid.gy Bluesky source URLs exceed 255 characters, causing
SQLSTATE[22001] errors. Changed source and target from varchar(255)
to text (no performance impact in PostgreSQL).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 16:32:22 +00:00
1137d2a07e
Move request parsing into DTOs via fromRequest(), expand update handler
Each DTO now owns its own parsing logic via fromRequest(), removing
the normalization layer from MicropubRequest entirely. UpdateHandler
gains delete support and allows replace/add/delete to compose in a
single request rather than being mutually exclusive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 20:39:50 +00:00
24cb6d61aa
Implement micropub update support with clean exception-based error handling
- Add MicropubUnsupportedModelException for non-note update attempts
- Refactor UpdateHandler to throw exceptions instead of returning JsonResponse objects; extract applySyndication() to DRY up duplicated syndication URL mapping
- Fix MicropubController: InvalidTokenScopeException now returns 401 + insufficient_scope; add catches for ModelNotFoundException (404) and MicropubUnsupportedModelException (500); updates return 200 not 201
- Slim MicropubRequest.normalizeMicropubJson() to branch on action type, keeping update and create fields cleanly separated
- Update tests to match corrected status codes and error keys; remove markTestSkipped() from all update tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 10:15:35 +00:00
a342b432d4
Update dependencies 2026-02-21 17:06:37 +00:00
51780523b4
Fix unit tests 2026-01-04 10:22:32 +00:00
9e788e0fe8
Images can be uploaded with alt text
This means associating images to notes via a pivot table, we also finish
off the migration of medai from S3.
2026-01-04 10:07:25 +00:00
76db869af5
Allow files to be added to notes
This is specifically when a Micropub client is using the JSON syntax and
initially uploads the photo via the media endpoint
2025-12-27 17:58:43 +00:00
363254d13c
Some fixes related to developing my Micropub client 2025-08-17 11:05:38 +01:00
83d10e1a70
Refactor of micropub request handling
Trying to organise the code better. It now temporarily doesn’t support
update requests. Thought the spec defines them as SHOULD features and
not MUST features. So safe for now :)
2025-04-27 16:38:25 +01:00
23c275945a
Refactor micropub token verification 2025-04-12 11:47:30 +01:00
126bb29ae2
Laravel Pint fixes
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled
2025-04-06 17:25:06 +01:00
7a58287b34
Remove references to short domain 2025-04-06 17:22:36 +01:00
1dfa17abca
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
2025-04-01 21:10:30 +01:00
1d59d57c2e
Fix showing author like on a note 2024-11-30 15:30:07 +00:00
43447ac47b
Fix tests after we corrected the media URLs
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled
The media URLs have a path that starts `/storage/`.
2024-10-26 12:52:43 +01:00
d7da42b626
Host images locally
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled
We don’t need the complexity of S3. Sepcifically the complexity of
managing my own AWS account, flysystem made the Laravel side easy.

A command is added to copy the the S3 files over to local storage.
2024-10-25 20:40:52 +01:00
baee7ade4f
Improve scope checking
Whether the scopes are defined as a space separated string, or an array,
we should now be checking them without any errors.
2024-07-13 14:52:57 +01:00
3cf11b0d72
Store scope data correctly
I was using the key `scopes` instead of `scope`
2024-06-30 11:13:27 +01:00
58b31bb4c1
Add Indieweb related link to the HTTP headers 2024-06-08 19:39:09 +01:00
7f70f75d05
IndieAuth endpoint can now return access tokens 2024-06-08 10:56:15 +01:00
5b2bfd5270
Auth endpoint
The IndieAuth endpoint should be added, currently adding the unt tests
2024-06-02 10:16:16 +01:00
cbbe87e23c
Setup support for syndicating to Bluesky 2024-03-23 21:19:54 +00:00
db8f885092
Remove CSP header 2024-03-23 14:37:30 +00:00
659bc57e24
Fix issue discovering webmentions endpoints for some sites
The Guzzle provided Header::parse does not like commas in URLs
2024-03-02 10:16:05 +00:00
2aa60db548
Update JSON notes feed to version 1.1 2023-12-20 14:44:11 +00:00
ba9330cdf1
Expose RSS feed
Though actually its the json feed 🤫
2023-12-19 17:12:49 +00:00
10b51c654d
Fix unit tests 2023-11-27 22:20:40 +00:00
05c63b241d
feat: Refactor mention rendering and generator classes
- Add support for Mastodon username mentions
- Add test for parsing Mastodon usernames in notes
- Modify namespace and class imports for `MentionGenerator` and `MentionRenderer` in `Note.php`
- Rename `ContactMentionGenerator.php` to `MentionGenerator.php`
2023-11-19 17:22:02 +00:00
03c8f20a8c
feat: Add Passkey support
- Added a button for logging in with Passkeys in `login.blade.php`
- Refactored the `register` method and added the `login` method in `auth.js`
- Made various modifications and additions to the passkey functionality in `PasskeysController.php`
- Added event listener for login-passkey element in `app.js`
- Modified the passkeys table schema and made modifications to `Passkey.php`
- Changed the redirect route in the `login` method of `AuthController.php`
- Made modifications and additions to the routes in `web.php`
- Added `"web-auth/webauthn-lib": "^4.7"` to the list of required packages in `composer.json`
- Changed the redirect URL in `AdminTest.php`
2023-10-27 20:22:40 +01:00
dabd03f556
refactor: Refactor and add tests for SaveProfileImage feature
- Add error handling checks for photo and home
- Add 3 new tests and modify an existing test for SaveProfileImageJob
- Test getting URL from photo object if alt text is provided
- Test using the first URL if multiple homepages are provided
2023-06-17 19:48:27 +01:00
d9e2467ba5
fix: Improve routing specificity and add new test.
- Update regular expressions for two routes in `routes/web.php` to match specific numeral values
- Add new test for incorrect URL parsing in `tests/Feature/ArticlesTest.php`
2023-06-16 13:02:00 +01:00
462c710295
fix: Use correct config variables post L10-config update
Specifically the header name had disappeared.
2023-06-11 16:54:56 +01:00
71cb15d007
refactor: Improve note ID validation and error handling
- Improve input validation and error handling in Note model
- Add test case for out-of-range note IDs in NotesController
2023-06-11 12:52:07 +01:00
bebbfec510
chore: Refactor configuration files based on Laravel 10 skeleton 2023-06-09 18:31:53 +01:00
86ac67698e
Remove activity stream functionality from controllers and providers.
- Remove activity stream related code and files
- Update configuration for HtmlSanitizer and RetryGuzzle
- Add `paginate` macro for `Collection`
- Remove unused code for `Codebird`
- Simplify `FrontPageController` and `NotesController` methods
2023-05-12 15:30:05 +01:00
7ee5bb00ba
Update Laravel Pint 2023-04-20 17:34:06 +01:00
58c5a7d443
Re-add search functionality 2023-04-11 21:44:55 +01:00
bdb69df52d
Switch bio to be stored in database 2023-04-11 17:37:42 +01:00
88e1246f8b
Remove Twitter POSSE support 2023-04-08 13:25:36 +01:00
ebfa7f7bf7
REmove dates than cause some tests to fail 2023-04-08 10:33:48 +01:00
aedbb4b327
Make phpunit provider methods static 2023-04-07 15:39:49 +01:00
a0db33067c
2023 Redesign v1 2023-04-07 15:09:29 +01:00
16b120bc73
Upgrade to Laravel 10 2023-02-18 09:34:57 +00:00
6d6e719f52
Update Laravel Pint, fix files in codebase 2023-02-16 16:57:06 +00:00
447268b417
Fix original test 2023-02-04 10:41:08 +00:00