[PR #543] [MERGED] Make doctrine a Light-weight distribution package in Composer #8353

Closed
opened 2026-01-22 15:59:31 +01:00 by admin · 0 comments
Owner

📋 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: masterHead: master


📝 Commits (4)

📊 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.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/543 **Author:** [@carlosbuenosvinos](https://github.com/carlosbuenosvinos) **Created:** 12/28/2012 **Status:** ✅ Merged **Merged:** 1/19/2013 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (4) - [`0577f73`](https://github.com/doctrine/orm/commit/0577f73ef55375bb67e52600f45de0433d5f4a19) Make doctrine light-weight for composer - [`9354e70`](https://github.com/doctrine/orm/commit/9354e70fd3f119e07a926c2a4c4095e69b3a7105) Make doctrine a light-weight package based in http://getcomposer.org/doc/02-libraries.md#light-weight-distribution-packages - [`2eb4849`](https://github.com/doctrine/orm/commit/2eb4849a69dac81c42d468e43abfa7d5f3520eeb) XSD, license and upgrade should be distributed - [`1b5d431`](https://github.com/doctrine/orm/commit/1b5d4316fe9addc1335335ca341fa59c6ad92939) Update .gitattributes ### 📊 Changes **1 file changed** (+13 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.gitattributes` (+13 -0) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:59:31 +01:00
admin closed this issue 2026-01-22 15:59:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8353