承接 welsh-tidy-mouse/binary-providers 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

welsh-tidy-mouse/binary-providers

Composer 安装命令:

composer require welsh-tidy-mouse/binary-providers

包简介

Binary providers

README 文档

README

Binaries Tests PHP Tests Binary Fetcher license

This repository provides a set of binary providers for use with the Binary Fetcher library.

Each binary provider defines how to locate and download a specific binary from GitHub releases, tailored to the current platform (OS + architecture). These providers are used by Binary Fetcher to automate the installation of CLI tools across environments.

📦 What Is This For?

The binary-fetcher project is a PHP-based tool to download platform-specific binaries with zero configuration. It can be used both:

  • Via CLI (bin/binary-fetcher download)
  • Via PHP (BinaryFetcher::download())

This repository (binary-providers) contains the list of supported binaries through reusable PHP provider classes.

🧩 Available Binary Providers

Provider Class Binary Source URL Notes
\WelshTidyMouse\BinaryProvider\BunJsBinaryProvider bun oven-sh/bun JavaScript runtime (Node.js alternative)
\WelshTidyMouse\BinaryProvider\TailwindCssBinaryProvider tailwindcss tailwindlabs/tailwindcss CSS utility framework CLI
\WelshTidyMouse\BinaryProvider\SassBinaryProvider dart-sass sass/dart-sass Sass compiler (standalone executable)

🔧 Install

composer require welsh-tidy-mouse/binary-fetcher

🚀 How to Use These Providers

Using Binary Fetcher, you can download any of these binaries based on your current OS and architecture.

From CLI

bin/binary-fetcher download "\WelshTidyMouse\BinaryProvider\BunJsBinaryProvider"

From PHP

use WelshTidyMouse\BinaryFetcher\BinaryFetcher;
use WelshTidyMouse\BinaryProvider\BunJsBinaryProvider;

$binaryPath = (new BinaryFetcher())->download(BunJsBinaryProvider::class);

The binary will be downloaded to a writable location and its path will be returned.

🛠️ Development & Contributions

You can add your own binary provider class implementing the interface:

namespace WelshTidyMouse\BinaryFetcher\Contract;

use WelshTidyMouse\BinaryFetcher\Exception\BinaryProviderException;
use WelshTidyMouse\BinaryFetcher\Type\OsType;
use WelshTidyMouse\BinaryFetcher\Type\SystemArchType;

interface BinaryProviderInterface
{
    public function __construct();
    public function getName(): string;
    public function getDownloadableAssetUrl(string $version, OsType $os, SystemArchType $arch): ?string;
    public function getBinaryFilenameFromDownloadedAsset(string $assetFileName, string $downloadDirPath): string;
}

Pull requests for additional binary providers are welcome!

🧪 Quality

  • composer lint to run PHPStan
  • composer cs to fix files with Code Sniffer
  • composer mdto run PHPMD
  • composer check for all commands above

🐁 Part of Welsh Tidy Mouse

This package is part of the Welsh Tidy Mouse ecosystem. Read more on the main repository: binary-fetcher

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: WTFPL
  • 更新时间: 2025-05-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固