Skip to content

Update Project Dependencies and Refactor Livewire Components#1109

Merged
curtisdelicata merged 1 commit intomainfrom
sweep/Update-Project-Dependencies-and-Refactor-Livewire-Components
Mar 22, 2025
Merged

Update Project Dependencies and Refactor Livewire Components#1109
curtisdelicata merged 1 commit intomainfrom
sweep/Update-Project-Dependencies-and-Refactor-Livewire-Components

Conversation

@sweep-ai-deprecated
Copy link
Copy Markdown
Contributor

This pull request was created by Sweep to resolve the following request by @curtisdelicata:

Refactor everything to php 8.4 support and better coding methods including composer.json and all classes

Continue chatting at https://app.sweep.dev/c/572333c2-1a06-4f54-afd5-ed5e3a71039f.

Purpose

Modernize the genealogy application by updating dependencies, improving type safety, and refactoring Livewire components to leverage the latest Laravel and Livewire features.

Description

This pull request introduces several key improvements to the project:

  • Updated PHP and package dependencies to their latest versions
  • Refactored Livewire components to use modern Laravel and Livewire 3.x syntax
  • Improved type safety and code quality in key components
  • Simplified component logic and error handling
  • Migrated from event emission to event dispatching
  • Added stricter type declarations

The changes focus on three main Livewire components:

  1. EditProfile: Modernized profile editing with new validation approach
  2. FamilyTreeBuilder: Improved type safety and simplified data processing
  3. DescendantChartComponent: Refined data retrieval and processing logic

Summary

Dependency Updates

  • PHP version bumped to ^8.4
  • Updated key packages:
    • filament-spatie-roles-permissions to ^3.0
    • laravel-dna to ^2.0
    • laravel-gedcom to ^5.0
    • spatie-laravel-menu to ^5.0

Refactored Components

  • Converted EditProfile to use Livewire 3.x attributes
  • Improved error handling in FamilyTreeBuilder
  • Simplified data processing in DescendantChartComponent

Key Changes

  • Replaced $this->emit() with $this->dispatch()
  • Added type declarations
  • Utilized PHP 8.x features like constructor property promotion
  • Improved null safety with null coalescing operators

@curtisdelicata curtisdelicata merged commit 67f9848 into main Mar 22, 2025
1 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant