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

Remove composer.lock from git export #228

Closed
wants to merge 3 commits into from

Conversation

glensc
Copy link

@glensc glensc commented Jul 11, 2022

This is to avoid false-positive as being sub-project with snyk monitor.

This makes composer package contain only needed files:

  • readme, license
  • php source

This is to avoid false positive as being sub-project with snyk monitor
@glensc glensc marked this pull request as ready for review July 11, 2022 13:40
@glensc glensc closed this Jul 11, 2022
@glensc glensc deleted the package-export branch July 11, 2022 13:43
@glensc glensc restored the package-export branch July 11, 2022 13:45
@glensc glensc reopened this Jul 11, 2022
/.gitignore export-ignore
/.travis.yml export-ignore
/composer.lock export-ignore
/docs export-ignore
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure about this one?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. I am:

This makes composer package contain only needed files:

  • readme, license
  • php source

you can always install --prefer-source to get all files, or browse online rest of the files. documentation in vendor did is not required for package to be used.

@preetishishodia7
Copy link
Contributor

Hi @glensc when you setup this PHP SDK then during the installation composer.lock added to your directory, so you don't need to worry about it. Also it a module file so update during installation. So we don't need to remove it.
thanks

@glensc
Copy link
Author

glensc commented Dec 15, 2022

@preetishishodia7 seems you totally missed the context.

you have committed your project composer.lock to the project:

now if I install your library, it will be present in vendor/sendinblue/api-v3-sdk/composer.lock

now security scanner like snyk, sees the file and thinks it's another project to scan.

this pr was adding the file to .gitattributes ignore, so when composer is installed with --prefe-dist, the filesendinblue/api-v3-sdk/composer.lock file will not be added to the .zip that composer downloads.

besides, it's common practice to exclude files not relevant for using your project using .gitattributes, these include tests, and extra development files.

@preetishishodia7
Copy link
Contributor

HI @glensc thanks for explaining, will look into it.

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

3 participants