Commit Graph

106 Commits (94362ba8b90c75d15e3f8261b2ba1d4e8075cff8)

Author SHA1 Message Date
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
Shlee f13a891ff4
Update AppServiceProvider.php 4 weeks ago
dansup e1b60d070b
Merge pull request #6882 from pixelfed/shleeable-patch-2
Refactor: Add additional strict modes for testing environments only
4 weeks ago
Shlee de8de9251b
Update AppServiceProvider.php 4 weeks ago
Shlee 1ae0feb129
Update AppServiceProvider.php 4 weeks ago
dansup e0876c8a97
Merge pull request #6878 from pixelfed/fix/mysql-strict-mode
fix: enable MySQL strict mode and remove defaultStringLength(191)
4 weeks ago
Shlee c04fec21fc
Update model loading behavior in AppServiceProvider 4 weeks ago
Your Name 1b64c59beb fix: enable MySQL strict mode and remove defaultStringLength(191)
- Enable strict mode for MySQL connection to prevent silent data
  truncation, zero-date insertion, and division-by-zero errors.
- Remove Schema::defaultStringLength(191) which was a MySQL 5.7
  workaround no longer needed on MySQL 8.0+ / MariaDB 10.3+.
4 weeks ago
Shlee 0837968fad
Update AppServiceProvider.php 4 weeks ago
Your Name ed90e619fb feat: add throttle:api middleware to the api route group
Adds a global rate limiter (240 req/min per user or IP) to all API
routes. Previously rate limiting was only applied ad-hoc on individual
routes, leaving some endpoints unprotected.
4 weeks ago
Your Name c891f34df6 polish 4 weeks ago
Your Name 5a364be58b fix: remove deprecated Passport::personalAccessClientId() and enableImplicitGrant()
- Remove Passport::personalAccessClientId() (removed in Passport v13, auto-discovers now)
- Remove Passport::enableImplicitGrant() (legacy grant, no clients use it)
- Flatten config instance.oauth.pat to pat_enabled (remove dead pat.id key)
- Add OAUTH_PAT_ENABLED=false to .env.example and .env.docker.example
- Show swal alert when PATs disabled instead of hidden API error
- Improve store() error handling to surface 403 messages in the UI
- Remove OAUTH_PAT_ID row from admin diagnostics blade
4 weeks ago
Shlee 572047280f
Merge pull request #6830 from pixelfed/refactor/modern-bootstrap-app
refactor: migrate to modern Laravel 13+ bootstrap/app.php
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 8e41f6fdf8 refactor: migrate to modern bootstrap/app.php architecture
Consolidate the legacy Laravel 5-era kernel/handler architecture into
the modern Application::configure() pattern introduced in Laravel 11:

- HTTP middleware stack → bootstrap/app.php withMiddleware()
- Console schedule → bootstrap/app.php withSchedule()
- Exception handling → bootstrap/app.php withExceptions()
- Route registration → bootstrap/app.php withRouting()
- Service providers → bootstrap/providers.php

Deleted files:
- app/Http/Kernel.php
- app/Console/Kernel.php
- app/Exceptions/Handler.php
- app/Providers/RouteServiceProvider.php
- app/Providers/BroadcastServiceProvider.php

Removed framework providers from config/app.php (auto-registered by
Application::configure). Package providers use auto-discovery.

All 107 tests pass. Schedule, routes, and middleware verified working.
4 weeks ago
Your Name 741bc995ca refactor: use ::class syntax in EventServiceProvider
Replace string-based event class references with proper ::class imports
for better IDE support and static analysis compatibility.
4 weeks ago
Your Name 28927f6f66 refactor: convert string-based routes to ::class array syntax
Replace all 'Controller@method' string references with
[Controller::class, 'method'] array syntax across all route files.
Remove the $namespace property and ->namespace() calls from
RouteServiceProvider.

This is required for Laravel 13 compatibility where string-based
controller routing and automatic namespace prefixing will be removed.

742 route references converted across 5 route files.
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
Daniel Supernault 40aef7a212
Update GroupsFeedController 1 month ago
Daniel Supernault 0f781cba34
Update Personal Access Tokens 3 months ago
Daniel Supernault e557d37b9e
Fix PAT 3 months ago
Daniel Supernault ef803ae9b6
Fix oauth/token 6 months ago
Daniel Supernault f6746aec8b
Update AuthServiceProvider 7 months ago
Daniel Supernault 695e851026
Fix oauth 7 months ago
Daniel Supernault a1410a826e
Update Passport 7 months ago
Daniel Supernault 80a2f4f2b0
Add api/v1/accounts/lookup endpoint 8 months ago
Daniel Supernault 030be10689
Fix RSP 9 months ago
Daniel Supernault 53742fa699
Lint 9 months 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 a7f0c45505
Update AppServiceProvider.php 2 years ago
Daniel Supernault dbd1e17b25
Add app register email verify resends 2 years ago
Anil Kulkarni 972b299025
Prevent pulse crash when it is not configured 2 years ago
Daniel Supernault 4e6e6b4ab7
Update routes 2 years ago
Daniel Supernault f8dc50ebd3
Update AppServiceProvider.php 2 years ago
Daniel Supernault 3c249616ef
Add rate limits, fix typo and styling 2 years ago
Daniel Supernault ea17e24281
Update asp 2 years ago
Daniel Supernault 3d67d5a369
Add Pulse 2 years ago
Daniel Supernault 8afbdb03a8
Fix oauth oob (urn:ietf:wg:oauth:2.0:oob) support. Fixes #2522 2 years ago
daniel 1dbcdee289
Merge branch 'staging' into feat/implement-admin-domain-blocks-api 2 years ago
Daniel Supernault a5946f590b
Update AppServiceProvider 2 years ago
Emelia Smith fcdfc73eaf
Remove production environment check in AuthServiceProvider
This check resulted in the /oauth/scopes route returning nothing, meaning in development you couldn't use access tokens with scopes; It probably also affected other logic
3 years ago
Emelia Smith 4afe72e62f
Add oauth protection to admin domain blocks API 3 years ago
Daniel Supernault ce228f7fa4
Update oauth setting, use config_cache 3 years ago
Daniel Supernault bc4d223714
Update routes 3 years ago
Daniel Supernault 7a7b4bc717
Update AuthServiceProvider 3 years ago
Emelia Smith 9330cd02f7
Implement proper OAuth authorization on Admin API endpoints 3 years ago
Daniel Supernault 7dbdbf15a5
Add Roles & Parental Controls 3 years ago
Daniel Supernault add5eaf094
Fix CI 3 years ago