auth0 / auth0-PHP

PHP SDK for Auth0 Authentication and Management APIs.
https://auth0.com/docs/libraries/auth0-php
MIT License
382 stars 212 forks source link

build(export): exclude unnecessary files from dist package #696

Closed ramsey closed 1 year ago

ramsey commented 1 year ago

Description

As I was analyzing files in my project's vendor/ directory, I noticed there were a lot of files included for auth0/auth0-php, since it doesn't have a .gitattributes file telling GitHub what to exclude from the exported zipped files (that Composer downloads).

By including a .gitattributes file that excludes files that aren't necessary for dependents, we save space and bandwidth.

This only affects the zipped files exported from GitHub (i.e., .zip and .tar.gz), which are primarily used by package managers (i.e., Composer) when installing project dependencies.

At a high level, here's what the directory looks like before this change:

❯ tree -L 1 -a -F --dirsfirst
./
├── .github/
├── docs/
├── src/
├── tests/
├── .editorconfig
├── .gitignore
├── .shiprc
├── .styleci.yml
├── CHANGELOG.md
├── EXAMPLES.md
├── LICENSE.md
├── README.md
├── UPGRADE.md
├── composer.json
├── opslevel.yml
├── phpdoc.dist.xml
├── phpstan.neon.dist
├── phpunit.xml.dist
├── pint.json
├── psalm.xml.dist
└── rector.php

5 directories, 17 files

And here's what it looks like after this change:

❯ tree -L 1 -a -F --dirsfirst
./
├── src/
├── LICENSE.md
├── README.md
└── composer.json

2 directories, 3 files

Type of change

Checklist

github-actions[bot] commented 1 year ago

👋 Thanks for contributing! Please be patient while a maintainer reviews your PR. In the meantime, please make sure you've read our contributing guide.

codecov-commenter commented 1 year ago

Codecov Report

Base: 94.46% // Head: 94.46% // No change to project coverage :thumbsup:

Coverage data is based on head (2d7d49a) compared to base (e139ae0). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #696 +/- ## ========================================= Coverage 94.46% 94.46% Complexity 1285 1285 ========================================= Files 65 65 Lines 4441 4441 ========================================= Hits 4195 4195 Misses 246 246 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

evansims commented 1 year ago

Hey @ramsey 👋 Thanks very much for taking the time to prepare this contribution, it's genuinely appreciated. You're quite right, the SDK could definitely benefit from a little trim down. I'll get this merged to be shipped in the next release. 👍