search

Home  >  Q&A  >  body text

php artisan test fails immediately

<p>The command php artisan test fails immediately with the error<b>Typed property DOMDocument::$documentElement</b>must be inaccessible before initialization</p> <p>I made no changes to the default test cases, and I ran the command from the root of the project. </p> <p>I am currently using an Ubuntu system with php 8.1 installed. </p>
P粉779565855P粉779565855461 days ago567

reply all(1)I'll reply

  • P粉364129744

    P粉3641297442023-08-11 13:36:43

    This probably means you have the XDEBUG extension installed for your version of PHP CLI. For PHP8.1, to disable this XDEBUG extension, you can run the following command in the terminal: sudo apt-get purge php8.1-xdebug && phpdismod xdebug If this does not resolve the issue, you may need to restart the PHP service and ensure that the PHP CLI is also using version PHP 8.1. If not, modify the above command to suit your PHP version

    reply
    0
  • Cancelreply