feat: add HasCompositePrimaryKey trait for composite primary key support
CD - Déploiement continu / deploy (push) Successful in 3m7s
CI - Intégration continue / quality-and-tests (push) Failing after 2m30s

- Introduced a new trait `HasCompositePrimaryKey` to enable Eloquent models to handle composite primary keys, which are not supported natively by Eloquent. The trait requires models to implement a method to define the composite key columns and manages key retrieval for save and select queries.

chore: add GrumPHP configuration for pre-commit checks

- Added a `grumphp.yml` configuration file to enforce code style and static analysis checks before commits. This setup includes Laravel Pint for code style and Larastan for static analysis, ensuring code quality and consistency.

chore: create PHPStan configuration file

- Created a `phpstan.neon` file to configure PHPStan with Larastan for static analysis. The configuration specifies the paths to analyze and sets the analysis level to 5 for a balance between catching bugs and avoiding excessive strictness.
This commit is contained in:
Azmog
2026-07-06 12:02:55 +02:00
parent ad6b6eb047
commit 1e6557729f
7 changed files with 2737 additions and 3 deletions
+4 -1
View File
@@ -12,11 +12,13 @@
},
"require-dev": {
"fakerphp/faker": "^1.23",
"larastan/larastan": "^3.10",
"laravel/pail": "^1.2.2",
"laravel/pint": "^1.24",
"laravel/sail": "^1.41",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6",
"phpro/grumphp": "^2.22",
"phpunit/phpunit": "^11.5.50"
},
"autoload": {
@@ -78,7 +80,8 @@
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
"php-http/discovery": true,
"phpro/grumphp": true
}
},
"minimum-stability": "stable",