Skip to content

Conversation

@39ff
Copy link
Owner

@39ff 39ff commented Oct 25, 2025

  • Add strict type declarations to all service classes and models
  • Implement constructor property promotion in controllers (PHP 8.0+)
  • Refactor Service classes to use findOr() instead of manual null coalescing
  • Update composer.json dependencies to latest compatible versions:
    • Laravel Framework: ^10.4 → ^10.48
    • Guzzle: ^7.2 → ^7.9
    • PHPUnit: ^9.5 → ^10.5
    • Other dev dependencies updated
  • Update package.json dependencies to latest versions:
    • axios: ^0.25 → ^1.7.9
    • bootstrap: ^5.1.3 → ^5.3.3
    • sass: ^1.32.11 → ^1.83.4
    • All other packages updated to latest compatible versions

This refactoring improves code quality, type safety, and brings dependencies up to date with the latest security patches.

🤖 Generated with Claude Code

- Add strict type declarations to all service classes and models
- Implement constructor property promotion in controllers (PHP 8.0+)
- Refactor Service classes to use findOr() instead of manual null coalescing
- Update composer.json dependencies to latest compatible versions:
  - Laravel Framework: ^10.4 → ^10.48
  - Guzzle: ^7.2 → ^7.9
  - PHPUnit: ^9.5 → ^10.5
  - Other dev dependencies updated
- Update package.json dependencies to latest versions:
  - axios: ^0.25 → ^1.7.9
  - bootstrap: ^5.1.3 → ^5.3.3
  - sass: ^1.32.11 → ^1.83.4
  - All other packages updated to latest compatible versions

This refactoring improves code quality, type safety, and brings dependencies up to date with the latest security patches.

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove outdated composer.lock file
- Update GitHub Actions workflow to use 'composer update' instead of 'composer install'
- This ensures dependencies are installed with the latest composer.json changes

The composer.lock file will be regenerated during CI execution with the updated dependencies.

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Add 'composer update --lock' before 'composer install' in CI workflow
- This updates composer.lock to match composer.json changes without changing package versions
- Reverted previous commit that deleted composer.lock (keeping lock files is best practice)

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

Co-Authored-By: Claude <noreply@anthropic.com>
@39ff 39ff requested a review from Copilot October 25, 2025 08:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the codebase by updating dependencies to their latest compatible versions and refactoring code to leverage modern PHP 8.0+ features. The changes focus on improving type safety, code quality, and maintainability.

Key changes:

  • Updated all Composer and NPM dependencies to latest versions with security patches
  • Refactored service classes to use Laravel's findOr() method instead of manual null coalescing
  • Implemented constructor property promotion and strict type declarations across controllers and services

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Updated all NPM dependencies to latest compatible versions including axios, bootstrap, sass, and related packages
composer.json Updated Laravel framework, Guzzle, PHPUnit, and other PHP dependencies to latest versions
app/Services/UserService.php Added strict type hints and refactored to use findOr() method
app/Services/SquidUserService.php Added strict type hints and refactored to use findOr() method
app/Services/SquidAllowedIpService.php Added strict type hints and refactored to use findOr() method
app/Models/User.php Added return type declaration to password mutator
app/Http/Controllers/Gui/UserController.php Implemented constructor property promotion with readonly modifier
app/Http/Controllers/Gui/SquidUserController.php Implemented constructor property promotion with readonly modifier
.github/workflows/laravel.yml Added composer lock file update step before dependency installation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@39ff 39ff force-pushed the claude/refactor-code-updates-011CUSvxfTHSC6ieCgQxBQoB branch from 33d6284 to c8f9e54 Compare October 25, 2025 08:27
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.

3 participants