Commit Graph

277 Commits (v0.12.11)

Author SHA1 Message Date
Daniel Supernault 5fc343dd40
Update federation fanout 2 weeks ago
Your Name cd4d9e5f36 Fix index migrations to support PostgreSQL and MariaDB
The three recent index migrations used raw MySQL-only DDL (backtick
identifiers, ADD INDEX inside ALTER TABLE, ALGORITHM=INPLACE/LOCK=NONE)
guarded only against sqlite, so PostgreSQL instances failed with
SQLSTATE[42601] on migrate (#7177).

Each migration now branches on the driver:
- mysql/mariadb keep the online-DDL fast path (non-blocking on large
  instances)
- other drivers use the portable Schema::table builder

Table names, index names, and columns are unchanged so already-migrated
MySQL instances are unaffected.
2 weeks ago
Your Name 5a9c235922 Backfill storage_used on upgrade via queued job + data migration
Repair accounts whose storage counter drifted before the self-heal logic
existed (#7169). A data migration dispatches RecalculateAllUserStoragePipeline
to the low queue so the deploy is not blocked while every user is recomputed
from source. The job is unique and idempotent, so re-runs are harmless.

- RecalculateAllUserStoragePipeline: chunked recalc of all active users
- Migration dispatches the job (no inline heavy work during deploy)
- Test covers bulk recalculation from actual media
2 weeks ago
Your Name 6496904293 Fix account storage limit not freeing on media deletion (#7169)
users.storage_used only ever grew: uploads incremented it but no deletion
path decremented it, so users hit the account size limit even when their
real media usage was well below it.

- Decrement storage_used in MediaDeletePipeline when media is removed
- Add UserStorageService::increaseStorageUsed / decrementStorageUsed as the
  fast, symmetric hot-path counter updates (floor-based, clamped at zero)
- Refactor the 6 upload call sites to use increaseStorageUsed instead of
  duplicated inline writes (also fixes ceil/floor drift vs the reconciler)
- Add (user_id, size) covering index so per-user SUM(size) is not a full
  table scan (INPLACE/LOCK=NONE, skipped on sqlite)
- Add user:storage:recalculate command to repair affected accounts, with a
  daily --stale=168 scheduled reconciler to correct any drift
- Add regression tests for the pipeline and UserStorageService
2 weeks ago
Daniel Supernault 1281fa3751
Fix tests 2 weeks ago
Daniel Supernault c07706a415
Lint 2 weeks ago
Daniel Supernault 764a98437d
Fix media gc 2 weeks ago
Daniel Supernault d3746bc8ce
Create 2026_09_07_071046_add_deleted_at_profile_idindex_to_notifications_table.php 2 weeks ago
Shlee ee0876f550
Merge pull request #7060 from pixelfed/chore/remove-factory-model-property
Laravel 13 Prep: Remove unnecessary $model property from factories
2 weeks ago
Shift e973ddcfa4 Default core files 3 weeks ago
Your Name 8140ef7b02 Remove unnecessary $model property from factories
Applies patch 3/21 from pixelfed-staging PR #9: removes the redundant
protected $model property from 5 factories (Laravel resolves the model
from the factory name). Unused imports dropped via Pint. Verified
factories still resolve their models and affected tests pass.
3 weeks ago
Shlee 32bec52edb
Merge pull request #6985 from pixelfed/chore/laravel12-skeleton-uplift-v2
Laravel 12 skeleton uplift v2
3 weeks ago
Daniel Supernault 8e7b368ea2
Create 2019_12_14_000001_create_personal_access_tokens_table.php 3 weeks ago
Your Name 80214c5e71 chore: uplift framework skeleton toward Laravel 12 defaults
Modernize artisan and public/index.php to the streamlined bootstrap form,
migrate factories/seeders autoload to PSR-4 (database/seeds -> seeders), and
backfill missing env-driven config keys across app, session, database, queue,
mail, logging, and cache. All changes are additive and preserve existing
Pixelfed behavior and defaults.
3 weeks ago
Your Name 7aa1f8936d Revert "Merge pull request #6981 from pixelfed/chore/laravel12-skeleton-uplift"
This reverts commit 39384e2f93, reversing
changes made to f76bcfa3f9.
3 weeks ago
Your Name 4e83eb0867 chore: uplift framework skeleton toward Laravel 12 defaults
Modernize artisan and public/index.php to the streamlined bootstrap form,
migrate factories/seeders autoload to PSR-4 (database/seeds -> seeders), and
backfill missing env-driven config keys across app, session, database, queue,
mail, logging, and cache. All changes are additive and preserve existing
Pixelfed behavior and defaults.
3 weeks ago
Your Name 40b323bca4 revert: remove emoji local-to-cloud storage changes
Back out all emoji cloud-storage work from staging so it can be reworked and
re-landed separately (the URL resolution flips to cloud on a global config
flag, which created a broken-URL window, and the migration approach needs
revisiting).

Reverts to pre-emoji state:
- CustomEmoji model URL/storage helpers (urlForPath, storageTarget, storeMedia,
  storeMediaFromFile, deleteMedia, url) and callers in ImportEmojis,
  CustomEmojiService, AdminController
- admin custom-emoji blade views back to local /storage URLs
- Remove admin:EmojiMoveStorageLocalToCloud command
- Remove the deploy migration and its scheduler entry

Media (and the already-reverted story) scheduler entries are untouched.
3 weeks ago
Your Name aa9bb868dd fix: emoji admin URLs and cloud-migration guard
Two issues prevented emoji from serving/migrating correctly on cloud:

- Admin custom-emoji views hardcoded url('storage/'.media_path), so they
  always showed local URLs and bypassed cloud resolution. Use $emoji->url().
- The migration/command guard relied solely on config_cache('pixelfed.cloud_storage'),
  which is DB/12h-cached and can read stale-false right after cloud is
  enabled, causing the migration to silently no-op. Treat cloud as enabled
  when either live config() or config_cache() is true.
4 weeks ago
Your Name a945efbf74 feat: add migration to move local emoji to cloud on deploy
Runs admin:EmojiMoveStorageLocalToCloud during migrate so existing local
emoji are relocated to cloud as part of the upgrade, shrinking the window
where emoji URLs resolve to cloud before the files are there. No-op unless
cloud storage is enabled.
4 weeks ago
Your Name 4056747666 Revert hashtags collation migration from #6098
Migration failed with a duplicate entry error: recollating to
utf8mb4_unicode_520_ci causes previously-distinct hashtag names/slugs
to collide on the unique indexes. Reverting until the data is
de-duplicated first.
4 weeks ago
Shlee 336f5f899f
Merge pull request #6098 from bpeel/hashtags-outside-bmp
Fix hashtags usings scripts outside the BMP on MySQL
4 weeks ago
Shlee e53e82faf3
Update 2025_07_31_164635_change_hashtags_collation.php 4 weeks ago
Your Name c0cde2f682 refactor: move 52 legacy models from App\ to App\Models\
Move all Eloquent models from the app/ root directory to app/Models/
for consistency with modern Laravel conventions. The project already had
54 models in App\Models; this migrates the remaining 52 legacy models.

Changes:
- Move 52 model files from app/ to app/Models/
- Update namespace declarations in each model
- Update all ~1000 import references across the codebase
- Add Relation::morphMap() in AppServiceProvider for backward
  compatibility with existing polymorphic database records
- Add missing HasSnowflakePrimary imports for models that relied
  on same-namespace resolution
4 weeks ago
Daniel Supernault db636ee08a
Pint database/ 4 weeks ago
Your Name 4ce28d9144 feat: add framework integration tests for Laravel 12→13 upgrade readiness
Framework tests verify core Laravel integration points:
- ServiceProviderTest: app boot, guard resolution, route loading, config_cache
- RoutingTest: named routes, duplicates, api/oauth prefixes, middleware groups
- EloquentTest: User/Profile/Status factories, relationships, casts, soft deletes
- QueueTest: job dispatch, serialization, middleware, unique IDs
- ConfigTest: config loading, env overrides, auth/cache/queue settings
- MiddlewarePipelineTest: CSRF, auth, throttle, password confirm, 2FA, admin

Also:
- Add HasFactory trait to Status model
- Fix StatusFactory: remove non-existent 'place' column, add 'rendered' field
- Add Api/AccountTest for account endpoint coverage (254 total tests)
4 weeks ago
Your Name edb4368b08 refactor: replace deprecated laravel/helpers with native alternatives
Replace all deprecated helper function calls:
- str_slug() → Str::slug()
- starts_with() → str_starts_with()
- ends_with() → str_ends_with()
- array_first() → Arr::first()
- array_last() → Arr::last()
- array_flatten() → Arr::flatten()

Remove laravel/helpers package from composer.json as it is no longer
needed and will not be maintained for Laravel 13.
4 weeks ago
Shift 19880c2ffb
Convert string references to `::class`
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
4 weeks ago
Daniel Supernault 26ee049d07
Update AppRegisterController 1 month ago
dansup b51307ff42
Merge pull request #6482 from pixelfed/q1
Refactor: Created/Updated factories to Laravel  12
6 months ago
Daniel Supernault c857a3d6e3
Add migrations 6 months ago
Daniel Supernault a78a022283
Update passport. Fixes #6480 7 months ago
Your Name 13b04b7e53 fix 7 months ago
Daniel Supernault e01ed5d87a
Add migration to fix Story view_count default 1 year ago
Neil Roberts 53e5692cfb Change the collation for the hashtags table
Changes the collation for the hashtags table to utf8mb4_unicode_520_ci
when the driver is MySQL or MariaDB. Otherwise the default collation of
utf8mb4_unicode_ci is used which conflates all characters outside of the
basic multilingual plane. This meant that any hashtag that is using a
script not in the BMP ends up matching with any other hashtag with a
script outside the BMP if it has the same length.
1 year ago
Gavin Mogan 70584b47c5 Fixes for items highlighted by review.ai
* Consider using `hash_equals()` instead of `==` when comparing the state values to prevent timing attacks:
`abort_unless(hash_equals($request->input('state'), $request->session()->pull('oauth2state')), 400, 'invalid
state');`
* For better data integrity, consider adding a foreign key constraint to the user_id column: `$table-
>foreign('user_id')->references('id')->on('users')->onDelete('cascade');`
* Does the OIDC provider guarantee that the username field exists in the userInfo data? Consider adding a
null check or fallback: `$userInfoData[config('remote-auth.oidc.field_username')] ?? null`
1 year ago
Gavin Mogan 441c8e0d4c Generic OIDC Support
* Everything should be configurable by env variables
* Basic request tests
1 year ago
Daniel Supernault 437d742ac4
Add custom filters
Add custom filters, compatible with Mastodon `/api/v2/filters`

Todo:
- [ ] fix routes
- [ ] finish other context filtering
1 year ago
Daniel Supernault f70e0b4ae0
Update 2025_03_19_022553_add_pinned_columns_statuses_table.php 1 year ago
Felipe Mateus cce4c41d97
pinned posts 2 years ago
daniel d066a5cff5
Add app register email verify resends (#5814)
* Update iar.blade.php - Fix in-app reg without hcaptcha (#5807)

* Staging (#5674)

* Update .env.docker

Registry has changed. Old registry has been discontinued in August 2024. New Registry added, format of Docker tag has been adjusted as it now contains the Debian Release as well.

Sample Version is set to current stable but can be adjusted to any of the available branches.

* Update .env.docker

Stick major.minor according to https://jippi.github.io/docker-pixelfed/customize/tags/#pixelfed-version

Disable Debian Release Check until it's solved in dottie.

Closes https://github.com/pixelfed/pixelfed/issues/5264

* New translations web.php (Finnish)
[ci skip]

* New translations web.php (Finnish)
[ci skip]

* fix: don't restore memory limit after cities import

Since this command can only be invoked by CLI, the process will exit after a successful import, so restoring the transient PHP memory limit doesn't really have any affect.

In PHP 8.4, this throws the following error (which doesn't happen in 8.3 and below)

> [entrypoint / 11-first-time-setup.sh] - (stderr) 128769/128769 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%[2025-01-20 11:29:23] production.ERROR: Failed to set memory limit to 134217728 bytes (Current memory usage is 134746112 bytes) {"exception":"[object] (ErrorException(code: 0): Failed to set memory limit to 134217728 bytes (Current memory usage is 134746112 bytes) at /var/www/app/Console/Commands/ImportCities.php:140)

It seems to be a 8.4 behavior change, so removing the logic would make it go away

* New translations web.php (Finnish)
[ci skip]

* New translations web.php (Finnish)
[ci skip]

* New translations web.php (Portuguese)
[ci skip]

* New translations web.php (Portuguese)
[ci skip]

* fix(compose-modal): avoid WebGL if it's not needed

* fix(compose-modal): update webgl-media-editor

* New translations web.php (Hungarian)
[ci skip]

* New translations web.php (Russian)
[ci skip]

* New translations web.php (Russian)
[ci skip]

* Update .env.example

Adding the parameter INSTANCE_DISCOVER_PUBLIC="true" to prevent a HTTP 403 error at the explorer tab in the instance preview.

* New variable for lang spanish

* Variable for lang spanish

* Update Dockerfile, fixes #5535 #5559

* Fix #5582

* Fix #5632

* Update status twitter:card to summary_large_image for images/albums

* Update changelog

---------

Co-authored-by: Lioh Moeller <lioh.moeller@gmx.net>
Co-authored-by: Christian Winther <jippignu@gmail.com>
Co-authored-by: Taye Adeyemi <dev@taye.me>
Co-authored-by: stemy2 <stemy2@users.noreply.github.com>
Co-authored-by: Uthanien <feldarec@gmail.com>

* Update iar.blade.php

---------

Co-authored-by: daniel <danielsupernault@gmail.com>
Co-authored-by: Lioh Moeller <lioh.moeller@gmx.net>
Co-authored-by: Christian Winther <jippignu@gmail.com>
Co-authored-by: Taye Adeyemi <dev@taye.me>
Co-authored-by: stemy2 <stemy2@users.noreply.github.com>
Co-authored-by: Uthanien <feldarec@gmail.com>

* Add app register email verify resends

* Update composer

* Update changelog

* Update IG import command

---------

Co-authored-by: Shlee <github@shl.ee>
Co-authored-by: Lioh Moeller <lioh.moeller@gmx.net>
Co-authored-by: Christian Winther <jippignu@gmail.com>
Co-authored-by: Taye Adeyemi <dev@taye.me>
Co-authored-by: stemy2 <stemy2@users.noreply.github.com>
Co-authored-by: Uthanien <feldarec@gmail.com>
2 years ago
Daniel Supernault 604746bd5e
Add AppRegister 2 years ago
Daniel Supernault 3109e6a1ab
Refactor migration 2 years ago
Anil Kulkarni d97383c0f6
Fix the local column for statuses to not include remote shares (#5513)
* Fix the local column for statuses to not include remote shares

* Chunk the migration
2 years ago
Daniel Supernault 3d67d5a369
Add Pulse 2 years ago
Daniel Supernault bad627119c
Fix migration 2 years ago
daniel f1bfcc9528
Merge pull request #5379 from siarie/fix-sqlite-migration
Fix sqlite database migration
2 years ago
Daniel Supernault 9289792ad8
Fix migration 2 years ago
Sri Aspari 1ee9af3772 Fix sqlite database migration 2 years ago
Daniel Supernault f81a8be6db
Add migration 2 years ago
Daniel Supernault 13f77a0fc7
Create 2024_10_06_035032_modify_caption_field_in_media_table.php 2 years ago