Skip to content

Commit f81ca4b

Browse files
jrfnlsirbrillig
authored andcommitted
Add .gitattributes (#163)
This makes the release zips used by Packagist smaller as it doesn't ship the test or config files which end-users shouldn't need anyway. Co-authored-by: jrfnl <[email protected]>
1 parent 6774484 commit f81ca4b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.gitattributes

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Exclude these files from release archives.
3+
# This will also make them unavailable when using Composer with `--prefer-dist`.
4+
# If you develop for this repo using Composer, use `--prefer-source`.
5+
# https://www.reddit.com/r/PHP/comments/2jzp6k/i_dont_need_your_tests_in_my_production
6+
# https://blog.madewithlove.be/post/gitattributes/
7+
#
8+
/.gitattributes export-ignore
9+
/.gitignore export-ignore
10+
/composer.circleci.json export-ignore
11+
/phpcs.xml.dist export-ignore
12+
/phpstan.neon.dist export-ignore
13+
/phpunit.xml.dist export-ignore
14+
/phpunit.circleci.xml export-ignore
15+
/.circleci/ export-ignore
16+
/VariableAnalysis/Tests/ export-ignore
17+
18+
#
19+
# Auto detect text files and perform LF normalization
20+
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
21+
#
22+
* text=auto
23+
24+
#
25+
# The above will handle all files NOT found below
26+
#
27+
*.md text
28+
*.php text
29+
*.inc text

0 commit comments

Comments
 (0)