Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(composer): Exclude test files from Composer production downloads #236

Merged
merged 2 commits into from Jul 21, 2017

Conversation

klausi
Copy link
Contributor

@klausi klausi commented Jul 19, 2017

Test code should not end up in a production deployment for security reasons. Please exclude test code from Composer downloads. This can be done with https://blog.madewithlove.be/post/gitattributes/

Not sure if you also want to exclude other stuff like README and example files?

@pitbulk
Copy link
Contributor

pitbulk commented Jul 19, 2017

Maybe makes sense to allow on composer production only:

  • docs
  • lib/Saml2
  • extlib
  • certs
  • settings_example.php
  • advanced_settings_example.php
  • CHANGELOG
  • LICENSE
  • README.md

and ignore the rest

@klausi
Copy link
Contributor Author

klausi commented Jul 19, 2017

I think with .gitattributes you have to specify a black list (stuff that you want to ignore). Composer is primitive when it looks at those lines, so I think a white list is not possible https://github.com/composer/composer/blob/master/src/Composer/Package/Archiver/GitExcludeFilter.php

@klausi
Copy link
Contributor Author

klausi commented Jul 20, 2017

What about the endpoint folder? I left that in. Same for the other *.php files in the root folder, people might want to use them for whatever reasons.

Otherwise I removed the demo* folders.

@pitbulk
Copy link
Contributor

pitbulk commented Jul 20, 2017

we may exclude endpoints as well and the rest of php files not listed in the previous list I shared ;)

@pitbulk pitbulk merged commit 65705cc into SAML-Toolkits:master Jul 21, 2017
@pitbulk pitbulk mentioned this pull request Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants