Closed Grafikart closed 7 years ago
@Grafikart That is indeed a bug that sneeked in with the 0.10.0 release. I've created a patch which will be included in next release. Thanks for noticing!
I'll close this issue for now, but feel free to create a PR for adding an ASCII string as value of the ascii paths. One option is to create an in-memory fileobject:
$file = new SplFileInfo('php://memory');
$content = $file->openFile('r+');
$content->fwrite('put ascii content here');
$content->rewind();
Another thing you could do is just use the string; The hard part will be detecting if the config contains strings or paths. Maybe we could use multiple parameters: one if you want to set the ascii path and another when you want to use an ascii string. Personally I prefer using a file, but I can image that some people want this in the configuration file.
I tried to set custom banners but ended up with an error.
My configuration
Result:
In my opinion you should allow string for this method https://github.com/phpro/grumphp/blob/master/src/GrumPHP/Util/Filesystem.php#L19 or convert information from configuration to SplFileInfo