• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Composer Kimai error

p0se

Basic Pleskian
I am trying to install the Kimai time tracking tool on my Plesk server.

I use the documentation at Shared hosting – Kimai
When I use Composer I get the following error.

Failed to retrieve data for the package 'composer-runtime-api': In ComposerRepository.php line 347: [LogicException] Composer repositories that have lazy providers and no available-packages list can not load the complete list of packages, use getPackageNames instead. Exception trace: at phar:///opt/psa/var/modules/composer/composer.phar/src/Composer/Repository/ComposerRepository.php:347 Composer\Repository\ComposerRepository->getPackages() at phar:///opt/psa/var/modules/composer/composer.phar/src/Composer/Repository/RepositorySet.php:335 Composer\Repository\RepositorySet->createPoolWithAllPackages() at phar:///opt/psa/var/modules/composer/composer.phar/src/Composer/Command/ShowCommand.php:745 Composer\Command\ShowCommand->getPackage() at phar:///opt/psa/var/modules/composer/composer.phar/src/Composer/Command/ShowCommand.php:282 Composer\Command\ShowCommand->execute() at phar:///opt/psa/var/modules/composer/composer.phar/vendor/symfony/console/Command/Command.php:298 Symfony\Component\Console\Command\Command->run() at phar:///opt/psa/var/modules/composer/composer.phar/vendor/symfony/console/Application.php:1040 Symfony\Component\Console\Application->doRunCommand() at phar:///opt/psa/var/modules/composer/composer.phar/vendor/symfony/console/Application.php:301 Symfony\Component\Console\Application->doRun() at phar:///opt/psa/var/modules/composer/composer.phar/src/Composer/Console/Application.php:382 Composer\Console\Application->doRun() at phar:///opt/psa/var/modules/composer/composer.phar/vendor/symfony/console/Application.php:171 Symfony\Component\Console\Application->run() at phar:///opt/psa/var/modules/composer/composer.phar/src/Composer/Console/Application.php:145 Composer\Console\Application->run() at phar:///opt/psa/var/modules/composer/composer.phar/bin/composer:93 require() at /opt/psa/var/modules/composer/composer.phar:29 show [--all] [--locked] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [--ignore IGNORE] [-M|--major-only] [-m|--minor-only] [--patch-only] [-D|--direct] [--strict] [-f|--format FORMAT] [--no-dev] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<package> [<version>]]

Can anyone help?
 
Looks like I'm one step ahead.

I now get the following error message.

Code:
Failed to retrieve data for the package 'composer-runtime-api': Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///opt/psa/var/modules/composer/composer.phar/src/Composer/Autoload/AutoloadGenerator.php:879

Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///opt/psa/var/modules/composer/composer.phar/src/Composer/Autoload/AutoloadGenerator.php:884

plesk/composer-command-info (installed globally) contains a Composer plugin which is blocked by your allow-plugins config. You may add it to the list if you consider it safe. See https://getcomposer.org/allow-plugins

You can run "composer global config --no-plugins allow-plugins.plesk/composer-command-info [true|false]" to enable it (true) or keep it disabled and suppress this warning (false)
[LogicException]

Composer repositories that have lazy providers and no available-packages list can not load the complete list of packages, use getPackageNames instead.
show [--all] [--locked] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [--ignore IGNORE] [-m|--minor-only] [-D|--direct] [--strict] [-f|--format FORMAT] [--no-dev] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<package>] [<version>]
 
I spend some more time solving it and could solve it by deinstalling extension "PHP Composer" from Plesk and install composer on my Linux.

As a root user I did the following:

I globally set the PHP environment variable:
export PATH="/opt/plesk/php/8.1/bin:$PATH"

I installed composer on my Linux:
curl -sS https://getcomposer.org/installer | php

Moved it here:
mv composer.phar /usr/local/bin/composer

Allowed all users to run composer (I think this is optional)
chmod +x /usr/local/bin/composer

Then in the vhost directory I could follow the instructions for Plesk:

And now i kan use Kimai on my Plesk.

Hope this helps someone.
 
I was able to solve the problem in the same way.
Because I wanted to use the Plesk version of Composer, I decided against it.
 
Back
Top