Running PHP 8.1 with xdebug is causing some errors in some dependencies (such as squizlab's codesniffer).  Updating them would likely fix the issue.