# Local Baseline Before Laravel 12 Upgrade

## Guardrail

All work is local-only in `c:\Users\Fatih\Desktop\new\markest-local\propturk`.

No live server work is allowed.

## Verified Commands

- `php -v`: PHP `8.2.29`
- `composer --version`: Composer `2.9.5`
- `php artisan --version`: Laravel `8.83.29`
- `node -v`: `20.20.2`
- `npm -v`: `10.8.2`
- `composer validate --no-check-publish`: passed
- `php artisan route:list`: passed
- `php artisan route:list --json`: passed
- `php artisan view:cache`: passed
- `php artisan test`: passed, 2 default tests only
- `php artisan migrate:status`: passed, with one pending migration

## Route Baseline

Total routes: 94

- Admin: 48
- API: 2
- Auth: 11
- Public: 20
- Realtime/WebSocket/Broadcast: 6
- User: 7

## Local Data Counts

Observed from local DB:

- `users`: 181
- `banks`: 13
- `properties`: 205
- `posts`: 205
- `offers`: 112
- `documents`: 18
- `notification_logs`: 2653
- `archive_files`: 342

This means upgrade testing can use real local data, not only empty fixtures.

## Migration State

Pending migration:

- `2022_12_21_183247_add_archive_folder_to_posts_table`

This is a blocking data-risk item because code uses `posts.archive_folder` for:

- Admin archive file index
- Archive upload
- Archive delete
- Archive download
- Post boot archive folder creation

Before the actual framework upgrade, this must be handled deliberately:

1. Confirm whether the local `posts` table already has `archive_folder`.
2. If missing, decide whether to run the pending migration locally before baseline browser testing.
3. If present but migration status is pending, fix the migration tracking state carefully.

Do not make that DB change without explicit approval.

## Business-Surface Baseline

This project is a bank/real-estate tender platform.

Primary modules:

- Public listing/search/detail pages
- User registration/login/profile/SMS activation
- Tender permission, bidding, fast buy, favorites
- Admin bank/document/property/user/log management
- Property image upload/delete
- Archive file upload/delete/download
- Contract and tender report PDF generation
- Mail and SMS notification logging
- JWT API for realty data
- Realtime private bid updates through Echo/Pusher-compatible WebSockets
- Scheduler and queue processing

## Current Major Upgrade Blockers

- `beyondcode/laravel-websockets`: not Laravel 12 compatible, abandoned
- `tymon/jwt-auth`: current installed line not Laravel 12 compatible
- `fruitcake/laravel-cors`: abandoned, not Laravel 12 compatible
- `cviebrock/eloquent-sluggable`: current version Laravel 8-only
- `laravel/sanctum`: current version old
- `laravel/ui`: current version old
- `barryvdh/laravel-dompdf`: current installed version supports through Laravel 11
- `spatie/laravel-sitemap`: current installed version old
- `facade/ignition`, old `collision`, old Symfony/Flysystem/Monolog/Carbon stack

## Upgrade Policy

Do not jump directly from Laravel 8 to Laravel 12.

Required stages:

1. Laravel 8 to 9
2. Laravel 9 to 10
3. Laravel 10 to 11
4. Laravel 11 to 12

After each stage:

- Compare route count and route names.
- Re-run `view:cache`.
- Re-run tests.
- Re-run local browser/page checks.
- Re-run API checks.
- Re-run selected PDF/upload/archive/bid checks.
- Do not proceed if tester coverage has gaps.
