coolify/app/Livewire/Server
Andras Bacsai f77ad4cbd9 Complete Livewire legacy model binding migration (25+ components)
This completes the migration from Livewire's legacy `id="model.property"`
pattern to explicit properties with manual synchronization. This allows
disabling the `legacy_model_binding` feature flag.

**Components Migrated (Final Session - 9 components):**
- Server/Proxy.php (1 field)
- Service/EditDomain.php (1 field) - Fixed Collection/string bug & parent sync
- Application/Previews.php (2 fields - array handling)
- Service/EditCompose.php (4 fields)
- Service/FileStorage.php (6 fields)
- Service/Database.php (7 fields)
- Service/ServiceApplicationView.php (10 fields)
- Application/General.php (53 fields) - LARGEST migration
- Application/PreviewsCompose.php (1 field)

**Total Migration Summary:**
- 25+ components migrated across all phases
- 150+ explicit properties added
- 0 legacy bindings remaining (verified via grep)
- All wire:model, id, @entangle bindings updated
- All updater hooks renamed (updatedApplicationX → updatedX)

**Technical Changes:**
- Added explicit public properties (camelCase)
- Implemented syncData(bool $toModel) bidirectional sync
- Updated validation rules (removed model. prefix)
- Updated all action methods (mount, submit, instantSave)
- Fixed updater hooks: updatedBuildPack, updatedBaseDirectory, updatedIsStatic
- Updated Blade views (id & wire:model bindings)
- Applied Collection/string confusion fixes
- Added model refresh + re-sync pattern

**Critical Fixes:**
- EditDomain.php Collection/string confusion (use intermediate variables)
- EditDomain.php parent component sync (refresh + re-sync after save)
- General.php domain field empty (syncData at end of mount)
- General.php wire:model bindings (application.* → property)
- General.php updater hooks (wrong naming convention)

**Files Modified:** 34 files
- 17 PHP Livewire components
- 17 Blade view templates
- 1 MIGRATION_REPORT.md (documentation)

**Ready to disable legacy_model_binding flag in config/livewire.php**

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 15:38:59 +02:00
..
CaCertificate refactor: replace direct SslCertificate queries with server relationship methods for consistency 2025-10-09 17:00:05 +02:00
CloudProviderToken improved hetzner features 2025-10-09 12:53:57 +02:00
New feat: add clear button for cloud-init script dropdown 2025-10-11 18:51:29 +02:00
PrivateKey feat(private-key-refresh): add refresh dispatch on private key update and connection check 2025-09-23 16:49:59 +02:00
Proxy Revert "refactor(file-transfer): replace base64 encoding with direct file transfer method in various components for improved clarity and efficiency" 2025-09-15 17:56:48 +02:00
Security fix(security): implement authorization checks for terminal access management 2025-09-25 11:45:07 +02:00
Advanced.php refactor(dashboard): remove deployment loading logic and introduce DeploymentsIndicator component for better UI management 2025-09-30 11:43:30 +02:00
Charts.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
CloudflareTunnel.php feat(auth): implement authorization checks for server updates across multiple components 2025-08-22 13:02:11 +02:00
Create.php improved hetzner features 2025-10-09 12:53:57 +02:00
Delete.php work work on hetzner integration 2025-10-09 16:54:13 +02:00
Destinations.php feat(auth): implement authorization for Docker and server management 2025-08-22 14:04:25 +02:00
DockerCleanup.php feat(auth): implement authorization checks for server updates across multiple components 2025-08-22 13:02:11 +02:00
DockerCleanupExecutions.php feat: Docker cleanup executions UI 2025-01-15 20:11:40 +01:00
Index.php Fix styling 2024-06-10 20:43:34 +00:00
LogDrains.php feat(auth): implement authorization checks for server updates across multiple components 2025-08-22 13:02:11 +02:00
Navbar.php fix: streamline proxy status handling in StartProxy and Navbar components 2025-10-10 10:41:58 +02:00
Proxy.php Complete Livewire legacy model binding migration (25+ components) 2025-10-13 15:38:59 +02:00
Resources.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
Show.php fix: correct dispatch logic for Hetzner server status refresh in checkHetznerServerStatus method 2025-10-10 10:13:14 +02:00
ValidateAndInstall.php feat: add retry functionality for server validation process 2025-10-10 10:13:08 +02:00