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

Ideas to shrink the size of this library? #333

Open
Luc45 opened this issue Jan 20, 2021 · 1 comment
Open

Ideas to shrink the size of this library? #333

Luc45 opened this issue Jan 20, 2021 · 1 comment

Comments

@Luc45
Copy link

Luc45 commented Jan 20, 2021

Howdy!

First of all, thanks for your effort in maintaining this OS project.

I wanted to use this in a WordPress plugin, but I'm afraid that 1.8mb might be too much for a library. This is the default structure when installing this plugin without require-dev: composer install greenlion/php-sql-parser:

➜  php-sql-parser git:(21-01/feat/site-snapshot) ✗ du -h --apparent-size ./ --max-depth=1
22K     ./examples
45K     ./wiki
882K    ./tests
725K    ./src
92K     ./libs
13K     ./.settings
1,8M    ./

I didn't look into it in-depth, but I think just the src folder is relevant for a developer that's just going to use PHP-SQL-Parser, right?

This is a common pitfall on Packagist, even Symfony includes tests folders in their packages. A shame, really.

Just tossing out this idea to see if someone can come up with a solution. Maybe a release branch with just src with GitHooks to Packagist?

Best,
Lucas

@stollr
Copy link

stollr commented Dec 23, 2023

Today it is possible to exclude directories and files per composer: https://getcomposer.org/doc/04-schema.md#archive
This way tests could be removed from the package dist.

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

No branches or pull requests

2 participants