I'm trying to run this simple code on both PHP 7 and 8:
$loop = \React\EventLoop\Factory::create();
$filesystem = \React\Filesystem\Filesystem::create($loop);
$file = $filesystem->file('test.txt');
$file->getContents()->then(function ($contents) {
echo $contents . PHP_EOL;
});
$loop->run();
After installing via composer, and yet it tells me that adapter
is missing
Error:
PHP Fatal error: Uncaught RuntimeException: No supported adapter found for this installation in \root\src\Filesystem.php:31
Stack trace:
#0 \root\try.php(6): React\Filesystem\Filesystem::create()
#1 {main}
thrown in \root\vendor\react\filesystem\src\Filesystem.php on line 31