Closes #3023322
Issue #3181275 by andypost, Pooja Ganjage, alexpott: Do not register Phar stream wrapper on PHP 8 because it is not vulnerable to unserialize bugs (cherry picked from commit 1a7b7f72)