From eae10a8fc9379781b82e877f9a87518d3ff81b27 Mon Sep 17 00:00:00 2001 From: Gustavo Freze Date: Tue, 21 Apr 2026 18:32:49 -0300 Subject: [PATCH] chore: Add .gitignore and .gitattributes for repo hygiene. Prevent agent/IDE folders (.claude, .idea, .vscode) from being versioned and exclude dev-only files (tests, phpstan, phpcs, phpunit configs) from the Packagist tarball via export-ignore. --- .gitattributes | 42 +++++++++++++++--------------------------- .gitignore | 23 ++++++++++++++++++----- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/.gitattributes b/.gitattributes index 01f4189..d641a25 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,30 +1,18 @@ -# Auto detect text files and perform LF normalization * text=auto eol=lf -# ─── Diff drivers ──────────────────────────────────────────── -*.php diff=php -*.md diff=markdown +*.php text diff=php -# ─── Force LF ──────────────────────────────────────────────── -*.sh text eol=lf -Makefile text eol=lf - -# ─── Generated (skip diff and GitHub stats) ────────────────── -composer.lock -diff linguist-generated - -# ─── Export ignore (excluded from dist archive) ────────────── -/tests export-ignore -/vendor export-ignore -/rules export-ignore - -/.github export-ignore -/.gitignore export-ignore -/.gitattributes export-ignore - -/CLAUDE.md export-ignore -/LICENSE export-ignore -/Makefile export-ignore -/README.md export-ignore -/phpunit.xml export-ignore -/phpstan.neon.dist export-ignore -/infection.json.dist export-ignore +# Dev-only — excluded from the Packagist tarball +/.github export-ignore +/tests export-ignore +/.claude export-ignore +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/phpunit.xml.dist export-ignore +/phpstan.neon.dist export-ignore +/phpcs.xml.dist export-ignore +/infection.json export-ignore +/Makefile export-ignore +/CONTRIBUTING.md export-ignore +/CHANGES.md export-ignore diff --git a/.gitignore b/.gitignore index 85fc064..bd5baa3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,20 @@ -.idea +# Agent/IDE +.claude/ +.idea/ +.vscode/ +.cursor/ -vendor -report +# Composer +/vendor/ +composer.lock -*.lock -.phpunit.* +# PHPUnit / coverage +.phpunit.cache/ +.phpunit.result.cache +report/ +coverage/ +build/ + +# OS +.DS_Store +Thumbs.db