Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Add .gitattributes files#23926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Closed
Closed
Add .gitattributes files#23926
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
Member
nicolas-grekas commentedAug 18, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Already proposed, discussed and rejected in eg#17749. Seeeditorconfig/editorconfig#228 for the correct place where this should be fixed. |
fabpot added a commit that referenced this pull requestSep 16, 2019
…dist" (Nyholm)This PR was merged into the 4.4 branch.Discussion----------Adding .gitattributes to remove Tests directory from "dist"| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| Deprecations? | no?| Tickets || License | MIT| Doc PR |This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.### Reasons for keeping the tests with the source* You can look at the tests to understand how the code works* It is convenientIn the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.### Reasons for removing them (merging this PR)* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`* Smaller packages when deploying with Docker or on Serverless.* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))## How to decide?Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.## Other PRs and issues related to this:Add .gitattributes file (#29277)Added .gitattributes files to root and all components (#26472)Exclude non-essential files from Composer package (#25414)[HttpFoundation] optimize files for distribution (#24427)Add .gitattributes files (#23926)[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (#20057)Add lightweight and root only .gitattributes (#18004)Add .gitattributes to exclude tests from ZIPs (#17995)[RFC] Move tests out of the source and source out of the tests (#17749)Removal of development & testing files using .gitattributes (#16174)Please add .gitattributes files and fix line endings (#13521)making use of .gitattributes (#11810)## WorkaroundsThere are workarounds for both sides. Example:### Workaround if merged* `composer update --prefer-source`### Workaround if closed* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`*editorconfig/editorconfig#228*https://github.com/dg/composer-cleanerCommits-------ac7dc24 Adding .gitattributes to remove Tests directory from "dist"
symfony-splitter pushed a commit to symfony/mailer that referenced this pull requestSep 16, 2019
…dist" (Nyholm)This PR was merged into the 4.4 branch.Discussion----------Adding .gitattributes to remove Tests directory from "dist"| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| Deprecations? | no?| Tickets || License | MIT| Doc PR |This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.### Reasons for keeping the tests with the source* You can look at the tests to understand how the code works* It is convenientIn the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.### Reasons for removing them (merging this PR)* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`* Smaller packages when deploying with Docker or on Serverless.* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))## How to decide?Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.## Other PRs and issues related to this:Add .gitattributes file (symfony/symfony#29277)Added .gitattributes files to root and all components (symfony/symfony#26472)Exclude non-essential files from Composer package (symfony/symfony#25414)[HttpFoundation] optimize files for distribution (symfony/symfony#24427)Add .gitattributes files (symfony/symfony#23926)[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (symfony/symfony#20057)Add lightweight and root only .gitattributes (symfony/symfony#18004)Add .gitattributes to exclude tests from ZIPs (symfony/symfony#17995)[RFC] Move tests out of the source and source out of the tests (symfony/symfony#17749)Removal of development & testing files using .gitattributes (symfony/symfony#16174)Please add .gitattributes files and fix line endings (symfony/symfony#13521)making use of .gitattributes (symfony/symfony#11810)## WorkaroundsThere are workarounds for both sides. Example:### Workaround if merged* `composer update --prefer-source`### Workaround if closed* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`*editorconfig/editorconfig#228*https://github.com/dg/composer-cleanerCommits-------ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist"
symfony-splitter pushed a commit to symfony/web-profiler-bundle that referenced this pull requestSep 16, 2019
…dist" (Nyholm)This PR was merged into the 4.4 branch.Discussion----------Adding .gitattributes to remove Tests directory from "dist"| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| Deprecations? | no?| Tickets || License | MIT| Doc PR |This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.### Reasons for keeping the tests with the source* You can look at the tests to understand how the code works* It is convenientIn the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.### Reasons for removing them (merging this PR)* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`* Smaller packages when deploying with Docker or on Serverless.* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))## How to decide?Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.## Other PRs and issues related to this:Add .gitattributes file (symfony/symfony#29277)Added .gitattributes files to root and all components (symfony/symfony#26472)Exclude non-essential files from Composer package (symfony/symfony#25414)[HttpFoundation] optimize files for distribution (symfony/symfony#24427)Add .gitattributes files (symfony/symfony#23926)[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (symfony/symfony#20057)Add lightweight and root only .gitattributes (symfony/symfony#18004)Add .gitattributes to exclude tests from ZIPs (symfony/symfony#17995)[RFC] Move tests out of the source and source out of the tests (symfony/symfony#17749)Removal of development & testing files using .gitattributes (symfony/symfony#16174)Please add .gitattributes files and fix line endings (symfony/symfony#13521)making use of .gitattributes (symfony/symfony#11810)## WorkaroundsThere are workarounds for both sides. Example:### Workaround if merged* `composer update --prefer-source`### Workaround if closed* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`*editorconfig/editorconfig#228*https://github.com/dg/composer-cleanerCommits-------ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist"
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestSep 16, 2019
…dist" (Nyholm)This PR was merged into the 4.4 branch.Discussion----------Adding .gitattributes to remove Tests directory from "dist"| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| Deprecations? | no?| Tickets || License | MIT| Doc PR |This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.### Reasons for keeping the tests with the source* You can look at the tests to understand how the code works* It is convenientIn the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.### Reasons for removing them (merging this PR)* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`* Smaller packages when deploying with Docker or on Serverless.* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))## How to decide?Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.## Other PRs and issues related to this:Add .gitattributes file (symfony/symfony#29277)Added .gitattributes files to root and all components (symfony/symfony#26472)Exclude non-essential files from Composer package (symfony/symfony#25414)[HttpFoundation] optimize files for distribution (symfony/symfony#24427)Add .gitattributes files (symfony/symfony#23926)[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (symfony/symfony#20057)Add lightweight and root only .gitattributes (symfony/symfony#18004)Add .gitattributes to exclude tests from ZIPs (symfony/symfony#17995)[RFC] Move tests out of the source and source out of the tests (symfony/symfony#17749)Removal of development & testing files using .gitattributes (symfony/symfony#16174)Please add .gitattributes files and fix line endings (symfony/symfony#13521)making use of .gitattributes (symfony/symfony#11810)## WorkaroundsThere are workarounds for both sides. Example:### Workaround if merged* `composer update --prefer-source`### Workaround if closed* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`*editorconfig/editorconfig#228*https://github.com/dg/composer-cleanerCommits-------ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist"
symfony-splitter pushed a commit to symfony/cache that referenced this pull requestSep 16, 2019
…dist" (Nyholm)This PR was merged into the 4.4 branch.Discussion----------Adding .gitattributes to remove Tests directory from "dist"| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| Deprecations? | no?| Tickets || License | MIT| Doc PR |This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.### Reasons for keeping the tests with the source* You can look at the tests to understand how the code works* It is convenientIn the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.### Reasons for removing them (merging this PR)* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`* Smaller packages when deploying with Docker or on Serverless.* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))## How to decide?Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.## Other PRs and issues related to this:Add .gitattributes file (symfony/symfony#29277)Added .gitattributes files to root and all components (symfony/symfony#26472)Exclude non-essential files from Composer package (symfony/symfony#25414)[HttpFoundation] optimize files for distribution (symfony/symfony#24427)Add .gitattributes files (symfony/symfony#23926)[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (symfony/symfony#20057)Add lightweight and root only .gitattributes (symfony/symfony#18004)Add .gitattributes to exclude tests from ZIPs (symfony/symfony#17995)[RFC] Move tests out of the source and source out of the tests (symfony/symfony#17749)Removal of development & testing files using .gitattributes (symfony/symfony#16174)Please add .gitattributes files and fix line endings (symfony/symfony#13521)making use of .gitattributes (symfony/symfony#11810)## WorkaroundsThere are workarounds for both sides. Example:### Workaround if merged* `composer update --prefer-source`### Workaround if closed* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`*editorconfig/editorconfig#228*https://github.com/dg/composer-cleanerCommits-------ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist"
symfony-splitter pushed a commit to symfony/yaml that referenced this pull requestSep 16, 2019
…dist" (Nyholm)This PR was merged into the 4.4 branch.Discussion----------Adding .gitattributes to remove Tests directory from "dist"| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| Deprecations? | no?| Tickets || License | MIT| Doc PR |This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.### Reasons for keeping the tests with the source* You can look at the tests to understand how the code works* It is convenientIn the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.### Reasons for removing them (merging this PR)* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`* Smaller packages when deploying with Docker or on Serverless.* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))## How to decide?Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.## Other PRs and issues related to this:Add .gitattributes file (symfony/symfony#29277)Added .gitattributes files to root and all components (symfony/symfony#26472)Exclude non-essential files from Composer package (symfony/symfony#25414)[HttpFoundation] optimize files for distribution (symfony/symfony#24427)Add .gitattributes files (symfony/symfony#23926)[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (symfony/symfony#20057)Add lightweight and root only .gitattributes (symfony/symfony#18004)Add .gitattributes to exclude tests from ZIPs (symfony/symfony#17995)[RFC] Move tests out of the source and source out of the tests (symfony/symfony#17749)Removal of development & testing files using .gitattributes (symfony/symfony#16174)Please add .gitattributes files and fix line endings (symfony/symfony#13521)making use of .gitattributes (symfony/symfony#11810)## WorkaroundsThere are workarounds for both sides. Example:### Workaround if merged* `composer update --prefer-source`### Workaround if closed* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`*editorconfig/editorconfig#228*https://github.com/dg/composer-cleanerCommits-------ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist"
symfony-splitter pushed a commit to symfony/mailer that referenced this pull requestSep 28, 2021
…dist" (Nyholm)This PR was merged into the 4.4 branch.Discussion----------Adding .gitattributes to remove Tests directory from "dist"| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| Deprecations? | no?| Tickets || License | MIT| Doc PR |This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.### Reasons for keeping the tests with the source* You can look at the tests to understand how the code works* It is convenientIn the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.### Reasons for removing them (merging this PR)* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`* Smaller packages when deploying with Docker or on Serverless.* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))## How to decide?Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.## Other PRs and issues related to this:Add .gitattributes file (symfony/symfony#29277)Added .gitattributes files to root and all components (symfony/symfony#26472)Exclude non-essential files from Composer package (symfony/symfony#25414)[HttpFoundation] optimize files for distribution (symfony/symfony#24427)Add .gitattributes files (symfony/symfony#23926)[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (symfony/symfony#20057)Add lightweight and root only .gitattributes (symfony/symfony#18004)Add .gitattributes to exclude tests from ZIPs (symfony/symfony#17995)[RFC] Move tests out of the source and source out of the tests (symfony/symfony#17749)Removal of development & testing files using .gitattributes (symfony/symfony#16174)Please add .gitattributes files and fix line endings (symfony/symfony#13521)making use of .gitattributes (symfony/symfony#11810)## WorkaroundsThere are workarounds for both sides. Example:### Workaround if merged* `composer update --prefer-source`### Workaround if closed* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`*editorconfig/editorconfig#228*https://github.com/dg/composer-cleanerCommits-------ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist"
Sign up for freeto 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.
Uh oh!
There was an error while loading.Please reload this page.
When installing a Symfony package by composer all the tests for the package are downloaded as well. This is a problem because all the test classes are needlessly suggested by IDE. These files can be excluded from the download using export-ignore in .gitattributes files. Of course it only works for tagged releases as long as
--prefer-sourceis not used.This will of course exclude tests from ZIP downloads here on GitHub as well. I don't see a problem with that though.
I can rebase to 3.4 if you want.
Failed test seems unrelated.