• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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