Magento2 alternative to stream_content_create
Question
I understand Magento2 has replaced various filesystem PHP functions with their own safer version in Magento\Framework\Filesystem\Driver\File. For example get_file_contents should be called instead as $this->fileDriver->fileGetContents($url, false, $context)
Though am stuck on "stream_content_create" as there seems to be no alternative?
ie.with phpcs I get this error :
$context = stream_context_create($options);
-------------------------------------------------------------------------------------------
157 | WARNING | [ ] The use of function stream_context_create() is discouraged
does anybody know what the replacement should be?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange