Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

[DISCUSS] Dependency interference/Initial run failures #246

Open
padraic opened this issue May 7, 2017 · 2 comments
Open

[DISCUSS] Dependency interference/Initial run failures #246

padraic opened this issue May 7, 2017 · 2 comments

Comments

@padraic
Copy link
Collaborator

padraic commented May 7, 2017

Discussion topic for here or slack. Actually two for now:

  1. Dependency interference

There's a number of issues which are resolved by running humbug in a different manner, to keep dependencies between humbug and the code being mutated from clashing. It will most likely impact the phar build where composer has no scope to resolve requirements. Unfortunately it's hard to spot, so the floor is open to suggestions.

  1. Code coverage errors

A few initial run failures are tied to running phpunit with code coverage. Users may not be doing this at all, not spotting that it fails, and reporting that humbug failed instead. Understandable since we don't do an initial run without code coverage for comparison.

@padraic
Copy link
Collaborator Author

padraic commented May 7, 2017

Here's one possible example - a long thread of confusion followed by some possible solutions/causes. #39

@theofidry
Copy link
Member

  1. Is a well know issue to which there is only three solutions AFAIK:
  • Isolate properly the code used in the PHAR, which can be done by changing the namespaces. It's a whole topic on its own and far from being trivial. I saw it successfully done in some closed projects (success highly correlated to the fact that it was closed, controlled and scoped projects). An open-source generic solution could be done although there will always be edge cases, and it's I believe what https://github.com/webmozart/php-scoper aims at. However webmozart is unlikely to finish this one so this project should be taken over (I can help with that)
  • Accept the risk. Deal with it.
  • Require Humbug (and that applies to any tool executing your code) as a dependency via Composer as a regular package
  1. Could be circumvented by providing the code coverage report (it's not rare to run tests with coverage before running Humbug, so that could avoid running the code with coverage twice) or make it more configurable/transparent about how humbug is running them to allow one to reproduce the issue outside of Humbug.

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

No branches or pull requests

2 participants