PHP 7.4 - `ArdeidaeTests\Migrations\CreateDirectories` fails
ErrorException: file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory in /Runtime/App.php:215
Stack trace:
#0 [internal function]: Ardeidae\Throwables::ardeidae_error()
#1 /mnt/h/ardeidae/src/Runtime/App.php(215): file_get_contents()
#2 /mnt/h/ardeidae/src/Runtime/App.php(230): Ardeidae\Runtime\App->getInstallVersion()
#3 /mnt/h/ardeidae/src/Runtime/App.php(179): Ardeidae\Runtime\App->setInstallVersion()
#4 /mnt/h/ardeidae/tests/Migrations/CreateDirectories.test.php(57): Ardeidae\Runtime\App->__construct()
#5 /mnt/h/ardeidae/vendor/ilmiont/trainline/src/Trainline.php(232): ArdeidaeTests\Migrations\CreateDirectories->__init()
#6 /mnt/h/ardeidae/vendor/ilmiont/trainline/src/Trainline.php(290): Trainline\Trainline->test()
#7 /mnt/h/ardeidae/vendor/ilmiont/trainline/src/Trainline.php(197): Trainline\Trainline->hook()
#8 /mnt/h/ardeidae/vendor/ilmiont/trainline/src/Trainline.php(161): Trainline\Trainline->unitTest()
#9 /mnt/h/ardeidae/vendor/ilmiont/trainline/src/Trainline.php(135): Trainline\Trainline->unit()
#10 /mnt/h/ardeidae/vendor/ilmiont/trainline/index.php(5): Trainline\Trainline->run()
#11 {main}
As we see this is actually due to Ardeidae\Runtime\App
not being able to find an installation file and somehow operating on a directory, which now throws an exception with file_get_contents(...)
as of PHP 7.4. We should probably add an argument to Ardeidae\Runtime\App::__construct(...)
to disable automatically get the installation file contents which we could then use for tests.
Edited by James Walker