habitat
habitat copied to clipboard
habitat + paratest + symfony/console v3.4.0 misses env var PATH to /usr/local/bin/php (or similair)
Since the release of symfony/console v3.4.0, it sets the $_ENV variable.
- class
Environment
, functiongetAll()
normally returned the parsed phpinfo. - since the $_ENV is set,
getAll()
returns that, missing thePATH
. - paratest runs phpunit, but without a path set, we get in our setup
env: php: No such file or directory
current code (line 33):
public function getAll()
{
if ($_ENV) return $_ENV;
$info = $this->getPhpInfo();
$_ENV = $this->parser->parse($info);
return $_ENV;
}
suggestion:
public function getAll()
{
$info = $this->getPhpInfo();
$_ENV = array_merge($this->parser->parse($info), $_ENV);
return $_ENV;
}
@andrederoos huh - doesn't seem like that will hurt anything. If you want to get a pull request with your suggested patch, and a matching test - then I would be happy to merge this.
little bit rusty with writing tests, but sure, i'll create a PR! We love to use paratest 👍
awesome! thanks! I'm glad you find it useful 😄