Ah, I've found it, you define your own repository a few lines below:
However, this makes it impossible to depend on Matomo as a dependency installed by composer.
Hi, see https://github.com/matomo-org/matomo/pull/15180 for more information on why this is a slightly ugly hack.
Matomo 3.x supports PHP 5.5 or later, so it can not be updated to the latest version of lessphp(which dropped support a while ago).
But Matomo also needs to support PHP 7.4 which means this patch (https://github.com/matomo-org/lessphp/commit/f16f6984aa9098559ababa9f47154a397b974c24) needs to be applied to avoid warnings.
With Matomo 4 support for old PHP versions is dropped so it should not matter anymore, but this means https://github.com/leafo/lessphp/pull/647 still needs to be merged.
If this is resolved in Matomo 4 basically can we close this issue? Or we still wait for the other issue to be merged?
The composer file on branch
4.x-dev also contains references to the version
dev-php74-compat of the module
leafo/lessphp that only can be installed when directly cloning the Matomo repository and it is still not possible to depend on Matomo as a package / requirement / dependency.
In the current state, installing Matomo using the following command is not possible:
composer require piwik/piwik
The command fails with an error like this:
Using version ^3.13 for piwik/piwik Your requirements could not be resolved to an installable set of packages. Problem 1 - piwik/piwik 3.13.6 requires leafo/lessphp dev-php74-compat -> no matching package found.
Which is sad cause is both prevents users from installing and updating Matomo using composer and also makes it impossible to create other projects that depend on Matomo.
The core issue is that Matomo currently relies on two private packages that must be installed from custom repositories as configured in Matomos composer file but composer does not load the repositories of requirements:
Currently, every package that depends on Matomo must repeat the
repositories section in their own
Get rid of the section
composer.json by either: