PHPackages                             shershon/php-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shershon/php-tools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shershon/php-tools
==================

收集PHP开发过程中经常用到的轮子，避免二次开发

1.0.0(3y ago)07MITPHPPHP &gt;=7.1

Since Mar 10Pushed 1y agoCompare

[ Source](https://github.com/shershon-php-package/php-tools)[ Packagist](https://packagist.org/packages/shershon/php-tools)[ RSS](/packages/shershon-php-tools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

1.常用的工具包
--------

[](#1常用的工具包)

在做PHP项目过程做，会发现经常性的重复造轮子，为了以后少造轮子就 多收集日常开发过程中经常用到的轮子，避免二次开发。做个效率高的懒汉。

工具包如下：

文件说明src/ArrayTools.php数组相关方法src/ComputeTools.php计算相关方法src/DateTools.php日期相关方法src/DecideTools.php判断相关方法src/FileTools.php文件相关方法src/HttpTools.phphttp相关方法src/NumberTools.php数字相关方法src/StringTools.php字符串相关方法src/ValidateTools.php验证相关方法src/RedisTools.phpRedis操作类src/EncryptTools.php加解密类src/ImageTools.php图片处理类src/ElasticTools.phpES操作类src/CaptchaTools.php验证码操作类src/RocketmqTools.phpRocketmq操作类**[查看源码](https://github.com/shershon-php-package/php-tools.git)**

2.版本要求
------

[](#2版本要求)

```
php >= 7.1
```

3.安装
----

[](#3安装)

- 配置composer.json

```
{
  "require-dev": {
    "shershon/php-tools": "^1.0.0"
  },
  "config": {
    "secure-http": false
  },
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/shershon-php-package/php-tools.git"
    }
  ]
}
```

- composer require --ignore-platform-reqs shershon/php-tools
- rm -rf vendor/shershon/php-tools/.git

4.更新包版本
-------

[](#4更新包版本)

- composer require --ignore-platform-reqs shershon/php-tools:1.0.0(替换成指定的版本)
- rm -rf vendor/shershon/php-tools/.git
-

5.代码测试
------

[](#5代码测试)

### 5.1 测试全部用例

[](#51-测试全部用例)

```
phpunit -c phpunit.xml --colors=always tests/Cases/RedisTest.php
```

### 5.2 测试单个用例

[](#52-测试单个用例)

```
phpunit -c phpunit.xml --colors=always tests/Cases/RedisTest.php --filter testGetVal
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1165d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58d8e7e825006e80833c8f3693a2b9a720af2f8af833b7faf3f442adf347207b?d=identicon)[xiaoshan](/maintainers/xiaoshan)

---

Top Contributors

[![shershon1991](https://avatars.githubusercontent.com/u/21358691?v=4)](https://github.com/shershon1991 "shershon1991 (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shershon-php-tools/health.svg)

```
[![Health](https://phpackages.com/badges/shershon-php-tools/health.svg)](https://phpackages.com/packages/shershon-php-tools)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
