codefog / contao-haste

Haste is a collection of tools and classes to ease working with Contao
http://codefog.pl/extension/haste.html
MIT License
43 stars 24 forks source link

Exclude tests/ from distribution #164

Closed ameotoko closed 2 years ago

ameotoko commented 2 years ago

Can you please exclude tests directory from installing in production? The declarations in bootstrap.php ruin the IntelliSense for Contao classes.

aschempp commented 2 years ago

you have to mark the folder as "excluded" in PHPStorm to not make it load the classes.

ameotoko commented 2 years ago

PHPStorm does not let me do that from context menu in vendor/ directory, and it is already excluded in "Preferences -> Dirctories". And I would have to do it manually in each project. Why? I am not ever going to run those tests, it is not even a direct dependency of my project, I did not require it.

Much better way is to prevent it from installing in prod environment by using few lines in your .gitattributes, e. g. like Contao does it:

/.github export-ignore
/.gitattributes export-ignore
/tests export-ignore
/phpunit.xml.dist export-ignore
fritzmg commented 2 years ago

Much better way is to prevent it from installing in prod environment by using few lines in your .gitattributes, e. g. like Contao does it:

Just provide a PR for that ;)

aschempp commented 2 years ago

Closed in favour of https://github.com/codefog/contao-haste/pull/165