mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #543] [MERGED] Make doctrine a Light-weight distribution package in Composer #8353
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/543
Author: @carlosbuenosvinos
Created: 12/28/2012
Status: ✅ Merged
Merged: 1/19/2013
Merged by: @beberlei
Base:
master← Head:master📝 Commits (4)
0577f73Make doctrine light-weight for composer9354e70Make doctrine a light-weight package based in http://getcomposer.org/doc/02-libraries.md#light-weight-distribution-packages2eb4849XSD, license and upgrade should be distributed1b5d431Update .gitattributes📊 Changes
1 file changed (+13 additions, -0 deletions)
View changed files
➕
.gitattributes(+13 -0)📄 Description
In order to save space and bandwidth when installing doctrine using Composer, I have added .gitattributes removing files and folders unnecessary when using doctrine as a dependecy.
(extracted from http://getcomposer.org/doc/02-libraries.md#light-weight-distribution-packages)
Including the tests and other useless information like .travis.yml in distributed packages is not a good idea.
The .gitattributes file is a git specific file like .gitignore also living at the root directory of your library. It overrides local and global configuration (.git/config and ~/.gitconfig respectively) when present and tracked by git.
Use .gitattributes to prevent unwanted files from bloating the zip distribution packages.
// .gitattributes
/Tests export-ignore
phpunit.xml.dist export-ignore
Resources/doc/ export-ignore
.travis.yml export-ignore
Test it by inspecting the zip file generated manually:
git archive branchName --format zip -o file.zip
Note: Files would be still tracked by git just not included in the distribution. This will only work for GitHub packages installed from dist (i.e. tagged releases) for now.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.