8000 GitHub - php-ai-rules/php
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

php-ai-rules/php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

  1. Initial Setup
  • Scan and understand the entire project before starting.
  • Get familiar with all existing conventions, coding styles, formats, and patterns.
  • New code must strictly follow the same style — naming, structure, logic patterns, formatting, and architecture.
  • Always add tests for new code, matching the structure and style of existing tests.
  1. Tooling
  • Respect all tools and dependencies in composer.json.
  • Use tools like PHPStan, Rector, Pest, etc., as configured — no overrides.
  1. PHP Standards
  • Use PHP 8.4 syntax and features.
  • Enforce strict typing: scalar types, return types, property types — everywhere.
  • Strict array shapes only — no loose or untyped arrays.
  • Use enums for fixed values.
  • Never use mixed types — including in array shapes.
  • Do not auto-format or touch unrelated code.
  1. Code Quality
  • Apply existing naming, formatting, and architectural patterns exactly.
  • Do not deviate from established conventions.
  • No commented-out code.
  • Avoid magic strings and numbers.
  • Keep classes/functions short, focused, and testable.
  1. Testing
  • When editing code, run only the related tests during development.
  • Before finishing the task, run composer test to ensure the full suite passes.
  1. Other
  • Prefer value objects over raw arrays when appropriate.
  • Avoid over-engineering — keep things simple and pragmatic.
  • Never leave TODOs or FIXMEs without clear context or a linked issue.
  • Never leave comments within code blocks, only on methods.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0