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

Slim down mockery when loaded as a dependency #1044

Merged
merged 1 commit into from
May 14, 2020
Merged

Slim down mockery when loaded as a dependency #1044

merged 1 commit into from
May 14, 2020

Conversation

axlon
Copy link
Contributor

@axlon axlon commented Apr 4, 2020

This pull request slims down Mockery as a dependency by removing all unnecessary files from distributions. This means that if you install Mockery via Composer you will no longer have Mockery's tests and meta files in your vendor directory.

@davedevelopment
Copy link
Collaborator

We've seen this a couple of times in #610 and #641 and I turned it down, but would be happy to know what the general consensus is...

@axlon
Copy link
Contributor Author

axlon commented Apr 6, 2020

My personal reasoning:
I was writing a test and as I typed extends Test a bunch of Mockery's own tests showed up, rather than what I was looking for (which was MockeryTestCase).

From my point of view there is no benefit to having Mockery's tests be included in vendor, because you will never run them from there. Say I would want to make a change to Mockery's code I wouldn't be doing that from my project's vendor directory.

@mfn
Copy link
Contributor

mfn commented Apr 6, 2020

I agree with the PR FWIW; I support to slim down packages to their relevant runtime parts only (and some very useful meta files like readme/changelog/etc/.)

@martinssipenko
Copy link
Contributor

martinssipenko commented Apr 29, 2020

I think this change makes sense.

@simonschaufi
Copy link

simonschaufi commented May 4, 2020

i just wanted to create the same PR for the same reason 😄 If you really need the tests, then clone the whole repo or whatever. See also this interesting discussion: symfony/symfony#33579 and this environment statistic: Codeception/Codeception#5527 (comment) Save the 🌍

PS: PhpUnit also excluded the test files just a few hours ago ;)

@davedevelopment davedevelopment merged commit 8496cfb into mockery:master May 14, 2020
@davedevelopment
Copy link
Collaborator

👍 I still don't like it, but I think it makes sense to move forward this way.

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

5 participants