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 tests from package distribution #2300

neomerx opened this issue Sep 22, 2016 · 2 comments

Exclude tests from package distribution #2300

neomerx opened this issue Sep 22, 2016 · 2 comments


Copy link

neomerx commented Sep 22, 2016

Currently if phpunit is installed as a project dependency, composer downloads it with tests and some other not necessary files. And some of the phpunit names get IDE code helpers messy


The solution is to instruct git/composer to ignore some of the files and folders by adding to .gitattributes a list of files/folders

/tests              export-ignore
/.gitattributes     export-ignore
/.gitignore         export-ignore
/.php_cs            export-ignore
/.travis.yml        export-ignore
Copy link

alcohol commented Sep 23, 2016

This does break the install process for anyone installing phpunit from github zipballs and attempting to install the dependencies using Composer, because of the explicit classmap reference in autoload-dev to the tests directory. Possible solutions here would be to switch to using PSR-0/PSR-4 instead of classmap (if this is something that you would want to address).

Copy link

sebastianbergmann commented Sep 23, 2016

@alcohol If you think that this breaks something that should not be broken then please open a new ticket.

Also note that this is not in any release yet. So if you it breaks something for you then because you are not using a stable release of PHPUnit.

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

No branches or pull requests

3 participants