🛠️ Composer CLI 方法参考
本节列出该模块的全部方法参考页,每个方法一页,含签名、参数、返回值、示例与进阶说明。
| 方法 | 文档 |
|---|---|
🏗️ AddAutoload | add-autoload |
🪪 AddBearerToken | add-bearer-token |
🌐 AddComposerRepository | add-composer-repository |
🔑 AddGitHubToken | add-github-token |
🔑 AddGitLabToken | add-gitlab-token |
🔐 AddHTTPBasicAuth | add-http-basic-auth |
📥 AddPackagistRepository | add-packagist-repository |
📁 AddPathRepository | add-path-repository |
➕ AddRequire | add-require |
🧩 AddScript | add-script |
🔧 AddVcsRepository | add-vcs-repository |
🗜️ Archive | archive |
📦 ArchivePackage | archive-package |
🗜️ ArchiveProject | archive-project |
📦 AuditLock | audit-lock |
🔒 Audit | audit |
📊 AuditWithFormat | audit-with-format |
🧩 AuditWithJSON | audit-with-json |
🔍 AuditWithoutDev | audit-without-dev |
🗑️ BatchRemove | batch-remove |
📦 BatchRequire | batch-require |
🌐 BrowsePackage | browse-package |
🏗️ BuildSatis | build-satis |
📈 BumpPackages | bump-packages |
📈 CheckForOutdatedPackages | check-for-outdated-packages |
🛡️ CheckForSecurityVulnerabilities | check-for-security-vulnerabilities |
🔓 CheckLicenses 检查依赖许可证兼容性 | check-licenses |
✅ Check | check |
🖥️ CheckPlatform | check-platform |
🖥️ CheckPlatformReqs 检查平台要求 | check-platform-reqs |
📋 CheckPlatformReqsStructured | check-platform-reqs-structured |
🔒 CheckPlatformWithLock | check-platform-with-lock |
🎯 CheckStructured | check-structured |
🧹 ClearCache | clear-cache |
🚀 CreateProject | create-project |
📦 CreateSatisConfig | create-satis-config |
⚙️ DefaultOptions | default-options |
🩺 Diagnose | diagnose |
🔬 DiagnoseStructured | diagnose-structured |
🤫 DisableInteraction | disable-interaction |
🧩 DumpAutoload | dump-autoload |
🛠️ DumpAutoloadWithOptions | dump-autoload-with-options |
👤 EnableSuperuser | enable-superuser |
🔧 EnsureInstalled | ensure-installed |
🌟 ExecAll | exec-all |
⚙️ Exec | exec |
🐘 ExecPHP | exec-php |
🎯 ExecuteScript | execute-script |
📋 ExecWithList | exec-with-list |
📦 ExtractPackageNamesFromOutput | extract-package-names-from-output |
🎯 ExtractVersionFromOutput | extract-version-from-output |
🧮 FormatVersionConstraint | format-version-constraint |
💰 Fund | fund |
📊 FundWithJSON | fund-with-json |
⚠️ GetAbandonedPackagesFromLock | get-abandoned-packages-from-lock |
🚫 GetAbandonedPackages | get-abandoned-packages |
📈 GetAuditInfo | get-audit-info |
📖 GetAuthConfig | get-auth-config |
💾 GetCacheDir | get-cache-dir |
🏠 GetComposerHome | get-composer-home |
📊 GetConfigStructured | get-config-structured |
🔧 GetConfigWithGlobal | get-config-with-global |
🎯 GetDirectDependencyNames | get-direct-dependency-names |
🧭 GetEnvironmentInfo | get-environment-info |
🔍 GetEnvVariable | get-env-variable |
🧩 GetExtensions | get-extensions |
🔗 GetFundingURLs | get-funding-urls |
🚨 GetHighSeverityVulnerabilities | get-high-severity-vulnerabilities |
📋 GetInstalledPackageNames | get-installed-package-names |
🧾 GetLicensesInfo | get-licenses-info |
🗺️ GetNamespaceMap | get-namespace-map |
⬆️ GetOutdatedInfo | get-outdated-info |
🐘 GetPHPVersion | get-php-version |
📊 GetProjectDependencies | get-project-dependencies |
📦 GetProjectInfo | get-project-info |
🏗️ GetProjectSummary | get-project-summary |
🔍 GetRequireWithVersion | get-require-with-version |
⌨️ GetScripts | get-scripts |
📁 GetVendorDir | get-vendor-dir |
📊 GetVersionInfo | get-version-info |
🔢 GetVersion | get-version |
📦 GlobalInstall | global-install |
📋 GlobalList | global-list |
🗑️ GlobalRemove | global-remove |
🌐 GlobalRequire | global-require |
🔄 GlobalUpdate | global-update |
🔒 HasComposerLock | has-composer-lock |
🔍 HasExtension | has-extension |
✅ HasFunding | has-funding |
📁 HasVendorDir | has-vendor-dir |
⚠️ HasVulnerabilities | has-vulnerabilities |
🏥 HealthCheck | health-check |
🏗️ InitProject | init-project |
🚀 InitSatis | init-satis |
🔍 InstallDryRun | install-dry-run |
📦 Install | install |
🚫 InstallNoScripts | install-no-scripts |
⚡ InstallWithAPCu 启用 APCu 自动加载缓存安装依赖 | install-with-apcu |
🛠️ InstallWithOptions | install-with-options |
📥 InstallWithPreferDist | install-with-prefer-dist |
📥 InstallWithPreferSource | install-with-prefer-source |
✅ IsInstalled | is-installed |
🧩 IsPackageDev | is-package-dev |
✅ IsPackageInstalled | is-package-installed |
✅ IsPlatformAvailable | is-platform-available |
📦 IsProject | is-project |
📜 Licenses | licenses |
📜 LicensesWithFormat | licenses-with-format |
📋 ListConfig | list-config |
🔍 ListRepositories | list-repositories |
📚 ListScripts | list-scripts |
⚙️ LocalExec | local-exec |
🔒 LockPackageVersion | lock-package-version |
🚀 New | new |
📝 NormalizeComposerJson | normalize-composer-json |
📦 OutdatedPackagesDirect 仅显示直接依赖中过时的包 | outdated-packages-direct |
⬆️ OutdatedPackages | outdated-packages |
✅ ParseCheckOutput | parse-check-output |
🔒 ParseComposerAuditJSON | parse-composer-audit-json |
📈 ParseComposerOutdatedJSON | parse-composer-outdated-json |
🔍 ParseComposerShowJSON | parse-composer-show-json |
🌳 ParseDependencyTreeJSON | parse-dependency-tree-json |
🩺 ParseDiagnoseOutput | parse-diagnose-output |
📦 ParseInstallOutput | parse-install-output |
📋 ParseStatusOutput | parse-status-output |
🔄 ParseUpdateOutput | parse-update-output |
🏷️ ParseVersionOutput | parse-version-output |
🚫 Prohibit | prohibit |
🚀 QuickSetup | quick-setup |
📄 ReadComposerJSON | read-composer-json |
♻️ Reinstall | reinstall |
🧪 RemoveDryRun 模拟移除包 | remove-dry-run |
➖ Remove | remove |
➖ RemoveMultiple | remove-multiple |
🗑️ RemoveRepository | remove-repository |
🗑️ RemoveRequire | remove-require |
🧹 RemoveScript | remove-script |
🧹 RemoveToken | remove-token |
🧪 RequireDryRun 模拟添加包依赖 | require-dry-run |
➕ RequireMultiple | require-multiple |
➕ RequirePackage | require-package |
📦 RequirePackageWithOptions 带自定义选项添加包依赖 | require-package-with-options |
🛠️ Run | run |
⚡ RunScript | run-script |
🌐 RunWithContext | run-with-context |
⏱️ RunWithTimeout | run-with-timeout |
💾 SaveAuthConfig | save-auth-config |
🔎 SearchInfo | search-info |
🔎 Search | search |
🔎 SearchOnlyName | search-only-name |
🏷️ SearchWithType | search-with-type |
🚀 SelfUpdate | self-update |
⚙️ SetConfigWithGlobal | set-config-with-global |
🌐 SetEnvVariable | set-env-variable |
💾 SetMemoryLimit | set-memory-limit |
📊 SetMinimumStability | set-minimum-stability |
🎯 SetPreferredInstall | set-preferred-install |
✅ SetPreferStable | set-prefer-stable |
⏱️ SetProcessTimeout | set-process-timeout |
🔧 SetProperty | set-property |
🔧 SetWorkingDir | set-working-dir |
📦 ShowAllPackages | show-all-packages |
🌳 ShowDependencyTree | show-dependency-tree |
✨ ShowPackageInfo | show-package-info |
🔎 ShowPackage | show-package |
🔗 ShowReverseDependencies | show-reverse-dependencies |
📊 Status | status |
📈 StatusStructured | status-structured |
💡 Suggests | suggests |
🔍 UpdateDryRun | update-dry-run |
⚡ Update | update |
🔄 UpdatePackageVersion | update-package-version |
🔗 UpdateWithDependencies | update-with-dependencies |
🔒 UpdateWithLock | update-with-lock |
🛠️ UpdateWithOptions | update-with-options |
🧪 ValidateComposerJson | validate-composer-json |
🔒 ValidateComposerLock | validate-composer-lock |
✅ Validate | validate |
🔍 ValidateSchema | validate-schema |
✅ ValidateStrict | validate-strict |
🧪 ValidateStructured | validate-structured |
🚫 WhyNotPackage | why-not-package |
❓ WhyPackage | why-package |
✍️ WriteComposerJSON | write-composer-json |