aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-rpc/php/stubs/Composer/Composer.php
blob: de5a6d1b93ebb2560fc901a290cfedb932c8d175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php

// Generated by scripts/plugin-stub-generator; do not edit by hand.
// Proxy stub for Composer\Composer: the public surface forwards to the Rust-side entity over RPC.

namespace Composer;

use Composer\Package\Locker;
use Composer\Pcre\Preg;
use Composer\Plugin\PluginManager;
use Composer\Downloader\DownloadManager;
use Composer\Autoload\AutoloadGenerator;
use Composer\Package\Archiver\ArchiveManager;

class Composer extends PartialComposer
{
    public const VERSION = '2.9.7';
    public const BRANCH_ALIAS_VERSION = '';
    public const RELEASE_DATE = '2026-04-14 13:31:52';
    public const SOURCE_VERSION = '';
    public const RUNTIME_API_VERSION = '2.2.2';

    public static function getVersion(): string
    {
        // no replacement done, this must be a source checkout
        if (self::VERSION === '@package_version'.'@') {
            return self::SOURCE_VERSION;
        }

        // we have a branch alias and version is a commit id, this must be a snapshot build
        if (self::BRANCH_ALIAS_VERSION !== '' && Preg::isMatch('{^[a-f0-9]{40}$}', self::VERSION)) {
            return self::BRANCH_ALIAS_VERSION.'+'.self::VERSION;
        }

        return self::VERSION;
    }

    public function setLocker(Locker $locker): void
    {
        \ShirabeRpcRuntime::callRust($this->__rhandle, 'setLocker', [$locker]);
    }

    public function getLocker(): Locker
    {
        return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getLocker', []);
    }

    public function setDownloadManager(DownloadManager $manager): void
    {
        \ShirabeRpcRuntime::callRust($this->__rhandle, 'setDownloadManager', [$manager]);
    }

    public function getDownloadManager(): DownloadManager
    {
        return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getDownloadManager', []);
    }

    public function setArchiveManager(ArchiveManager $manager): void
    {
        \ShirabeRpcRuntime::callRust($this->__rhandle, 'setArchiveManager', [$manager]);
    }

    public function getArchiveManager(): ArchiveManager
    {
        return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getArchiveManager', []);
    }

    public function setPluginManager(PluginManager $manager): void
    {
        \ShirabeRpcRuntime::callRust($this->__rhandle, 'setPluginManager', [$manager]);
    }

    public function getPluginManager(): PluginManager
    {
        return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getPluginManager', []);
    }

    public function setAutoloadGenerator(AutoloadGenerator $autoloadGenerator): void
    {
        \ShirabeRpcRuntime::callRust($this->__rhandle, 'setAutoloadGenerator', [$autoloadGenerator]);
    }

    public function getAutoloadGenerator(): AutoloadGenerator
    {
        return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getAutoloadGenerator', []);
    }
}