Commit Graph

140 Commits (0435d08568baf6c502c623e8fc8075375d6ae151)

Author SHA1 Message Date
Your Name 0435d08568 RemoveAlwaysElseRector 6 days ago
Your Name a2e38e5ffe CompactToVariablesRector 6 days ago
Your Name 5949dc21c1 UseIdenticalOverEqualWithSameTypeRector 6 days ago
Your Name 0d999f5dda added return type to function 6 days ago
Your Name c57e5d8ed7 adding type 6 days ago
Your Name 9e052883bf StrContains 6 days ago
Your Name 5ebc1af91e BATCH 1 6 days ago
Shlee 9ec46005df
Merge pull request #7309 from pixelfed/feature/laravel-cap
Refactor: Captcha provider - HCaptcha, Turnstile and Cap
1 week ago
Your Name 6c90810f4a Fix AdminDirectoryController 500 on media_types validation
The media_types closure validator called $value->toArray(), but the
value is a plain PHP array (built via explode()), causing a fatal
'Call to a member function toArray() on array' and a 500 when opening
the Directory admin view.

Normalize to an array before in_array() checks, handling both array
and Collection inputs.

Fixes #7311
1 week ago
Your Name afe2bb6d1d polish 1 week ago
Your Name 40fc084167 polish 1 week ago
Your Name 136e79885b polish 1 week ago
Your Name edde5b985f polish 1 week ago
Your Name 566c5503d3 polish 1 week ago
Your Name ababab30ed polish 1 week ago
Your Name 163cd9f589 polish 1 week ago
Your Name e3b6cebf27 Fix MariaDB driver detection and reblog caption null inserts
Laravel 11 exposes MariaDB as a dedicated 'mariadb' driver, so
config('database.default') === 'mysql' checks silently misclassified
MariaDB as the non-mysql (postgres) branch.

- Add App\Util\Database\DatabaseDriver with isMysqlLike()/isPgsql()
  plus db_is_mysql_like()/db_is_pgsql() global helpers.
- Route all database.default driver checks through the helpers so
  MySQL and MariaDB are treated as one group.
- Use '' (not null) for share/compose caption+rendered, valid whether
  the column is nullable or NOT NULL (it is NOT NULL on MySQL/MariaDB).
- Guard pgsql strtolower() in registration against missing fields.
- Scope CustomEmoji::duplicateShortcodes to the grouped column for
  Postgres GROUP BY validity.
- Remove stale Postgres guard in status:dedup; use havingRaw for
  cross-driver HAVING.
1 week ago
Shlee 140221fe90
Merge pull request #7192 from pixelfed/refactor/str-of-to-native
Laravel 13 Prep: Replace Str::of() fluent chains with static Str::/native calls
2 weeks ago
Your Name a424493420 Replace Str::of() fluent chains with static Str::/native calls
Aligns with the app's dominant convention (171 static Str:: calls vs
24 Str::of() chains). Uses Str::afterLast() for the repeated
"segment after last slash" pattern, Str::matchAll() where a
Collection return is needed, and native explode()/substr() where a
plain array/string suffices.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 weeks ago
Your Name 277b8aa970 Use now() helper instead of Carbon::now() for current-time access
Aligns with the app's dominant convention (413 now()/today() call
sites vs 12 Carbon::now()). Carbon::parse() calls are untouched since
they parse arbitrary date strings, not current-time access.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 weeks ago
Daniel Supernault 1d96c94054
Refactor Auth, remove expensive middleware 2 weeks ago
Your Name 6d8ad3885a Convert string class references to ::class
Applies the ::class conversion from pixelfed-staging PR #9 (patch 1/21),
formatted with Pint (short imported ::class form). Excludes the
ModelNamespaceMigrationTest namespace assertions, which intentionally
compare against literal namespace strings.
3 weeks ago
Your Name 9db2218ca6 chore: move resources/lang to top-level lang/ per Laravel 9+ convention
- Relocate translation files from resources/lang to lang/ via git mv
- Update PHP references to use the lang_path() helper
- Update crowdin.yml source/translation paths
- Update phpstan.neon translationDirectories
3 weeks ago
Shlee 45e4de3928
Add success message for profile update action 3 weeks ago
Shlee 10ae3fa8cb
Update AdminReportController.php 3 weeks ago
Daniel Supernault 0679216fa2
Update AdminReportController 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
Your Name 54cfdf3c2b refactor: add return type declarations to controller methods
Adds explicit return type declarations to 498 controller methods
across 88 files. Types inferred from return statements:

- JsonResponse for response()->json() returns
- RedirectResponse for redirect()/back() returns
- View (contract) for view() returns
- Response for response() returns
- void for methods with no return value
- array for array returns
- string/int/bool for scalar returns

Also fixes 3 methods with incorrect bare returns:
- AvatarController::deleteAvatar - bare return → json response
- ImportPostController::checkPermissions - bare return → true
- RemoteAuthController::accountToId - bare return → empty array
4 weeks ago
Your Name ccd75dd903 fix: resolve undefined variable bugs (phpstan variable.undefined)
- AdminReportController: fix closure param name and remove reference to
  undefined $meta variable
- GroupsPostController: replace $status with $gp (the actual GroupPost
  variable in scope)
- PortfolioController: replace undefined $metadata with null
- DeleteWorker: remove Cache::set() call with undefined $key
4 weeks ago
Your Name c807a8524c refactor: replace short facade aliases with fully-qualified imports
Convert all 273 short facade alias imports (e.g. 'use Cache;') to their
fully-qualified class names (e.g. 'use Illuminate\Support\Facades\Cache;')
across 193 files.

This resolves 643 PHPStan 'class.notFound' errors caused by the static
analyzer being unable to resolve global aliases, and aligns with modern
Laravel conventions. It also unblocks removing the aliases array from
config/app.php in a future change.

All 107 tests pass.
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
Shlee c2044f77cf
Update AdminUserController.php 1 month ago
Daniel Supernault 374344754e
Lint 9 months ago
dansup f783db493a
Merge pull request #6340 from grossermensch/patch-3
Allow to set new image types in admin interface
10 months ago
Severin df5814d0f8
Allow to set new image types in admin interface 10 months ago
Your Name 45a9a3b472 RemoveUnreachableStatementRector 11 months ago
Daniel Supernault cc90df9d8c
Add user admin toggles for email and ip 11 months ago
Ross Bearman db03733415 Add admin invite interface and email support
This commit does two things:

* Add invite email support to AdminInviteCommand
  - Moves `invite_code` generation to AdminInvite model `creating` event
* Add admin invite management section under admin users dashboard
  - Adds `Admin/AdminUserInviteController` and associated `home` and
    `create` Blade templates.
  - Adds "Invites" button to admin user dashboard
1 year ago
Daniel Supernault b6bc1e50e2
Update Admin Users dashboard 1 year ago
Daniel Supernault 7ddbe0c473
Add AVIF support 2 years ago
Daniel Supernault 599a36f4aa
Update AdminSettingsController, persist updates to ConfigCacheService 2 years ago
Daniel Supernault aa44835434
Update AdminSettingsController, increase max photo size limit from 50MB to 1GB 2 years ago
Daniel Supernault 28990280ef
Update AdminReportController 2 years ago
Daniel Supernault ed9f2fbb09
Update AdminReportController 2 years ago
Daniel Supernault c0478f5f8f
Update AdminReportController 2 years ago
Daniel Supernault 06ebb514d7
Update AdminReportController 2 years ago
Anil Kulkarni 9db038e4bb
Check for oauth keys from the config, as well as from disk 2 years ago
Daniel Supernault ea2a9eb42a
Add Authorized Fetch 2 years ago
Daniel Supernault 3d6b9badf4
Add groups models, controllers and services 2 years ago