Conversation
Add .gitattributes with export-ignore rules for development and CI files. This ensures that archives generated via git archive or GitHub do not include unnecessary files like tests and configurations.
Contributor
There was a problem hiding this comment.
馃煛 Changes recommended
Keep composer.json in distributed archives.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds .gitattributes rules to reduce Composer archive size by excluding development-only files.
Changes:
- Excludes CI, tests, configuration, metadata, and documentation files.
composer.jsonmust remain included in distributions.
File summaries
| File | Description |
|---|---|
.gitattributes |
Adds archive exclusion rules. Critical (1 vote): excluding composer.json prevents standalone Composer installation and inspection. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| .gitattributes export-ignore | ||
| .gitignore export-ignore | ||
| alchemy.yml export-ignore | ||
| composer.json export-ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (pls check at least one)
https://getcomposer.org/doc/02-libraries.md[#](https://getcomposer.org/doc/02-libraries.md#light-weight-distribution-packages)light-weight-distribution-packages
.gitattributes allows you to drastically reduce the size of packages installable with composer, by not including files that are irrelevant to the package's client developer.
Consider that:
xychart-beta title "Composer Package Size Comparison (KB)" x-axis ["Before", "After"] y-axis "Size (KB)" 0 --> 130 bar [120, 62.94]Listado de rutas de carpetas para el volumen SYSTEM El n路mero de serie del volumen es 0AB2-FA6B C:. | composer.json \---vendor +---leafs | +---auth - | | | .env.example.php - | | | .gitignore - | | | alchemy.yml - | | | composer.json - | | | phpstan-baseline.neon - | | | README.md | | | - | | +---.github - | | | \---workflows - | | | ... | | | | | +---src | | | | ... | | | - | | \---tests - | | ...See one example: https://github.com/flightphp/core/releases/tag/v3.5.0
Description
This pull request adds export-ignore rules to the
.gitattributesfile, ensuring that several configuration, test, and documentation files are excluded when creating source code archives. This helps reduce archive size and prevents unnecessary files from being distributed.Does this PR introduce a breaking change? (check one)