Or you can just do this:
composer require –dev phpexperts/docker-php8
Watch the demo video:
We’ve been using it over at the Bettergist Collective project to test OVER 100,000 PHP Packagist.org packages’ compatibility with PHP v8. (hint: It’s *terrible* w/ –dev enabled… largely because of PHPUnit pre 9.0 not allowing PHP 8). WIth –no-dev, about 33% of packages work with PHP 8.
But /r/PHP hates our company, so we don’t post much around here.