Skip to content

Drop support for Laravel 6-10, require PHP 8.3+, add new linters#12

Closed
inxilpro wants to merge 8 commits intomasterfrom
claude/linter-ignore-comments-QqxXT
Closed

Drop support for Laravel 6-10, require PHP 8.3+, add new linters#12
inxilpro wants to merge 8 commits intomasterfrom
claude/linter-ignore-comments-QqxXT

Conversation

@inxilpro
Copy link
Contributor

Summary

This PR modernizes LaraLint by dropping support for older Laravel versions and PHP versions, updating dependencies, and adding new linting capabilities for Laravel models.

Key Changes

Dependency Updates

  • PHP: Bumped minimum version from 7.3 to 8.3
  • Laravel: Dropped support for Laravel 6-10, now requires Laravel 11+ (11.0, 12.0, 13.0-dev)
  • Orchestra Testbench: Updated to 9.0+, 10.0+, 11.x-dev
  • PHPUnit: Added support for 12.5 and 13.0-dev

New Linters

  • NoGuardedOrFillable: Flags models using the $guarded or $fillable properties, encouraging use of model attributes instead
  • LintsModelRelations: New concern trait for detecting relationship methods on models
  • LintsStringCase: New concern trait for snake_case validation utilities
  • WalksModels: New concern trait for conditional walking of model classes

Code Quality Improvements

  • Refactored OrderModelMembers to use new concern traits, reducing duplication
  • Simplified printer selection in LintCommand using PHP 8.1 match expressions
  • Modernized array filtering in LintCommand::targets() using arrow functions
  • Added CLAUDE.md documentation file for AI-assisted development
  • Fixed code style issues across multiple files (spacing, return type declarations)
  • Removed unused imports and cleaned up code organization

Documentation

  • Added comprehensive CLAUDE.md guide covering:
    • Project architecture and how LaraLint works
    • Linter strategies and how to write custom linters
    • Testing patterns and available assertions
  • Updated README.md with minor formatting fixes

CI/CD

  • Updated GitHub Actions workflow to test against Laravel 10, 11, and 12
  • Adjusted matrix configuration for dependency versions

Migration Notes

Projects using LaraLint will need to:

  • Update to PHP 8.3 or higher
  • Update to Laravel 11 or higher
  • Review any custom linters for compatibility with PHP 8.3+ syntax

https://claude.ai/code/session_01X6NprU6aPVR4DqXQj6HFW9

inxilpro and others added 8 commits January 29, 2026 16:19
Implement support for ignoring linting errors via inline comments:
- @laralint-ignore: ignore errors on the same line
- @laralint-ignore-next-line: ignore errors on the following line
- @laralint-ignore-file: ignore all errors in the file

Supports optional linter names for targeted ignores:
- @laralint-ignore PreferAuthId
- @laralint-ignore PreferAuthId, SpaceAtBeginningOfComment

Works with //, #, and /* */ comment styles.

https://claude.ai/code/session_01X6NprU6aPVR4DqXQj6HFW9
@inxilpro inxilpro closed this Jan 30, 2026
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.

2 participants