I've googled a lot for this issue and came to one conclusion (of which I'm not 100% sure it's correct): the "Segmentation fault" error is something caused by PHP (not a package on your project or something?).
I removed a lot of my original question as I've found out something:
php artisan make:migration example
Content of the up() method:
dump('up()');
$thisShouldThrowAMethodNotExistError = User::whereSomething('nonExisting')->first();
dd('This is the end');
Then, normal way to execute the migration:
php artisan migrate
"up()"
Segmentation fault (core dumped)
Basically I found that whenever an error should be thrown by PHP (like in this case, the method whereSomething does not exist), the Segmentation fault is shown instead.
I have no idea where to look to fix this. Current versions:
- Laravel/Homestead - 6.3.0
- Vagrant - 2.1.5
- VirtualBox - 5.2.18
Running the commands with php7.1 artisan migrate doesn't change anything for me.
Edit
After removing PHP 7.3.* and 7.2.* I still won't get an error like I usually got:
vagrant@homestead:~/Code/project$ php -v
PHP 7.1.20-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jul 25 2018 10:07:09) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.20-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
with blackfire v1.22.0~linux-x64-non_zts71, https://blackfire.io, by Blackfire
vagrant@homestead:~/Code/project$ php artisan migrate
"up()"
Segmentation fault (core dumped)