<?php

declare(strict_types=1);

namespace PackageVersions;

use Composer\InstalledVersions;
use OutOfBoundsException;

class_exists(InstalledVersions::class);

/**
 * This class is generated by composer/package-versions-deprecated, specifically by
 * @see \PackageVersions\Installer
 *
 * This file is overwritten at every run of `composer install` or `composer update`.
 *
 * @deprecated in favor of the Composer\InstalledVersions class provided by Composer 2. Require composer-runtime-api:^2 to ensure it is present.
 */
final class Versions
{
    /**
     * @deprecated please use {@see self::rootPackageName()} instead.
     *             This constant will be removed in version 2.0.0.
     */
    const ROOT_PACKAGE_NAME = 'visavi/rotor';

    /**
     * Array of all available composer packages.
     * Dont read this array from your calling code, but use the \PackageVersions\Versions::getVersion() method instead.
     *
     * @var array<string, string>
     * @internal
     */
    const VERSIONS          = array (
  'alchemy/binary-driver' => 'v5.2.0@e0615cdff315e6b4b05ada67906df6262a020d22',
  'cakephp/core' => '4.2.6@c0165c3a64d11f4f48ee61aaffd4a93c4b467927',
  'cakephp/database' => '4.2.6@e029c0e5cbea35b2cd4c742f9d16241588594cd8',
  'cakephp/datasource' => '4.2.6@2e9805d1c5c78be6916db4ccc45e49f3ff5e5407',
  'cakephp/utility' => '4.2.6@4259ae4154e639557af751ae719d58253a79282a',
  'cbschuld/browser.php' => 'v1.9.6@9d07d6410977d494d7b8ecc2f3c877645c5477d9',
  'composer/package-versions-deprecated' => '1.11.99.1@7413f0b55a051e89485c5cb9f765fe24bb02a7b6',
  'doctrine/cache' => '1.11.0@a9c1b59eba5a08ca2770a76eddb88922f504e8e0',
  'doctrine/dbal' => '3.1.0@5ba62e7e40df119424866064faf2cef66cb5232a',
  'doctrine/deprecations' => 'v0.5.3@9504165960a1f83cc1480e2be1dd0a0478561314',
  'doctrine/event-manager' => '1.1.1@41370af6a30faa9dc0368c4a6814d596e81aba7f',
  'doctrine/inflector' => '2.0.3@9cf661f4eb38f7c881cac67c75ea9b00bf97b210',
  'dragonmantank/cron-expression' => 'v2.3.1@65b2d8ee1f10915efb3b55597da3404f096acba2',
  'evenement/evenement' => 'v3.0.1@531bfb9d15f8aa57454f5f0285b18bec903b8fb7',
  'google/recaptcha' => '1.2.4@614f25a9038be4f3f2da7cbfd778dc5b357d2419',
  'graham-campbell/result-type' => 'v1.0.1@7e279d2cd5d7fbb156ce46daada972355cea27bb',
  'gregwar/captcha' => 'v1.1.9@4bb668e6b40e3205a020ca5ee4ca8cff8b8780c5',
  'guzzlehttp/guzzle' => '7.3.0@7008573787b430c1c1f650e3722d9bba59967628',
  'guzzlehttp/promises' => '1.4.1@8e7d04f1f6450fef59366c399cfad4b9383aa30d',
  'guzzlehttp/psr7' => '1.8.2@dc960a912984efb74d0a90222870c72c87f10c91',
  'illuminate/bus' => 'v8.40.0@7b5c0f1aa52cc70259352ff6b7adb67c7d46bcc5',
  'illuminate/cache' => 'v8.40.0@267a541171a375d56622117fbd0a60515402f2ef',
  'illuminate/collections' => 'v8.40.0@deccb956d38710f3f8baf36dd876c3fa1585ec22',
  'illuminate/config' => 'v8.40.0@8441c542312b4d57220b1f942b947b6517c05008',
  'illuminate/container' => 'v8.40.0@0e38ee1632d470e56aece0079e6e22d13e6bea8e',
  'illuminate/contracts' => 'v8.40.0@5152041a5c4ac4dbebb3c8ee72d05666c592ae08',
  'illuminate/database' => 'v8.40.0@742c062a6447278f6b6f8622bd649173ed51fa3a',
  'illuminate/events' => 'v8.40.0@bd2941d4d55f5d357b203dc2ed81ac5c138593dc',
  'illuminate/filesystem' => 'v8.40.0@8ef5902052c5b3bb4a6c1c3afc399f30e7723cb8',
  'illuminate/http' => 'v8.40.0@ab93281f99f6250018f18390607e49f31fb9b6af',
  'illuminate/log' => 'v8.40.0@34b9a55133d2ce166005ba7e61feb793dea3b01f',
  'illuminate/macroable' => 'v8.40.0@300aa13c086f25116b5f3cde3ca54ff5c822fb05',
  'illuminate/pagination' => 'v8.40.0@11839988f114cb80d48b3ca088d65f19388d5a8d',
  'illuminate/pipeline' => 'v8.40.0@23aeff5b26ae4aee3f370835c76bd0f4e93f71d2',
  'illuminate/redis' => 'v8.40.0@8c4acca0e65b6a7eaaff1ecf9b6d8267b09004e2',
  'illuminate/session' => 'v8.40.0@5fee71ca59ce9f8c89ea78a0a2904fcefca772f4',
  'illuminate/support' => 'v8.40.0@ce1682ef73ab28a61be01c24ec5b090bdf2c3256',
  'illuminate/translation' => 'v8.40.0@0fffa8b8f6eed8b4e17eac9d457befbcbae02b47',
  'illuminate/view' => 'v8.40.0@696a1d6d2213be192429e97245a3d2bb4d6d1849',
  'intervention/image' => '2.5.1@abbf18d5ab8367f96b3205ca3c89fb2fa598c69e',
  'monolog/monolog' => '2.2.0@1cb1cde8e8dd0f70cc0fe51354a59acad9302084',
  'nelexa/zip' => '3.3.3@501b52f6fc393a599b44ff348a42740e1eaac7c6',
  'nesbot/carbon' => '2.47.0@606262fd8888b75317ba9461825a24fc34001e1e',
  'neutron/temporary-filesystem' => '3.0@60e79adfd16f42f4b888e351ad49f9dcb959e3c2',
  'nikic/fast-route' => 'v1.3.0@181d480e08d9476e61381e04a71b34dc0432e812',
  'opis/closure' => '3.6.2@06e2ebd25f2869e54a306dda991f7db58066f7f6',
  'paragonie/random_compat' => 'v9.99.100@996434e5492cb4c3edcb9168db6fbb1359ef965a',
  'php-di/invoker' => '2.3.0@992fec6c56f2d1ad1ad5fee28267867c85bfb8f9',
  'php-di/php-di' => '6.3.3@da8e476cafc8011477e2ec9fd2e4706947758af2',
  'php-di/phpdoc-reader' => '2.2.1@66daff34cbd2627740ffec9469ffbac9f8c8185c',
  'php-ffmpeg/php-ffmpeg' => 'v0.18.0@edc0a7729d8818ed883e77b3d26ceb6d49ec41de',
  'phpmailer/phpmailer' => 'v6.4.1@9256f12d8fb0cd0500f93b19e18c356906cbed3d',
  'phpoption/phpoption' => '1.7.5@994ecccd8f3283ecf5ac33254543eb0ac946d525',
  'psr/container' => '1.1.1@8622567409010282b7aeebe4bb841fe98b58dcaf',
  'psr/event-dispatcher' => '1.0.0@dbefd12671e8a14ec7f180cab83036ed26714bb0',
  'psr/http-client' => '1.0.1@2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
  'psr/http-message' => '1.0.1@f6561bf28d520154e4b0ec72be95418abe6d9363',
  'psr/log' => '1.1.4@d49695b909c3b7628b6289db5479a1c204601f11',
  'psr/simple-cache' => '1.0.1@408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
  'ralouphie/getallheaders' => '3.0.3@120b605dfeb996808c31b6477290a714d356e822',
  'robmorgan/phinx' => '0.12.6@3519c5c8d36ec9d41915a9416d2d434adaa79690',
  'symfony/config' => 'v5.2.7@3817662ada105c8c4d1afdb4ec003003efd1d8d8',
  'symfony/console' => 'v5.2.7@90374b8ed059325b49a29b55b3f8bb4062c87629',
  'symfony/deprecation-contracts' => 'v2.4.0@5f38c8804a9e97d23e0c8d63341088cd8a22d627',
  'symfony/error-handler' => 'v5.2.7@ea3ddbf67615e883ca7c33a4de61213789846782',
  'symfony/event-dispatcher' => 'v5.2.4@d08d6ec121a425897951900ab692b612a61d6240',
  'symfony/event-dispatcher-contracts' => 'v2.4.0@69fee1ad2332a7cbab3aca13591953da9cdb7a11',
  'symfony/filesystem' => 'v5.2.7@056e92acc21d977c37e6ea8e97374b2a6c8551b0',
  'symfony/finder' => 'v5.2.4@0d639a0943822626290d169965804f79400e6a04',
  'symfony/http-client-contracts' => 'v2.4.0@7e82f6084d7cae521a75ef2cb5c9457bbda785f4',
  'symfony/http-foundation' => 'v5.2.7@a416487a73bb9c9d120e9ba3a60547f4a3fb7a1f',
  'symfony/http-kernel' => 'v5.2.7@1e9f6879f070f718e0055fbac232a56f67b8b6bd',
  'symfony/mime' => 'v5.2.7@7af452bf51c46f18da00feb32e1ad36db9426515',
  'symfony/polyfill-ctype' => 'v1.22.1@c6c942b1ac76c82448322025e084cadc56048b4e',
  'symfony/polyfill-intl-grapheme' => 'v1.22.1@5601e09b69f26c1828b13b6bb87cb07cddba3170',
  'symfony/polyfill-intl-idn' => 'v1.22.1@2d63434d922daf7da8dd863e7907e67ee3031483',
  'symfony/polyfill-intl-normalizer' => 'v1.22.1@43a0283138253ed1d48d352ab6d0bdb3f809f248',
  'symfony/polyfill-mbstring' => 'v1.22.1@5232de97ee3b75b0360528dae24e73db49566ab1',
  'symfony/polyfill-php72' => 'v1.22.1@cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9',
  'symfony/polyfill-php73' => 'v1.22.1@a678b42e92f86eca04b7fa4c0f6f19d097fb69e2',
  'symfony/polyfill-php80' => 'v1.22.1@dc3063ba22c2a1fd2f45ed856374d79114998f91',
  'symfony/process' => 'v5.2.7@98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e',
  'symfony/service-contracts' => 'v2.4.0@f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb',
  'symfony/string' => 'v5.2.6@ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572',
  'symfony/translation' => 'v5.2.7@e37ece5242564bceea54d709eafc948377ec9749',
  'symfony/translation-contracts' => 'v2.4.0@95c812666f3e91db75385749fe219c5e494c7f95',
  'symfony/var-dumper' => 'v5.2.7@27cb9f7cfa3853c736425c7233a8f68814b19636',
  'visavi/cleanup' => 'v1.5.2@fc13c6376fabe61522d4a3cfeab90e8555c1fbd2',
  'visavi/crontask' => 'v1.2.0@372403f32ea5efdc447fe6ecbd6d015eb3ac2f5f',
  'vlucas/phpdotenv' => 'v5.3.0@b3eac5c7ac896e52deab4a99068e3f4ab12d9e56',
  'voku/portable-ascii' => '1.5.6@80953678b19901e5165c56752d087fc11526017c',
  'visavi/rotor' => '1.0.0+no-version-set@',
);

    private function __construct()
    {
    }

    /**
     * @psalm-pure
     *
     * @psalm-suppress ImpureMethodCall we know that {@see InstalledVersions} interaction does not
     *                                  cause any side effects here.
     */
    public static function rootPackageName() : string
    {
        if (!class_exists(InstalledVersions::class, false) || !InstalledVersions::getRawData()) {
            return self::ROOT_PACKAGE_NAME;
        }

        return InstalledVersions::getRootPackage()['name'];
    }

    /**
     * @throws OutOfBoundsException If a version cannot be located.
     *
     * @psalm-param key-of<self::VERSIONS> $packageName
     * @psalm-pure
     *
     * @psalm-suppress ImpureMethodCall we know that {@see InstalledVersions} interaction does not
     *                                  cause any side effects here.
     */
    public static function getVersion(string $packageName): string
    {
        if (class_exists(InstalledVersions::class, false) && InstalledVersions::getRawData()) {
            return InstalledVersions::getPrettyVersion($packageName)
                . '@' . InstalledVersions::getReference($packageName);
        }

        if (isset(self::VERSIONS[$packageName])) {
            return self::VERSIONS[$packageName];
        }

        throw new OutOfBoundsException(
            'Required package "' . $packageName . '" is not installed: check your ./vendor/composer/installed.json and/or ./composer.lock files'
        );
    }
}
