Score:0

"Composer\InstalledVersions" not found in Solarium\Client::getVersion()

us flag

When i try to open configuration page of search API module i am getting the below error:

The website encountered an unexpected error. Please try again later. Error: Class "Composer\InstalledVersions" not found in Solarium\Client::getVersion() (line 59 of vendor\solarium\solarium\src\Client.php).

I have checked the place where it is stating error but it is updated as per the recent package.

use Composer\InstalledVersions;

/**
 * Returns the version string.
 *
 * @return string
 */
public static function getVersion(): string
{
    static $version;

    if (!$version) {
        $version = InstalledVersions::getPrettyVersion('solarium/solarium');
    }

    return $version;
}

Help me to fix the issue.

id flag
That looks like an auto loader problem. It will be difficult to answer this without more information.
sudhan avatar
us flag
Hi @cilefen, Can you please tell me the details required for answering or how to fix this issue.
id flag
In short it means `vendor/composer/InstalledVersions.php` is missing or cannot be autoloaded. That is all I can say given the information you provided.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.