承接 tjvb/githash 相关项目开发

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

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

tjvb/githash

Composer 安装命令:

composer require tjvb/githash

包简介

Get the current git hash from your project.

README 文档

README

Latest Stable Version Pipeline status Coverage report Tested on PHP 8.0 to 8.5 Latest Unstable Version

PHP Version Require PHPMD PHPStan PHPCS

License

This package is intended to give a useful option for getting the hash from the current commit.

Usage

try {
    $retriever = Retriever::getWithFactory(GitHashFinderFactory::withDefaultFinders());
    echo $retriever->getHash($path)->hash() . PHP_EOL;
} catch (GitHashException $exception) {
    echo 'Failed to get the hash ' .  $exception->getMessage() . PHP_EOL;
}

Examples

See docs/examples for examples about how to use this package.

Installation

You can install this package with composer by executing the command: composer require tjvb/githash.

Different HashFinders

The package provide 3 different GitHashFinder they all have some pro's and con's.

GitHashFinderRequirementsBenefitsCons
GitProcessCommandHashFinderThe symfony/process package and git executable.This execute the git commands with the symfony/process package to get good feedback.You need to install this package and have the git command available.
GitShellExecCommandHashFinderThe shell_exec PHP function and git executable.This execute the git commands.You need to have shell_exec and the git command available.
GitFileSystemHashFinderA branch.It reads the git files and doesn't need to have a git executable.The repository need to have a branch, it doesn't work with a detached head.

Laravel package

If you use Laravel you can use tjvb/laravel-githash, this package can add the hash to your log files and provides a blade component to show the hash.

Changelog

We (try to) document all the changes in CHANGELOG so read it for more information.

Contributing

You are welcome to contribute, read about it in CONTRIBUTING

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固