Problem with PhpUnit configuration in multiple projects using same remote machine
I've multiple PHP projects using the same Vagrant machine using PhpUnit.
Both projects have a local PhpUnit configuration using the same Remote Interpreter / Remote matchine.
My problem: I can either get Project A working or Project B (in their own respective IDE windows) but never both; because some "shared" configuration of the "global" PhpUnit is different.
Setup for Project A:
Setup for Project B:
In these Dialogs I need:
- Different Mappings => this works 👍
- But also different autoload Paths => this isn't possible, because it's shared
I _think_ this has to do because in both Projects I'm using the same Remote Interpreter because they're on the same Vagrant VM. But I only specify one Remote Interpreter for one destination machine it seems.
Any ideas how to properly configure PhpUnit here? I think I'm missing something, but can't figure it out.
thanks,
- Markus
请先登录再写评论。
Ok, I was a bit too fast. I can configure two Remote Interpreters for the same PHP version, but this doesn't seem to fix the problem. There's still something else connecting the two projects setups...
Since the configuration of "PHPunit library" seems to be shared between all instances, I thought about providing a PHAR on the remote machine which is the same for all.
However in this case, PhpUnit doesn't work at all and I get:
> Cannot find PHPUnit in include path (.:/usr/share/php
Also, realized with the multiple remote interpreter to the same VM, I can declare them but not select. Whenever I select the second one, it always jumps back to the first one for this host 🤔
Just found https://youtrack.jetbrains.com/issue/WI-34383 , guess it's a bug/missing feature/whatever :-(
Aha! I've had used a the "Deployment configuration" via which I specified the remote interpreter.
I remove all interpreter/phpunit/etc. configurations and started over from scratch and set up the remote CLI to be via vagrant. This seems now to work as the "Test framework" configuration now seems independent and I can configure two different autoloaders 🤷♀️