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

Exclude internal tests from composer dist packages #4151

Closed
wants to merge 1 commit into from
Closed

Exclude internal tests from composer dist packages #4151

wants to merge 1 commit into from

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Mar 26, 2020

See discussion for example symfony/symfony#33579

It was already done in phpunit in d99e588 but reverted because it also removed the changelog and license file by mistake.

@sebastianbergmann
Copy link
Owner

Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it.

@simonschaufi
Copy link

simonschaufi commented May 4, 2020

@sebastianbergmann I agree that the suggestion in this PR is a bit too much. Could you explain why you left out /tests export-ignore in the current version? Nobody needs the internal tests of phpunit. I also found this interesting comment: Codeception/Codeception#5527 (comment) and this one: https://www.emergeinteractive.com/insights/detail/does-irresponsible-web-development-contribute-to-global-warming/ Save the 🌍 and reduce global warming!

@sebastianbergmann
Copy link
Owner

AFAIK, @remicollet and other downstream packagers rely on tests etc. being included in release tarballs. I would gladly add them to export-ignore if that were not the case.

@Tobion
Copy link
Contributor Author

Tobion commented May 4, 2020

They can still have the tests by using prefer-source. That's not a valid argument to not change it.

@sebastianbergmann
Copy link
Owner

I think you are right. And I think that prefer-source may not have existed when @remicollet asked me to not exclude tests. I will go through my repositories and make the necessary changes.

@remicollet
Copy link
Contributor

This has been discussed ad-nauseam.

"prefer-source' is a composer option, so only for composer user.

tests are part of the project so have to be part of the public tarball, like documentation, license, or any other file used by the project.

Again THIS IS A COMPOSER ISSUE, not being able to manage file "roles"

PHP is the only language in the world to NOT have any INSTALLER (and composer is not an installer, only a dependency manager).

perl have cpan,
python have pip
nodejs have npm
...

Even the old PEAR was able to manage file "roles"

BTW, using git snapshot instead of official tarball still possible

This issue make all non-php developers laugh, so continue, in our strange configned world, always nice to have something to laugh about.

@simonschaufi
Copy link

@remicollet what is the difference between npm and composer? For me they do the same.

@remicollet
Copy link
Contributor

"npm install foo" is able to install only needed scripts, without using any .gitattributes hack.

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

4 participants