Global Installation Issue
I was trying out doing a global installation of this package so I could keep it out of the project requirements, but ran into an issue. It looks like it's attempting to run after being globally installed because I get the error:
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
[UnexpectedValueException]
Imposter namespace is empty
I'm going to look in the code a bit, but I'm hoping it would be easy to make sure that if composer global is being run then the the package won't attempt to run.
Global installation is not supported yet.
I understand the desire to move imposter out of plugin vendor folders.
However, I got mixed feelings towards composer global require. See: https://github.com/composer/composer/issues/5390
And, practically, if we are going to support global installation, we need to find a way to ensure global vendor folders not being modified by imposter. Any ideas?
I'm going to poke around a bit today to see all the parameters composer has when it starts up. My thought was to have a check early on in the plugin that looks to see if it's composer global ... and if it's being run in the global context.
Though it would also require another check to make sure there aren't errors if a project doesn't have settings in composer.json, because I'm realizing it will try to run on any project once installed that way.
My context for wanting to install it globally is because I'm doing development of a plugin in a docker container, so if I can globally install it in the docker container I can keep it out of the project composer.json. I wouldn't run into the issue of it running when unexpected because the project is in isolation.
I may submit a PR later today if I can figure something out.
Awesome!
Try https://github.com/consolidation/cgr first. It might "just work" if we put cgr and imposter together.