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

Projects
None yet
2 participants
@klausi
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@pitbulk

pitbulk Jul 19, 2017

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@klausi

klausi Jul 19, 2017

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@klausi

klausi Jul 20, 2017

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@pitbulk

pitbulk Jul 20, 2017

Contributor

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

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 onelogin:master Jul 21, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment