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

Not bundling the composer file fails on some dependencies #50

Closed
PeeHaa opened this issue May 1, 2018 · 7 comments
Closed

Not bundling the composer file fails on some dependencies #50

PeeHaa opened this issue May 1, 2018 · 7 comments
Labels
Milestone

Comments

@PeeHaa
Copy link
Contributor

PeeHaa commented May 1, 2018

I have a dependency in my project which tries to check its own composer.json file to get its version.

In PharBuilder.php you specifically exclude composer files from the build.

Is / was there a specific reason for this and if not would you mind if I open a PR to allow for the composer.json file to be included into the build?

I guess it would be neat if it would be part of the configuration at some point, but for now I quick fix by just removing the line would work for me.

@MacFJA
Copy link
Owner

MacFJA commented May 1, 2018

The only reason that I remove composer.json (and lock) is to remove useless files.

I assumed that no third-party code will need its composer.json, but you prove me that it's not the case 😄

Feel free to open a PR to remove this line.

@MacFJA MacFJA added this to the 0.2.x milestone May 1, 2018
@MacFJA MacFJA added the bug label May 1, 2018
@theofidry
Copy link

@MacFJA and on another hand for some tools like PHP-CS-Fixer where compression is disabled they should by all means be excluded along with some unneeded composer related files :/

@MacFJA
Copy link
Owner

MacFJA commented May 2, 2018

@theofidry If dependencies are managed correctly (for example php-cs-fixer is set as dev requirement), PharBuilder can exclude all dev dependencies (which is the case by default).

@theofidry
Copy link

@MacFJA I meant PHP-CS-Fixer as the tool itself for its own PHAR, not as a dep. Their PHAR is not compressed, so excluding files like composer.json, composer.lock, installed.json which are not necessary for the PHAR to run should be excluded otherwise the PHAR size can quickly go up

@PeeHaa
Copy link
Contributor Author

PeeHaa commented May 2, 2018

@theofidry Can you confirm my test results in the PR and verify it's not a concern please?

@PeeHaa
Copy link
Contributor Author

PeeHaa commented May 2, 2018

Also does php-cs-fixer even use this project to build there phar? @theofidry

As far as I can see they are using box

@theofidry
Copy link

I'm just sharing this information in case this might be a concern, not to say the composer.json should be included or excluded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants