-
Notifications
You must be signed in to change notification settings - Fork 10
Refactor and Update Existing Code #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Refactor and Update Existing Code #28
Conversation
- 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>
This reverts commit 39e0964.
- 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>
There was a problem hiding this 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.
33d6284 to
c8f9e54
Compare
This refactoring improves code quality, type safety, and brings dependencies up to date with the latest security patches.
🤖 Generated with Claude Code