I have a new local install. It appears to be functioning correctly aside from me being unable to run the tests successfully. I installed Matomo by cloning the git repo then using the Matomo Installation Welcome Screen to walk through the installation process.
./console tests:run results in the following
Executing command: cd /var/www/html/matomo/tests/PHPUnit && /var/www/html/matomo/vendor/bin/phpunit --testsuite UnitTests
sh: 1: /var/www/html/matomo/vendor/bin/phpunit: not found
Executing command: cd /var/www/html/matomo/tests/PHPUnit && /var/www/html/matomo/vendor/bin/phpunit --testsuite IntegrationTests
sh: 1: /var/www/html/matomo/vendor/bin/phpunit: not found
Executing command: cd /var/www/html/matomo/tests/PHPUnit && /var/www/html/matomo/vendor/bin/phpunit --testsuite SystemTests
sh: 1: /var/www/html/matomo/vendor/bin/phpunit: not found
Executing command: cd /var/www/html/matomo/tests/PHPUnit && /var/www/html/matomo/vendor/bin/phpunit --testsuite PluginTests
sh: 1: /var/www/html/matomo/vendor/bin/phpunit: not found
vendor/bin contains ‘lessc’ but nothing else.
I had the thought that ‘composer install’ might help however that results in this error.
In ArrayLoader.php line 44:
Unknown package has no name defined ([{"name":"composer\/ca-bundle","version":"1.2.8","version_normalized":"1.2.8.0","source":{"type":"git",
"url":"https:\/\/github.com\/composer\/ca-bundle.git","reference":"8a7ecad675253e4654ea055052332853....
That error output goes on much longer.
I do have phpunit already available on this machine however the test runner appears to require phpunit to exist at vendor/bin specifically. Any tips would be greatly appreciated. I suspect I am probably missing something obvious.
Great question. It turns out I was using a rather dated version of Composer
Composer 1.6.3 2018-01-31 16:28:17
After installing Composer version 2.0.9 2021-01-27 16:09:27 I can now install the dependencies. Thank you for the help
Unfortunately that has just moved me on to a new problem.
PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo_tests.option' doesn't exist in /var/www/html/matomo/libs/Zend/Db/Statement/Pdo.php:233
I haven’t had time to do more than a cursory google to see what is going on there. I will hopefully get time to dig into it a bit more in a few hours but if the solution to that happens to be immediately apparent let me know